Bug 34079

Summary: The phrase "Displaying [all|approved|pending|rejected] terms" was separated
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: I18N/L10NAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, fridolin.somers, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34081
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.10
Circulation function:
Attachments: Bug 34079 - The phrase "Displaying [all|approved|pending|rejected] terms" was separated
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated

Description Caroline Cyr La Rose 2023-06-21 14:17:54 UTC
The phrase "Displaying [all|approved|pending|rejected] terms" was cut into individual words by bug 30733. However, in French, we need to be able to change the sentence structure (it would become something like "Displaying terms [all|approved|pending|rejected]").
Comment 1 Caroline Cyr La Rose 2023-06-21 14:26:03 UTC
Created attachment 152523 [details] [review]
Bug 34079 - The phrase "Displaying [all|approved|pending|rejected] terms" was separated

This patch reunites the words for the sentence "Displaying
[all|approved|pending|rejected] terms" in order to facilitate
translating in languages that have a different syntax.

To test:
1. Install a new language

   ./misc/translator/translate install xx-XX

2. Check the xx-XX-staff-prog.po file for the sentence
   --> All the words are individual strings

3. Apply patch

4. Update the po files

   ./misc/translator/translate update xx-XX

5. Check the xx-XX-staff-prog.po file again
   --> The sentence is reunited
Comment 2 Fridolin Somers 2023-06-21 14:45:46 UTC
Tricky indeed.

In my opinion, we should use the all phrase to have context and no %s :

<h4>
[% IF ( filter_approved_all ) %]<span>Displaying all terms</span>[% END %]
[% IF ( filter_approved_ok ) %]<span>Displaying approved terms</span>[% END %]
[% IF ( filter_approved_pending ) %]<span>Displaying pending terms</span>[% END %]
[% IF ( filter_approved_rej ) %]<span>Displaying rejected terms</span>[% END %]
</h4>
Comment 3 Caroline Cyr La Rose 2023-06-21 15:01:52 UTC
Created attachment 152527 [details] [review]
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated

This patch reunites the words for the sentence "Displaying
[all|approved|pending|rejected] terms" in order to facilitate
translating in languages that have a different syntax.

To test:
1. Install a new language

   ./misc/translator/translate install xx-XX

2. Check the xx-XX-staff-prog.po file for the sentence
   --> All the words are individual strings

3. Apply patch

4. Update the po files

   ./misc/translator/translate update xx-XX

5. Check the xx-XX-staff-prog.po file again
   --> The sentence is reunited for each status (Displaying all terms,
Displaying approved terms, etc.)
Comment 4 Caroline Cyr La Rose 2023-06-21 15:02:22 UTC
(In reply to Fridolin Somers from comment #2)
> Tricky indeed.
> 
> In my opinion, we should use the all phrase to have context and no %s :
> 
> <h4>
> [% IF ( filter_approved_all ) %]<span>Displaying all terms</span>[% END %]
> [% IF ( filter_approved_ok ) %]<span>Displaying approved terms</span>[% END
> %]
> [% IF ( filter_approved_pending ) %]<span>Displaying pending terms</span>[%
> END %]
> [% IF ( filter_approved_rej ) %]<span>Displaying rejected terms</span>[% END
> %]
> </h4>

Even better!

I redid the patch.
Comment 5 Owen Leonard 2023-06-22 11:33:56 UTC
Created attachment 152553 [details] [review]
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated

This patch reunites the words for the sentence "Displaying
[all|approved|pending|rejected] terms" in order to facilitate
translating in languages that have a different syntax.

To test:
1. Install a new language

   ./misc/translator/translate install xx-XX

2. Check the xx-XX-staff-prog.po file for the sentence
   --> All the words are individual strings

3. Apply patch

4. Update the po files

   ./misc/translator/translate update xx-XX

5. Check the xx-XX-staff-prog.po file again
   --> The sentence is reunited for each status (Displaying all terms,
       Displaying approved terms, etc.)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Martin Renvoize (ashimema) 2023-09-11 11:00:14 UTC
Created attachment 155475 [details] [review]
Bug 34079: The phrase "Displaying [all|approved|pending|rejected] terms" was separated

This patch reunites the words for the sentence "Displaying
[all|approved|pending|rejected] terms" in order to facilitate
translating in languages that have a different syntax.

To test:
1. Install a new language

   ./misc/translator/translate install xx-XX

2. Check the xx-XX-staff-prog.po file for the sentence
   --> All the words are individual strings

3. Apply patch

4. Update the po files

   ./misc/translator/translate update xx-XX

5. Check the xx-XX-staff-prog.po file again
   --> The sentence is reunited for each status (Displaying all terms,
       Displaying approved terms, etc.)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2023-09-11 11:00:40 UTC
Simple working patch, passing QA
Comment 8 Tomás Cohen Arazi (tcohen) 2023-09-12 12:43:19 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-09-14 18:16:38 UTC
Pushed to 23.05.x for 23.05.04
Comment 10 Matt Blenkinsop 2023-09-15 10:21:44 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x