Bug 41088 - Fix translatability for "Add new" and "Remove this" in vue
Summary: Fix translatability for "Add new" and "Remove this" in vue
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Matt Blenkinsop
URL:
Keywords: rel_25_11_candidate, RM_priority
Depends on: 38010 38201
Blocks: 41357
  Show dependency treegraph
 
Reported: 2025-10-23 14:26 UTC by Caroline Cyr La Rose
Modified: 2025-12-02 15:10 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 41088: (bug 38201 follow-up) Fix I18N for relationships (15.90 KB, patch)
2025-11-14 10:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41088: (bug 38201 follow-up) Fix I18N for relationships (15.95 KB, patch)
2025-11-22 22:06 UTC, OpenFifth Sandboxes
Details | Diff | Splinter Review
Bug 41088: (bug 38201 follow-up) Fix I18N for relationships (16.02 KB, patch)
2025-11-24 10:26 UTC, Matt Blenkinsop
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-10-23 14:26:41 UTC
The "Add new %s" in the translation files for vue files is nice and reusable in English, but it doesn't work in French because the "new" word and the determinant will change depending on what the new thing is. 

In the new vendors page, there is 
- Add new alias
- Add new contract
- Add new interface

These need all to be translated differently
- Ajouter un nouvel alias (alias is masculine but start with a vowel, un nouvel)
- Ajouter un nouveau contrat (contrat is masculine, un nouveau)
- Ajouter une nouvelle interface (interface is feminine, une nouvelle)

We need to have one string per new thing.

I suspect it's the same for the "Remove this %s" string.
Comment 1 Caroline Cyr La Rose 2025-10-23 14:31:27 UTC
I would have tried to add context, but it's in a widget by itself.
Comment 2 Katrin Fischer 2025-11-05 19:37:33 UTC
I have updated the bug description, because adding context won't solve the problem here as in other spots. We need those to be separate strings. I am also pondering updating severity.

* "new" would have to be changed depending on the word that follows in German too. It's neuer Provider, but neue Bibliothek etc. 
* There are language that need the adjective after the substantive. This way of coding doesn't allow to move the placeholder.


For the translations it's almost always bad to put sentences together like this, splitting the strings. It almost always creates problems with translations for one language or the other. Please avoid.
Comment 3 Jonathan Druart 2025-11-06 07:55:30 UTC
Same for "There are no %s created yet"
Comment 4 Jonathan Druart 2025-11-14 10:11:26 UTC
Created attachment 189583 [details] [review]
Bug 41088: (bug 38201 follow-up) Fix I18N for relationships

"Add new x", "Remove this x" and "There are no x created yet" were not
translatable correctly.

Test plan:
Add a new agreement, then a new title, and confirm that the 3 strings
are correctly displayed.
Then try to update .po files, translate the strings, and install the
translations and confirm that the strings are correctly translated when
using a translated interface.
Comment 5 Katrin Fischer 2025-11-14 19:55:49 UTC
Thanks Joubu!

Just a note as I saw you removed these lines (which is good):

-                            namePlural: $__("licenses"),

This is bad because there are languages with more than one plural form depending on the number or if 0. Our translation tools can deal with it, but only if they are used :)
Comment 6 Katrin Fischer 2025-11-22 20:43:23 UTC
I can't get into my ktd while travelling - maybe someone would like to work on this with me?
Comment 7 OpenFifth Sandboxes 2025-11-22 22:06:42 UTC
Created attachment 189896 [details] [review]
Bug 41088: (bug 38201 follow-up) Fix I18N for relationships

"Add new x", "Remove this x" and "There are no x created yet" were not
translatable correctly.

Test plan:
Add a new agreement, then a new title, and confirm that the 3 strings
are correctly displayed.
Then try to update .po files, translate the strings, and install the
translations and confirm that the strings are correctly translated when
using a translated interface.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 8 Matt Blenkinsop 2025-11-24 10:26:37 UTC
Created attachment 189907 [details] [review]
Bug 41088: (bug 38201 follow-up) Fix I18N for relationships

"Add new x", "Remove this x" and "There are no x created yet" were not
translatable correctly.

Test plan:
Add a new agreement, then a new title, and confirm that the 3 strings
are correctly displayed.
Then try to update .po files, translate the strings, and install the
translations and confirm that the strings are correctly translated when
using a translated interface.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Comment 9 Lucas Gass (lukeg) 2025-11-26 17:45:20 UTC
Nice work everyone!

Pushed to main for 25.11