The ILL core status graph contains many strings that are then displayed in buttons and also on the ILL requests table (Request status)
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>
Looking here
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>
Putting this to PQA.
Just love fixes like this :)
Pushed for 24.11! Well done everyone, thank you!