Bug 38727 - Improve the translatability of the patron categories administration page
Summary: Improve the translatability of the patron categories administration page
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 28924
Blocks:
  Show dependency treegraph
 
Reported: 2024-12-17 12:47 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2025-01-16 16:42 UTC (History)
4 users (show)

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


Attachments
Bug 38727: Improve translatability in categories.tt (4.16 KB, patch)
2024-12-17 13:00 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38727: Improve translatability in categories.tt (5.72 KB, patch)
2024-12-17 14:27 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38727: Improve translatability in categories.tt (5.76 KB, patch)
2025-01-02 23:22 UTC, David Nind
Details | Diff | Splinter Review
Bug 38727: Improve translatability in categories.tt (5.84 KB, patch)
2025-01-16 15:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38727: Add missing closing div (1.79 KB, patch)
2025-01-16 15:26 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2024-12-17 12:47:57 UTC
There are three strings that are more or less like this:

```
If set, this will override the global value set in the {preference} preference
```

They are built in a way that splits it into


* `If set, this will override the global value set in the`
* `preference`

At least in spanish, `preference` needs to be put in before `{preference}`:

`Si se define, tendrá precedencia sobre el valor global definido en la preferencia de sistema {preference}`

So (in the translation) we need to put a space or similar for `preference`. But it turns out this string is reused in many other places, so translating it correctly actually breaks translations in many places. I think (at least) other latin languages will suffer the same.

This is terrible and needs to get fixed.
Comment 1 Tomás Cohen Arazi (tcohen) 2024-12-17 13:00:50 UTC
Created attachment 175609 [details] [review]
Bug 38727: Improve translatability in categories.tt

This makes the strings easier to translated for maintaining them as a
whole instead of splitting them

Extra: it adds a missing dot for consistency.

To test:
1. In the categories edit page, check the 3 'If set...' texts
2. Apply this patch and reload
=> SUCCESS: No visual change
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2024-12-17 13:10:42 UTC
You should escape the result of a translation.
Comment 3 Tomás Cohen Arazi (tcohen) 2024-12-17 14:27:10 UTC
Created attachment 175619 [details] [review]
Bug 38727: Improve translatability in categories.tt

This makes the strings easier to translated for maintaining them as a
whole instead of splitting them

Bonus 1: it adds a missing dot for consistency.
Bonus 2: makes a string more idiomatic.

To test:
1. In the categories edit page, check the 3 'If set...' texts
2. Apply this patch and reload
=> SUCCESS: No visual change
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Tomás Cohen Arazi (tcohen) 2024-12-17 14:27:29 UTC
(In reply to Jonathan Druart from comment #2)
> You should escape the result of a translation.

Thanks for pointing me in that direction :-D
Comment 5 David Nind 2025-01-02 23:22:07 UTC
Created attachment 176107 [details] [review]
Bug 38727: Improve translatability in categories.tt

This makes the strings easier to translated for maintaining them as a
whole instead of splitting them

Bonus 1: it adds a missing dot for consistency.
Bonus 2: makes a string more idiomatic.

To test:
1. In the categories edit page, check the 3 'If set...' texts
2. Apply this patch and reload
=> SUCCESS: No visual change
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Jonathan Druart 2025-01-16 15:24:47 UTC
Still this one is ugly:

msgid ", holds placed by patrons of this category will not be given priority."

Because of the "If <i>Yes</i>"
Comment 7 Jonathan Druart 2025-01-16 15:25:59 UTC
Created attachment 176675 [details] [review]
Bug 38727: Improve translatability in categories.tt

This makes the strings easier to translated for maintaining them as a
whole instead of splitting them

Bonus 1: it adds a missing dot for consistency.
Bonus 2: makes a string more idiomatic.

To test:
1. In the categories edit page, check the 3 'If set...' texts
2. Apply this patch and reload
=> SUCCESS: No visual change
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2025-01-16 15:26:02 UTC
Created attachment 176676 [details] [review]
Bug 38727: Add missing closing div

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Katrin Fischer 2025-01-16 16:42:15 UTC
Pushed for 25.05!

Well done everyone, thank you!