mirror of
https://github.com/dani/vroom.git
synced 2024-06-02 05:21:39 +02:00
Add a script to update po files
This commit is contained in:
parent
4fb913d0f1
commit
890213997f
18
scripts/update_locales.pl
Executable file
18
scripts/update_locales.pl
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use File::Basename;
|
||||||
|
use Locale::Maketext::Extract::Run 'xgettext';
|
||||||
|
|
||||||
|
chdir dirname($0) . '/..';
|
||||||
|
|
||||||
|
my @files = qw(vroom.pl public/js/vroom.js);
|
||||||
|
push @files, glob('templates/default/*');
|
||||||
|
|
||||||
|
foreach my $lang (map { basename(s/\.pm$//r) } glob('lib/Vroom/I18N/*.pm')){
|
||||||
|
xgettext(
|
||||||
|
'-o', 'lib/Vroom/I18N/' . $lang . '.po',
|
||||||
|
@files
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user