X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Flocales.pl;h=b6665588abd2ce102ea897c490baa663758f1ba0;hb=440ad8d3e9fada111bf174d11081c910c361acef;hp=d7b28a3db79bfc2f65efb0edadb7ec76bab14672;hpb=bc08036a5ad1922e30ddd6f69268438c0b86883f;p=kivitendo-erp.git diff --git a/scripts/locales.pl b/scripts/locales.pl index d7b28a3db..b6665588a 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -143,13 +143,14 @@ generate_file( ); open(my $js_file, '>:encoding(utf8)', $javascript_output_dir .'/locale/'. $locale .'.js') || die; -print $js_file '{'; +print $js_file 'namespace("kivi").setupLocale({'; my $first_entry = 1; for my $key (sort(keys(%jslocale))) { print $js_file ((!$first_entry ? ',' : '') ."\n". _double_quote($key) .':'. _double_quote($self->{texts}{$key})); $first_entry = 0; } -print $js_file ("\n".'}'."\n"); +print $js_file ("\n"); +print $js_file ('});'."\n"); close($js_file); foreach my $text (keys %$missing) {