Detect supported lang by checking .po files now

master
Daniel Berteaud 10 years ago
parent b25bf5cb14
commit 84ec1b3e92
  1. 3
      scripts/update_locales.pl
  2. 2
      vroom.pl

@ -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
);
}

@ -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

Loading…
Cancel
Save