Detect supported lang by checking .po files now

This commit is contained in:
Daniel Berteaud 2015-07-17 16:10:42 +02:00
parent b25bf5cb14
commit 84ec1b3e92
2 changed files with 3 additions and 2 deletions

View File

@ -10,9 +10,10 @@ 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')){
foreach my $lang (map { basename(s/\.po$//r) } glob('lib/Vroom/I18N/*.po')){
xgettext(
'-o', 'lib/Vroom/I18N/' . $lang . '.po',
'--wrap',
@files
);
}

View File

@ -643,7 +643,7 @@ helper update_room_last_activity => sub {
# Return an array of supported languages
helper get_supported_lang => sub {
my $self = shift;
return map { basename(s/\.pm$//r) } glob('lib/Vroom/I18N/*.pm');
return map { basename(s/\.po$//r) } glob('lib/Vroom/I18N/*.po');
};
# Generate a random token