@@ -, +, @@ language $ perl translate create xx-YY Ther must be no messages old messages for example de-DE: $ perl translate update de-DE Note (git status) a new file, po/de-DE-messages.po~ This is a backup file from msgmerge command With the patch this backup is removed. --- .../prog/en/modules/admin/preferences/enhanced_content.pref | 2 +- misc/translator/LangInstaller.pm | 5 +++-- misc/translator/tmpl_process3.pl | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref @@ -10,7 +10,7 @@ Enhanced Content: yes: "Show" - cover images in OPAC results and detail listing from Swedish retailer Adlibris. - - - Use base URL: + - "Use base URL: " - pref: AdlibrisCoversURL class: url default: "http://www.adlibris.com/se/organisationer/showimagesafe.aspx" --- a/misc/translator/LangInstaller.pm +++ a/misc/translator/LangInstaller.pm @@ -493,7 +493,8 @@ sub create_messages { say "Create messages ($self->{lang})" if $self->{verbose}; my $locale = $self->locale_name(); - system "$self->{msginit} -i $pot -o $po -l $locale --no-translator"; + system "$self->{msginit} -i $pot -o $po -l $locale --no-translator 2> /dev/null"; + warn "Problems creating $pot ".$? if ( $? == -1 ); # If msginit failed to correctly set Plural-Forms, set a default one system "$self->{sed} --in-place $po " @@ -512,7 +513,7 @@ sub update_messages { if ( -f $po ) { say "Update messages ($self->{lang})" if $self->{verbose}; - system "$self->{msgmerge} --quiet -U $po $pot"; + system "$self->{msgmerge} --backup=off --quiet -U $po $pot"; } else { $self->create_messages(); } --- a/misc/translator/tmpl_process3.pl +++ a/misc/translator/tmpl_process3.pl @@ -337,12 +337,12 @@ if (defined $href) { # set our charset in to UTF-8 if (!defined $charset_in) { $charset_in = TmplTokenizer::charset_canon 'UTF-8'; - warn "Warning: Can't determine original templates' charset, defaulting to $charset_in\n"; + warn "Warning: Can't determine original templates' charset, defaulting to $charset_in\n" unless ( $quiet ); } # set our charset out to UTF-8 if (!defined $charset_out) { $charset_out = TmplTokenizer::charset_canon 'UTF-8'; - warn "Warning: Charset Out defaulting to $charset_out\n"; + warn "Warning: Charset Out defaulting to $charset_out\n" unless ( $quiet ); } my $xgettext = './xgettext.pl'; # actual text extractor script my $st; @@ -350,7 +350,7 @@ my $st; if ($action eq 'create') { # updates the list. As the list is empty, every entry will be added if (!-s $str_file) { - warn "Removing empty file $str_file\n"; + warn "Removing empty file $str_file\n" unless ( $quiet ); unlink $str_file || die "$str_file: $!\n"; } die "$str_file: Output file already exists\n" if -f $str_file; @@ -362,7 +362,7 @@ if ($action eq 'create') { print $tmph1 "$input\n"; } close $tmph1; - warn "I $charset_in O $charset_out"; + warn "I $charset_in O $charset_out" unless ( $quiet ); # Generate the specified po file ($str_file) $st = system ($xgettext, '-s', '-f', $tmpfile1, '-o', $tmpfile2, (defined $charset_in? ('-I', $charset_in): ()), --