Bug 38166 - Core status graph strings should be translatable
Summary: Core status graph strings should be translatable
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Pedro Amorim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-14 14:45 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2024-12-05 22:11 UTC (History)
5 users (show)

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


Attachments
Bug 38166: Make core status graph strings translatable (7.67 KB, patch)
2024-10-14 15:09 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38166: Make core status graph strings translatable (7.73 KB, patch)
2024-11-05 16:12 UTC, Pedro Amorim
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-10-14 14:45:20 UTC
The ILL core status graph contains many strings that are then displayed in buttons and also on the ILL requests table (Request status)
Comment 1 Tomás Cohen Arazi (tcohen) 2024-10-14 15:09:04 UTC
Created attachment 172736 [details] [review]
Bug 38166: Make core status graph strings translatable

This patch makes several strings translatable. I usually dealth with
this by adding my statuses like `NEW` to the status graph shippped by
the backend I was working with, and solved the translation step inside
of the plugin itself.

But really, the core status graph should be translatable so core
backends (like the to-be FreeForm) and backend authors can rest assured
they only need to care about their custom statuses.

To test:
1. Make sure you have 35570 applied so it is easier to test
2. Enable the ILLModule syspref.
3. Install a language you're familiar with. I pick es-ES for the sake of
   this testing steps to be readable:
   $ ktd --shell
  k$ koha-translate --install es-ES --dev kohadev && restart_all
4. Enable (language sysprefs) and switch to your language (click at the
   left bottom on the language name).
5. Create a new ILL request
=> FAIL: Notice some buttons are not in your language
6. Jump to the ILL requests list
=> FAIL: The status displays as 'New request'
7. Apply this patch
8. Generate the translation entries for the core status graph strings:
  k$ gulp po:extract
  k$ gulp po:update # I had to run it twice to complete, unrelated error
9. Edit the relevant -messages.po file. In my case:
  k$ vim misc/translator/po/es-ES-messages.po
Note: it is easier on VScode which shows you the changed lines in colors
on the scroll bar. The idea is to find the new strings that relate to
Koha::ILL::Request and translate them
10. Translate the strings that relate to this patch (at least 'New
    request' and some of the buttons in the ILL request detail).
11. Install the new translations:
  k$ koha-translate --update es-ES --dev kohadev && restart_all
12. Refresh the ILL requests list
=> SUCCESS: The request status is translated!
13. Manage the ILL request
=> SUCCESS: The buttons you translated, are translated!!
14. Sign off :-D
15. Grant tcohen some cookies next time

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Pedro Amorim 2024-11-05 15:37:02 UTC
Looking here
Comment 3 Pedro Amorim 2024-11-05 16:12:13 UTC
Created attachment 173986 [details] [review]
Bug 38166: Make core status graph strings translatable

This patch makes several strings translatable. I usually dealth with
this by adding my statuses like `NEW` to the status graph shippped by
the backend I was working with, and solved the translation step inside
of the plugin itself.

But really, the core status graph should be translatable so core
backends (like the to-be FreeForm) and backend authors can rest assured
they only need to care about their custom statuses.

To test:
1. Make sure you have 35570 applied so it is easier to test
2. Enable the ILLModule syspref.
3. Install a language you're familiar with. I pick es-ES for the sake of
   this testing steps to be readable:
   $ ktd --shell
  k$ koha-translate --install es-ES --dev kohadev && restart_all
4. Enable (language sysprefs) and switch to your language (click at the
   left bottom on the language name).
5. Create a new ILL request
=> FAIL: Notice some buttons are not in your language
6. Jump to the ILL requests list
=> FAIL: The status displays as 'New request'
7. Apply this patch
8. Generate the translation entries for the core status graph strings:
  k$ gulp po:extract
  k$ gulp po:update # I had to run it twice to complete, unrelated error
9. Edit the relevant -messages.po file. In my case:
  k$ vim misc/translator/po/es-ES-messages.po
Note: it is easier on VScode which shows you the changed lines in colors
on the scroll bar. The idea is to find the new strings that relate to
Koha::ILL::Request and translate them
10. Translate the strings that relate to this patch (at least 'New
    request' and some of the buttons in the ILL request detail).
11. Install the new translations:
  k$ koha-translate --update es-ES --dev kohadev && restart_all
12. Refresh the ILL requests list
=> SUCCESS: The request status is translated!
13. Manage the ILL request
=> SUCCESS: The buttons you translated, are translated!!
14. Sign off :-D
15. Grant tcohen some cookies next time

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Pedro Amorim 2024-11-05 16:12:28 UTC
Putting this to PQA.
Comment 5 Katrin Fischer 2024-11-08 15:35:07 UTC
Just love fixes like this :)
Comment 6 Katrin Fischer 2024-11-08 15:44:47 UTC
Pushed for 24.11!

Well done everyone, thank you!