Bug 41769 - ", by" in suggestions is untranslatable
Summary: ", by" in suggestions is untranslatable
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Ayoub Glizi-Vicioso
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 33430
Blocks:
  Show dependency treegraph
 
Reported: 2026-02-04 16:13 UTC by Caroline Cyr La Rose
Modified: 2026-02-06 10:16 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:
Circulation function:


Attachments
Bug 41769: Make ', by' string translatable in suggestions (2.47 KB, patch)
2026-02-05 19:08 UTC, Ayoub Glizi-Vicioso
Details | Diff | Splinter Review
Bug 41769: Make ', by' string translatable in suggestions (2.52 KB, patch)
2026-02-05 20:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 41769: Make ', by' string translatable in suggestions (2.63 KB, patch)
2026-02-05 20:14 UTC, Ayoub Glizi-Vicioso
Details | Diff | Splinter Review
Bug 41769: Make ', by' string translatable in suggestions (2.69 KB, patch)
2026-02-06 04:56 UTC, OpenFifth Sandboxes
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 2026-02-04 16:13:01 UTC
When viewing purchase suggestions in the staff interface, a ", by" is added between the title and the author. This was translatable in 24.05, but several of our clients noticed it was not translated in 25.05 when we upgraded them. I cannot find the string in Weblate for this.

The code changed in 25.05 with bug 33430.

To recreate:
1. Add another language to Koha

./misc/translator/translate install fr-CA

2. Enable the new language in StaffInterfaceLanguages
   2.1. Go to Administration > System preferences
   2.2. Search for StaffInterfaceLanguages
   2.3. Check the new language
   2.4. Click Save all I18N/L10N preferences

3. Create a new purchase suggestion
   3.1. Go to More > Suggestions
   3.2. Click New purchase suggestion
   3.3. Fill out the title AND the author at least
   3.4. Click Submit your suggestion

4. View the suggestion in the table
   --> It says title, by author

5. Switch language
   --> The ", by" is still in English

6. Search the .po files for ", by"

grep -B 3 ", by" misc/translator/po/fr-CA*

--> Nothing in suggestion.tt
Comment 1 Ayoub Glizi-Vicioso 2026-02-05 19:08:06 UTC Comment hidden (obsolete)
Comment 2 David Nind 2026-02-05 20:07:03 UTC
Created attachment 192545 [details] [review]
Bug 41769: Make ', by' string translatable in suggestions

To test:

1. Add another language to Koha

./misc/translator/translate install fr-CA

2. Enable the new language in StaffInterfaceLanguages
   2.1. Go to Administration > System preferences
   2.2. Search for StaffInterfaceLanguages
   2.3. Check the new language
   2.4. Click Save all I18N/L10N preferences

3. Create a new purchase suggestion
   3.1. Go to More > Suggestions
   3.2. Click New purchase suggestion
   3.3. Fill out the title AND the author at least
   3.4. Click Submit your suggestion

4. View the suggestion in the table
   --> It says title, by author

5. Switch language
   --> The ", by" is still in English

6. Apply patch.

7. Reload page.

8. Notice that ", by" is now translated.
    --> in this instance, you will see ", par"

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2026-02-05 20:08:53 UTC
Testing notes (using KTD):

1. After applying the patch you need to update the translation (this worked for me, not sure if both steps required):
   . ./misc/translator/translate update fr-CA
   . ./misc/translator/translate install fr-CA
Comment 4 Ayoub Glizi-Vicioso 2026-02-05 20:12:44 UTC
(In reply to David Nind from comment #3)
> Testing notes (using KTD):
> 
> 1. After applying the patch you need to update the translation (this worked
> for me, not sure if both steps required):
>    . ./misc/translator/translate update fr-CA
>    . ./misc/translator/translate install fr-CA

Yes indeed, i forgot to specify.
Comment 5 Ayoub Glizi-Vicioso 2026-02-05 20:14:09 UTC
Created attachment 192546 [details] [review]
Bug 41769: Make ', by' string translatable in suggestions

To test:

1. Add another language to Koha

./misc/translator/translate install fr-CA

2. Enable the new language in StaffInterfaceLanguages
   2.1. Go to Administration > System preferences
   2.2. Search for StaffInterfaceLanguages
   2.3. Check the new language
   2.4. Click Save all I18N/L10N preferences

3. Create a new purchase suggestion
   3.1. Go to More > Suggestions
   3.2. Click New purchase suggestion
   3.3. Fill out the title AND the author at least
   3.4. Click Submit your suggestion

4. View the suggestion in the table
   --> It says title, by author

5. Switch language
   --> The ", by" is still in English

6. Apply patch.

7. run those command:
    --> ./misc/translator/translate update fr-CA
    --> ./misc/translator/translate install fr-CA

8. Reload page.

9. Notice that ", by" is now translated.
    --> in this instance, you will see ", par"

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2026-02-05 20:17:36 UTC
(In reply to Ayoub Glizi-Vicioso from comment #4)
> (In reply to David Nind from comment #3)
> > Testing notes (using KTD):
> > 
> > 1. After applying the patch you need to update the translation (this worked
> > for me, not sure if both steps required):
> >    . ./misc/translator/translate update fr-CA
> >    . ./misc/translator/translate install fr-CA
> 
> Yes indeed, i forgot to specify.

No problem! 8-)
Comment 7 OpenFifth Sandboxes 2026-02-06 04:56:22 UTC
Created attachment 192579 [details] [review]
Bug 41769: Make ', by' string translatable in suggestions

To test:

1. Add another language to Koha

./misc/translator/translate install fr-CA

2. Enable the new language in StaffInterfaceLanguages
   2.1. Go to Administration > System preferences
   2.2. Search for StaffInterfaceLanguages
   2.3. Check the new language
   2.4. Click Save all I18N/L10N preferences

3. Create a new purchase suggestion
   3.1. Go to More > Suggestions
   3.2. Click New purchase suggestion
   3.3. Fill out the title AND the author at least
   3.4. Click Submit your suggestion

4. View the suggestion in the table
   --> It says title, by author

5. Switch language
   --> The ", by" is still in English

6. Apply patch.

7. run those command:
    --> ./misc/translator/translate update fr-CA
    --> ./misc/translator/translate install fr-CA

8. Reload page.

9. Notice that ", by" is now translated.
    --> in this instance, you will see ", par"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Ray Delahunty <Raymund.delahunty@outlook.com>
Comment 8 Ray Delahunty 2026-02-06 05:03:43 UTC
Whether my signoff is valid or not is for others to decide, as I only used a sandbox, not this KTD. (Reading and learning about the KTD is on this weekend's 'to do list'). Rather than run the update of the already installed language pack, I ran patch in the sandbox and then installed the language, and 'by' was 'von' for the DE language option.
Comment 9 Katrin Fischer 2026-02-06 10:16:50 UTC
I believe this works, but I wonder about the empty parameters:

node += _("%s%s, by %s%s").format("", "", row.author.escapeHtml(), "")

Why the additional %s?
Why not:

node += _(", by %s").format(row.author.escapeHtml())