Bug 25346

Summary: Only show warn about existing directory on installing translations when verbose is used
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Bernardo Gonzalez Kriegel <bgkriegel>
Status: CLOSED FIXED QA Contact: Alex Arnaud <alex.arnaud>
Severity: trivial    
Priority: P5 - low CC: aleisha, alex.arnaud, bgkriegel, f.demians, jonathan.druart, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.01
Attachments: Bug 25346: Supress warning message when install dir exists
Bug 25346: Supress warning message when install dir exists
Bug 25346: Supress warning message when install dir exists

Description Katrin Fischer 2020-05-01 16:06:39 UTC
When installing a language that is already present on the system, this error is displayed:

Install messages (de_DE)
de-DE installer dir /home/vagrant/kohaclone/installer/data/mysql/de-DE already exists.
Delete it if you want to recreate it.

To test:
- kshell
- cd misc/translator
- perl translate install de-DE

and maybe a second time:

- perl translate install de-DE
Comment 1 Bernardo Gonzalez Kriegel 2020-05-19 16:29:07 UTC
Created attachment 105104 [details] [review]
Bug 25346: Supress warning message when install dir exists

To see it enable verbose mode

To test:
1) Install lang with install dir
   (cd misc/translator; ./tranlste install de-DE)
   check message: "de-DE installer dir /...mysql/de-DE already exists."
2) Apply patch
3) Repeat 1, now message is gone
4) Repeat 1 in verbose mode (./translate install de-DE -v)
   check the message now appears at the bottom.
Comment 2 Bernardo Gonzalez Kriegel 2020-05-19 16:31:02 UTC
(In reply to Katrin Fischer from comment #0)
> When installing a language that is already present on the system, this error
> is displayed:
> 
It's not an error but a warning, can be suppressed by this patch.
Comment 3 Katrin Fischer 2020-05-22 12:13:20 UTC
Created attachment 105264 [details] [review]
Bug 25346: Supress warning message when install dir exists

To see it enable verbose mode

To test:
1) Install lang with install dir
   (cd misc/translator; ./tranlste install de-DE)
   check message: "de-DE installer dir /...mysql/de-DE already exists."
2) Apply patch
3) Repeat 1, now message is gone
4) Repeat 1 in verbose mode (./translate install de-DE -v)
   check the message now appears at the bottom.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Alex Arnaud 2020-06-05 12:13:31 UTC
Created attachment 105578 [details] [review]
Bug 25346: Supress warning message when install dir exists

To see it enable verbose mode

To test:
1) Install lang with install dir
   (cd misc/translator; ./tranlste install de-DE)
   check message: "de-DE installer dir /...mysql/de-DE already exists."
2) Apply patch
3) Repeat 1, now message is gone
4) Repeat 1 in verbose mode (./translate install de-DE -v)
   check the message now appears at the bottom.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 5 Jonathan Druart 2020-06-15 09:59:36 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Lucas Gass 2020-06-17 23:21:55 UTC
backported to 20.05.x for 20.05.01
Comment 7 Aleisha Amohia 2020-06-22 04:36:05 UTC
doesn't apply cleanly, please rebase if needed on 19.11.x