From 4965b290a24b4559d0d82210ac8da0ad91da8200 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 3 Oct 2018 12:46:13 -0300 Subject: [PATCH] Bug 21483: Remove translation for "help" % perl translate update es-ES /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/modules/help: Input must be a directory. The "help" directory has been removed by bug 19817. I kept the "excludes" option even if not used, it could be useful later. Test plan: Create, install and update templates for a given language. Make sure the files are generated correctly. --- misc/translator/LangInstaller.pm | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/misc/translator/LangInstaller.pm b/misc/translator/LangInstaller.pm index cd947fc3b3..8cd5acd5e3 100644 --- a/misc/translator/LangInstaller.pm +++ b/misc/translator/LangInstaller.pm @@ -101,11 +101,6 @@ sub new { dir => $context->config('intrahtdocs') . '/prog', suffix => '-staff-prog.po', }, - { - name => 'Intranet prog help', - dir => $context->config('intrahtdocs') . '/prog/en/modules/help', - suffix => '-staff-help.po', - }, ]; # OPAC themes @@ -368,11 +363,11 @@ sub install_tmpl { " With: $self->{path_po}/$self->{lang}$trans->{suffix}\n" if $self->{verbose}; - my $trans_dir = ( $trans->{name} =~ /help/ )?"$t_dir":"$t_dir/en/"; - my $lang_dir = ( $trans->{name} =~ /help/ )?"$t_dir":"$t_dir/$self->{lang}"; + my $trans_dir = "$t_dir/en/"; + my $lang_dir = "$t_dir/$self->{lang}"; $lang_dir =~ s|/en/|/$self->{lang}/|; mkdir $lang_dir unless -d $lang_dir; - my $excludes = ( $trans->{name} !~ /help/ )?"":"-x 'help'"; + my $excludes = ""; # if installing MARC po file, only touch corresponding files my $marc = ( $trans->{name} =~ /MARC/ )?"-m \"$trans->{name}\"":""; # for MARC translations # if not installing MARC po file, ignore all MARC files @@ -405,9 +400,8 @@ sub update_tmpl { " To : $self->{path_po}/$self->{lang}$trans->{suffix}\n" if $self->{verbose}; - my $trans_dir = ( $trans->{name} =~ /help/ )?"$trans->{dir}":join("/en/ -i ",split(" ",$trans->{dir}))."/en/"; # multiple source dirs - # do no process 'help' dirs unless needed - my $excludes = ( $trans->{name} !~ /help/ )?"-x help":""; + my $trans_dir = join("/en/ -i ",split(" ",$trans->{dir}))."/en/"; # multiple source dirs + my $excludes = ""; # if processing MARC po file, only use corresponding files my $marc = ( $trans->{name} =~ /MARC/ )?"-m \"$trans->{name}\"":""; # for MARC translations # if not processing MARC po file, ignore all MARC files @@ -450,8 +444,8 @@ sub create_tmpl { " To : $self->{path_po}/$self->{lang}$trans->{suffix}\n" if $self->{verbose}; - my $trans_dir = ( $trans->{name} =~ /help/ )?"$trans->{dir}":join("/en/ -i ",split(" ",$trans->{dir}))."/en/"; # multiple source dirs - my $excludes = ( $trans->{name} !~ /help/ )?"-x help":""; + my $trans_dir = join("/en/ -i ",split(" ",$trans->{dir}))."/en/"; # multiple source dirs + my $excludes = ""; # if processing MARC po file, only use corresponding files my $marc = ( $trans->{name} =~ /MARC/ )?"-m \"$trans->{name}\"":""; # for MARC translations # if not processing MARC po file, ignore all MARC files @@ -628,7 +622,7 @@ appropriate directory. Create 4 kinds of .po files in F subdirectory: (1) one from each theme on opac pages templates, -(2) intranet templates and help, +(2) intranet templates, (3) preferences, and (4) one for each MARC dialect. @@ -640,7 +634,7 @@ Create 4 kinds of .po files in F subdirectory: Contains extracted text from english (en) OPAC templates found in /koha-tmpl/opac-tmpl/{theme}/en/ directory. -=item F-staff-prog.po and F-staff-help.po +=item F-staff-prog.po and F-staff.po Contains extracted text from english (en) intranet templates found in /koha-tmpl/intranet-tmpl/prog/en/ directory. -- 2.11.0