Bug 33533

Summary: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: I18N/L10NAssignee: Caroline Cyr La Rose <caroline.cyr-la-rose>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: caroline.cyr-la-rose, f.demians, lucas
Version: unspecified   
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:
23.05.00,22.11.06
Attachments: Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt

Description Caroline Cyr La Rose 2023-04-13 18:50:17 UTC
In memberentrygen.tt, there is a condition to show either "Patron identity" or "Organization identity" in the patron form. These three words, "Patron", "Organization", and "identity" were separated in different spans. 

However, in French at least, we have to invert the order of the words otherwise it doesn't make sense. So "Patron identity" becomes "Identité de l'utilisateur" ("Identity of patron"). Right now, it is translated as "Utilisateur identité" which doesn't mean anything and looks like it was translated directly from English :)

This whole condition should be kept together, with %s to separate the elements so that we can move them around.

<legend id="identity_lgd">[% IF ( I ) %]<span>Organization</span> [% ELSE %]<span>Patron</span> [% END %]<span>identity</span></legend>
Comment 1 Caroline Cyr La Rose 2023-04-13 19:01:10 UTC
Created attachment 149623 [details] [review]
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt

This patch corrects the HTML markup in order to reunite "Patron
identity" or "Organization identity" for translatability.

To test:
1. Apply patch
2. Update translation files
./misc/translator/translate update xx-XX
3. Check the xx-XX-staff-prog.po file, the line for memberentrygen.tt:275
   should look like

\#: koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:275
\#, c-format
msgid "Organization %sPatron %sidentity"
msgstr "Identité de l'organisme %sIdentité de l'utilisateur %s"

4. Optionally, translate the string, install translation and check the
   page (Patrons > New patron), trying a institutional patron and a
   regular patron
./misc/translator/translate install xx-XX
Comment 2 Lucas Gass 2023-04-14 15:09:08 UTC
Created attachment 149693 [details] [review]
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt

This patch corrects the HTML markup in order to reunite "Patron
identity" or "Organization identity" for translatability.

To test:
1. Apply patch
2. Update translation files
./misc/translator/translate update xx-XX
3. Check the xx-XX-staff-prog.po file, the line for memberentrygen.tt:275
   should look like

\#: koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:275
\#, c-format
msgid "Organization %sPatron %sidentity"
msgstr "Identité de l'organisme %sIdentité de l'utilisateur %s"

4. Optionally, translate the string, install translation and check the
   page (Patrons > New patron), trying a institutional patron and a
   regular patron
./misc/translator/translate install xx-XX

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Katrin Fischer 2023-04-15 21:03:47 UTC
Thx for the patch Caroline - this one has been annoying me forever!
Comment 4 Katrin Fischer 2023-04-15 21:05:03 UTC
Created attachment 149712 [details] [review]
Bug 33533: Translatability: Do not separate "Patron" or "Organization" and "identity" in memberentrygen.tt

This patch corrects the HTML markup in order to reunite "Patron
identity" or "Organization identity" for translatability.

To test:
1. Apply patch
2. Update translation files
./misc/translator/translate update xx-XX
3. Check the xx-XX-staff-prog.po file, the line for memberentrygen.tt:275
   should look like

\#: koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:275
\#, c-format
msgid "Organization %sPatron %sidentity"
msgstr "Identité de l'organisme %sIdentité de l'utilisateur %s"

4. Optionally, translate the string, install translation and check the
   page (Patrons > New patron), trying a institutional patron and a
   regular patron
./misc/translator/translate install xx-XX

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2023-04-19 12:22:26 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Jacob O'Mara 2023-05-09 20:52:49 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 7 Lucas Gass 2023-05-15 21:04:57 UTC
Doesn't apply cleanly to 22.05.x, no backport.