Bug 15306

Summary: Don't show translate link for item types if only one language is installed
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: brendan, jonathan.druart, julian.maurice, veron
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14828    
Bug Blocks:    
Attachments: Bug 15306: Do not display the translate link if only 1 language is installed
[ALTERNATIVE-PATCH] Bug 15306: Do not display the translate link if only 1 language is installed
Bug 15306: Do not display the translate link if only 1 language is installed
[ALTERNATIVE-PATCH] Bug 15306: Do not display the translate link if only 1 language is installed
Bug 15306: Do not display the translate link if only 1 language is installed
[PASSED QA] Bug 15306: Do not display the translate link if only 1 language is installed

Description Owen Leonard 2015-12-04 14:44:37 UTC
It doesn't make sense to offer the option to translate an item type description into another language if there is only one language installed. I think the page should check for the existence of multiple installed languages before showing the link.
Comment 1 Jonathan Druart 2016-01-07 12:37:45 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-01-07 12:38:40 UTC
Another version of the patch could be provided to apply on top of 3.22.
Comment 3 Marc Véron 2016-01-07 13:24:35 UTC
I'm not sure about taking enabled languages as a trigger for displaying the translation link.

Use case for a country with multiple languages:

- I have an installation with let's say English, German, French, Italian
- English is and German are enabled.
- Now I want to prepare my installation for French and / or Italian. I do all the translation work, but do not yet want to enbale the languages until I'm finished, e.g. because everithing has to be reviewed befor the new language is officially launched. 

With this patch, the translations would be have to be already visible while translating.

Alternative: Use the _installed_ language as a trigger.
Comment 4 Jonathan Druart 2016-01-07 13:50:54 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2016-01-07 14:38:09 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2016-01-07 14:39:56 UTC
@Owen: What do you think, is the alternative patch OK for you?
Comment 7 Marc Véron 2016-01-11 11:17:18 UTC
Comment on attachment 46394 [details] [review]
Bug 15306: Do not display the translate link if only 1 language is installed

I think my sign-off here was on the alternative patch, but to make it sure I obsolete this one and sgn-off again on the alternative patch.
Comment 8 Marc Véron 2016-01-11 11:23:30 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2016-01-11 11:51:42 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2016-01-11 11:52:20 UTC
Just removed a trailing warn
Comment 11 Katrin Fischer 2016-01-18 07:17:44 UTC
Created attachment 46764 [details] [review]
[PASSED QA] Bug 15306: Do not display the translate link if only 1 language is installed

It doesn't make sense to offer the option to translate an item type
description into another language if there is only one language
installed.

Test plan:
Generates templates for only 1 language
Edit an item type and confirm that the link "translate into..." is not
displayed.
Generates templates for another language
Confirm that the link is now displayed.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Brendan Gallagher 2016-02-24 00:02:09 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks
Comment 13 Julian Maurice 2016-03-07 08:43:46 UTC
Patch pushed to stable, will be in 3.22.5