Bug 16687

Summary: Translatability: Fix issues with sentence splitting in Administration preferences
Product: Koha Reporter: Marc Véron <veron>
Component: I18N/L10NAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: chris, f.demians, jean-manuel.broust, jetkiwi, jonathan.druart, katrin.fischer, kyle, mik
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16669
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 16679    
Attachments: Bug 16687 - Translatability: Fix issues in Administration preferences
Screen capture testing patch 16687
Bug 16687 - Translatability: Fix issues in Administration preferences
[SGINED-OFF] Bug 16687 - Translatability: Fix issues in Administration preferences
Bug 16687 - Translatability: Fix issues in Administration preferences
Bug 16687 - Translatability: Fix issues in Administration preferences
Bug 16687 - Translatability: Fix issues in Administration preferences
[PASSED QA] Bug 16687 - Translatability: Fix issues in Administration preferences
[COUNTER-PATCH] Bug 16687: Translatability: Fix issues in Administration preferences

Description Marc Véron 2016-06-07 15:30:59 UTC
Fix sentence splitting and other translation issues in file koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref to avoid odd translations.
Comment 1 Marc Véron 2016-06-07 15:39:26 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-06-08 15:14:54 UTC
*** Bug 16669 has been marked as a duplicate of this bug. ***
Comment 3 jmbroust 2016-06-29 10:56:52 UTC
Created attachment 52946 [details]
Screen capture testing patch 16687
Comment 4 jmbroust 2016-06-29 11:00:04 UTC
Patch partially corrects the issue but there are still some problems (see screen capture).
Comment 5 Marc Véron 2016-06-30 05:41:33 UTC
(In reply to jmbroust from comment #4)
> Patch partially corrects the issue but there are still some problems (see
> screen capture).

Hi jmbroust, Thanks for testing.

I can not test right now due to a weak internet connection. It seems that the problem is related to the French translation and not to my code changes. Please check french translation on http://translate.koha-community.org/ 

How does it look like in English? Can you please test the English version and provide a screenhot?
Comment 6 Marc Véron 2016-07-03 11:51:12 UTC
I re-tested. The issues in the screenshots are related to wrong or missing French translations in http://translate.koha-community.org/fr/16.05/fr-FR-pref.po

In English the changes look fine.

Switching back to 'Needs Signoff'
Comment 7 Owen Leonard 2016-07-12 14:30:59 UTC
Some of the choices no longer make grammatical sense following the change of the description because they were designed to fit within a sentence:

"Show debugging information in the browser when an internal error occurs:"

- none
- some
- lots of

I suggest:

"How much debugging information to show in the browser when an internal error occurs:"

- None
- Some
- All

-----------------------

For DefaultToLoggedInLibraryCircRules, DefaultToLoggedInLibraryNoticesSlips, and DefaultToLoggedInLibraryOverdueTriggers I suggest the choices be:

no: "All libraries"
yes: "The logged-in library"
Comment 8 Marc Véron 2016-07-12 18:31:51 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2016-07-13 13:05:04 UTC
Created attachment 53370 [details] [review]
[SGINED-OFF] Bug 16687 - Translatability: Fix issues in Administration preferences

This patch fixes sentence splitting and other translation issues in
file koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
to avoid odd translations.

To test:
- Without patch, open Home > Administration > System preferences
  and go to tab 'Administration"
- Apply patch
- Open the same page in a new window and compare the text:
  - Verify  that no sentences are splitted
  - Verify that the text changes do not introduce misunderstandings
    and have the same meaning as without patch

Amended for comment #7 2016-07-12/mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Katrin Fischer 2016-07-13 20:12:30 UTC
This seems like a step back to how the old system preference editor worked - having the choice separate from the sentence and at the end of each. The translation of the system preference file was designed to keep the strings in sequence, so you can 'see' the sentence strings together - but it doesn't allow to change the sequence of sentence parts.

I am not sure if this will work better in all possible scenarios and it will require translators to retranslate the whole file - and even more files if we decide to use this pattern for the other preferences as well. 

I'd like to get another translator's view on this.
Comment 11 Marc Véron 2016-07-13 20:27:54 UTC
(In reply to Katrin Fischer from comment #10)
> This seems like a step back to how the old system preference editor worked -
> having the choice separate from the sentence and at the end of each. The
> translation of the system preference file was designed to keep the strings
> in sequence, so you can 'see' the sentence strings together - but it doesn't
> allow to change the sequence of sentence parts.
> 
> I am not sure if this will work better in all possible scenarios and it will
> require translators to retranslate the whole file - and even more files if
> we decide to use this pattern for the other preferences as well. 
> 
> I'd like to get another translator's view on this.

Note: The problem with the sequence of the sentence parts is described in Bug 16669 - Options in pref.po should be expressed in %s to allow translatability:$

From bug description:
misc/translator/po/*-pref.po lacks translatability because the position of options are fixed.

For example, admin.pref#casAuthentication consists of three entries.
# CAS for login authentication.
# Don't use
# Use
It is used to construct the following sentence with a drop-down list.
 "[Don't use/Use] CAS for login authentication."
The Japanese translation of this would look like the following.
"CASをログイン認証に使用[しない/する]"
However, it is impossible to use this translation because the position of the drop-down list is fixed.
This could be solved by expressing options as %s and allow the translator to modify the position. The following is an example.
# %s CAS for login authentication.
Comment 12 Chris Cormack 2016-09-23 20:32:30 UTC
Created attachment 55788 [details] [review]
Bug 16687 - Translatability: Fix issues in Administration preferences

This patch fixes sentence splitting and other translation issues in
file koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
to avoid odd translations.

To test:
- Without patch, open Home > Administration > System preferences
  and go to tab 'Administration"
- Apply patch
- Open the same page in a new window and compare the text:
  - Verify  that no sentences are splitted
  - Verify that the text changes do not introduce misunderstandings
    and have the same meaning as without patch

Amended for comment #7 2016-07-12/mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 13 Chris Cormack 2016-09-23 20:33:08 UTC
Signed off, but still would like more translators to take a look before it goes through QA
Comment 14 Jonathan Druart 2016-09-28 08:14:20 UTC
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref

Looking at the diff, I don't understand why "- Note that this value has no effect if the UsageStats system preference is set to "Don't share""
have been removed.
Comment 15 Marc Véron 2016-09-28 13:09:07 UTC
Created attachment 55887 [details] [review]
Bug 16687 - Translatability: Fix issues in Administration preferences

This patch fixes sentence splitting and other translation issues in
file koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
to avoid odd translations.

To test:
- Without patch, open Home > Administration > System preferences
  and go to tab 'Administration"
- Apply patch
- Open the same page in a new window and compare the text:
  - Verify  that no sentences are splitted
  - Verify that the text changes do not introduce misunderstandings
    and have the same meaning as without patch

Amended for comment #7 2016-07-12/mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Rebased to apply on master and re-inserted test (see comment #14) -2016-09-28/mv
Comment 16 Michael Kuhn 2016-10-14 13:09:07 UTC
Created attachment 56525 [details] [review]
Bug 16687 - Translatability: Fix issues in Administration preferences

This patch fixes sentence splitting and other translation issues in
file koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
to avoid odd translations.

To test:
- Without patch, open Home > Administration > System preferences
  and go to tab 'Administration"
- Apply patch
- Open the same page in a new window and compare the text:
  - Verify  that no sentences are splitted
  - Verify that the text changes do not introduce misunderstandings
    and have the same meaning as without patch

Amended for comment #7 2016-07-12/mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Rebased to apply on master and re-inserted test (see comment #14) -2016-09-28/mv
Signed-off-by: Michael Kuhn <mik@adminkuhn.ch>
Comment 17 Katrin Fischer 2016-10-16 11:12:14 UTC
Still feels a bit like turning back time to me - in a less readable fashion. We used to have the pull down/options in a separate column and then the description next to it. But 3 sign-offs...
Comment 18 Katrin Fischer 2016-10-16 11:13:09 UTC
Created attachment 56569 [details] [review]
[PASSED QA] Bug 16687 - Translatability: Fix issues in Administration preferences

This patch fixes sentence splitting and other translation issues in
file koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref
to avoid odd translations.

To test:
- Without patch, open Home > Administration > System preferences
  and go to tab 'Administration"
- Apply patch
- Open the same page in a new window and compare the text:
  - Verify  that no sentences are splitted
  - Verify that the text changes do not introduce misunderstandings
    and have the same meaning as without patch

Amended for comment #7 2016-07-12/mv

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Rebased to apply on master and re-inserted test (see comment #14) -2016-09-28/mv
Signed-off-by: Michael Kuhn <mik@adminkuhn.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 19 Jonathan Druart 2016-10-18 07:35:50 UTC
I don't think this is the way to go.
Have a look at es-ES translations, they fixed this issue correctly.
Comment 20 Jonathan Druart 2016-10-18 08:03:38 UTC
Created attachment 56615 [details] [review]
[COUNTER-PATCH] Bug 16687: Translatability: Fix issues in Administration preferences

This is how I'd fix that issue, please give it a try.
Comment 21 Marc Véron 2016-10-18 08:13:08 UTC
(In reply to Jonathan Druart from comment #20)
> Created attachment 56615 [details] [review] [review]
> [COUNTER-PATCH] Bug 16687: Translatability: Fix issues in Administration
> preferences
> 
> This is how I'd fix that issue, please give it a try.

Hi Jonathan,

Thanks for the counter patch.

Can you please elaborate a little bit what your counter patch does?
How does it ease the problem with splitted sentences?

Marc
Comment 22 Jonathan Druart 2016-10-18 09:01:41 UTC
It removes the 'file.pref#prefname#' parts from the msgstr.
Comment 23 Marc Véron 2016-10-18 09:11:42 UTC
(In reply to Jonathan Druart from comment #22)
> It removes the 'file.pref#prefname#' parts from the msgstr.

How does it ease the problem with splitted sentences?
Comment 24 Jonathan Druart 2016-10-18 09:55:15 UTC
It won't, it just removes the strings I mentionned.
Comment 25 Marc Véron 2016-10-18 10:30:47 UTC
(In reply to Jonathan Druart from comment #24)
> It won't, it just removes the strings I mentionned.

But what I'm doing with the first patch is fixing sentence splitting. It is not related to wrong french translations , see comment #5

I think if you want to fix the problem mentionned by jmbroust (screenshot and comments #4 and #5), your patch should go to a separate bug.
Comment 26 Jonathan Druart 2016-10-18 11:46:48 UTC
ok, back to Passed QA.
Comment 27 Kyle M Hall 2016-10-21 15:08:22 UTC
Pushed to master for 16.11, thanks Marc!
Comment 28 Frédéric Demians 2016-10-22 13:10:25 UTC
Pushed in 16.05. Will be in 16.05.05.
Comment 29 Katrin Fischer 2016-10-22 14:53:26 UTC
This will force translators to retranslate all the prefs - why push it to a maintenance release?
Comment 30 Katrin Fischer 2016-10-22 14:54:33 UTC
More so with releasing at the same day - this means they will just be NOT translated at all. What happened to string freezes?
Comment 31 Frédéric Demians 2016-10-23 08:14:27 UTC
OK. You're correct. I can mark this bug as 'enhancement', and revert it from 16.05. Do you agree with this?
Comment 32 Frédéric Demians 2016-10-23 10:34:16 UTC
Done.