Bug 15306 - Don't show translate link for item types if only one language is installed
Summary: Don't show translate link for item types if only one language is installed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 14828
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-04 14:44 UTC by Owen Leonard
Modified: 2017-06-14 22:11 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15306: Do not display the translate link if only 1 language is installed (3.24 KB, patch)
2016-01-07 12:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
[ALTERNATIVE-PATCH] Bug 15306: Do not display the translate link if only 1 language is installed (3.02 KB, patch)
2016-01-07 13:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15306: Do not display the translate link if only 1 language is installed (3.21 KB, patch)
2016-01-07 14:38 UTC, Marc Véron
Details | Diff | Splinter Review
[ALTERNATIVE-PATCH] Bug 15306: Do not display the translate link if only 1 language is installed (3.18 KB, patch)
2016-01-11 11:23 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15306: Do not display the translate link if only 1 language is installed (3.11 KB, patch)
2016-01-11 11:51 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 15306: Do not display the translate link if only 1 language is installed (3.17 KB, patch)
2016-01-18 07:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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