Bug 41689 - "Staff note" and "OPAC" message types in patron files untranslatable
Summary: "Staff note" and "OPAC" message types in patron files untranslatable
Status: Pushed to main
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: 40367
Blocks:
  Show dependency treegraph
 
Reported: 2026-01-22 17:36 UTC by Caroline Cyr La Rose
Modified: 2026-02-06 22:22 UTC (History)
3 users (show)

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


Attachments
Bug 41689: Make patron message labels translatable (2.64 KB, patch)
2026-01-23 20:21 UTC, Ayoub Glizi-Vicioso
Details | Diff | Splinter Review
Bug 41689: Make patron message labels translatable (3.97 KB, patch)
2026-01-23 21:24 UTC, Ayoub Glizi-Vicioso
Details | Diff | Splinter Review
Bug 41689: Make patron message labels translatable (3.84 KB, patch)
2026-01-23 22:08 UTC, Ayoub Glizi-Vicioso
Details | Diff | Splinter Review
Bug 41689: Make patron message labels translatable (3.89 KB, patch)
2026-01-24 02:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 41689: Make patron message labels translatable (3.89 KB, patch)
2026-02-06 10:21 UTC, Katrin Fischer
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-01-22 17:36:21 UTC
The message types were added by bug 40367, but they are not translatable.

To recreate:
1. Go to a patron account > Add message
2. Add a message with "Staff - Internal note"
3. Add a second message with "OPAC - [Name]"
4. Add a language to your Koha
gulp po:update --lang fr-CA
./misc/translator/translate install fr-CA
Add the language in StaffInterfaceLanguages
5. Switch to the new language
6. Go to the patron's account
--> Staff note is in english
--> OPAC is in English (this is normal in fr-CA because we still call it OPAC even if it's an english term, but could be different in another language)
7. Check the translation files 
cd misc/translator/po/
git grep "Staff notes" fr-CA*
--> There is nothing from patron-messages.inc
Comment 1 Ayoub Glizi-Vicioso 2026-01-23 20:21:47 UTC Comment hidden (obsolete)
Comment 2 Ayoub Glizi-Vicioso 2026-01-23 21:24:41 UTC Comment hidden (obsolete)
Comment 3 Ayoub Glizi-Vicioso 2026-01-23 22:08:05 UTC Comment hidden (obsolete)
Comment 4 David Nind 2026-01-24 02:02:40 UTC
Created attachment 191998 [details] [review]
Bug 41689: Make patron message labels translatable

To Test:

BEFORE APPLYING PATCH:
1- Go to any patron account > Add message
2- Add a message for: "Staff - Internal note"
3- Add a second message for: "OPAC - [NAME OF THE PATRON SELECTED]"

4- Add any language (I'll use french-Canada, fr-CA, in this case):
From your koha instance, enter on the command line:
./misc/translator/translate install fr-CA

5- Go to Administration > System preferences > enter language
6- Make sure to check 'Français (fr-CA)' box from the 'StaffInterfaceLanguages'preference and save.

7- Go back to the specific patron in which you added the messages
8- Switch language to 'Français' (bottom left corner)

9- Notice that:
--> 'OPAC' is still the same (Since we spell OPAC the same way in both english and french. However, it might not be the case in other languages).
--> 'Staff note' is not translated.

10- apply patch

AFTER APPLYING PATCH:

11 - From you koha instance, enter on the command line:

./misc/translator/translate update fr-CA

./misc/translator/translate install fr-CA

12- Reload patron's page

13- Notice that 'Staff note' is now translated
** You should see this output: 'Note interne'

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2026-02-06 10:20:52 UTC
1) QA checks - fail for tidy, but fixed

Processing files
[RUNNING] koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
[FAIL] koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc

Result:
[FAIL] koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc
   FAIL	  tidiness
		File is not tidy, please run `perl misc/devel/tidy.pl koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc`

Processing additional checks PASS!

Please check your setup, the tidy should happen automatically :)

I tidied and amended the patch, it was only a one line whitespace change.
Comment 6 Katrin Fischer 2026-02-06 10:21:25 UTC
Created attachment 192599 [details] [review]
Bug 41689: Make patron message labels translatable

To Test:

BEFORE APPLYING PATCH:
1- Go to any patron account > Add message
2- Add a message for: "Staff - Internal note"
3- Add a second message for: "OPAC - [NAME OF THE PATRON SELECTED]"

4- Add any language (I'll use french-Canada, fr-CA, in this case):
From your koha instance, enter on the command line:
./misc/translator/translate install fr-CA

5- Go to Administration > System preferences > enter language
6- Make sure to check 'Français (fr-CA)' box from the 'StaffInterfaceLanguages'preference and save.

7- Go back to the specific patron in which you added the messages
8- Switch language to 'Français' (bottom left corner)

9- Notice that:
--> 'OPAC' is still the same (Since we spell OPAC the same way in both english and french. However, it might not be the case in other languages).
--> 'Staff note' is not translated.

10- apply patch

AFTER APPLYING PATCH:

11 - From you koha instance, enter on the command line:

./misc/translator/translate update fr-CA

./misc/translator/translate install fr-CA

12- Reload patron's page

13- Notice that 'Staff note' is now translated
** You should see this output: 'Note interne'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 7 Lucas Gass (lukeg) 2026-02-06 22:22:06 UTC
Nice work everyone!

Pushed to main for 26.05