Bug 13362: translate script creates dirs on update
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fri, 28 Nov 2014 18:14:53 +0000 (15:14 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 17 Dec 2014 22:29:28 +0000 (19:29 -0300)
A dir creation was uncommented (by me), the effect is
create a lang dir on 'update', which is no needed.

To test:
1) Update translation files for a uninstalled language
(cd misc/translator; ./translate update xx-YY)

2) Check new dirs
koha-tmpl/opac-tmpl/bootstrap/xx-YY/
koha-tmpl/intranet-tmpl/prog/xx-YY/
koha-tmpl/intranet-tmpl/prog/en/modules/help/xx-YY/

3) Clean all
git clean -f -d

4) Apply the patch

5) Repeat 1) (i.e. update)

6) Check no new dirs this time

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested according to test plan, works as described.
Passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
misc/translator/LangInstaller.pm

index c538b57..b3b09da 100644 (file)
@@ -371,7 +371,6 @@ sub update_tmpl {
             "    To  : $self->{path_po}/$self->{lang}$trans->{suffix}\n"
                 if $self->{verbose};
         my $lang_dir = "$trans->{dir}/$self->{lang}";
-        mkdir $lang_dir unless -d $lang_dir;
 
         my $trans_dir = ( $trans->{name} =~ /help/ )?"$trans->{dir}":"$trans->{dir}/en/";
         my $excludes  = ( $trans->{name} =~ /UI/   )?"-x 'help'":"";