Bug 38147

Summary: Edit button in bookings untranslatable
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: I18N/L10NAssignee: Jonathan Druart <jonathan.druart>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, f.demians, jonathan.druart, marie.hedbom
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on:    
Bug Blocks: 38217    
Attachments: Bug 38147: Fix Edit and Cancel translatability in booking table
Bug 38147: Fix Edit and Cancel translatability in booking table

Description Caroline Cyr La Rose 2024-10-10 21:09:06 UTC
I can't find where to translate the "Edit" button in the bookings page. In Weblate, I tried looking through all the strings with the location "bookings", and I can't find it.

https://translate.koha-community.org/search/koha/main/-/fr_CA/?q=+location%3Abookings+&sort_by=-priority%2Cposition&checksum=

To get there:
1. In the staff interface, go to a biblio record
2. Click 'Items' in the left side menu
3. Choose Bookable: Yes and Update
4. Click 'Place booking'
5. Fill out the form and Submit
6. Click 'Bookings' in the left side menu
   --> Edit button in the table at the bottom

7. Install new language
   
   ./misc/translate/install fr-CA

8. Enable the new language in the StaffInterfaceLanguages system preference
9. Change the interface to the new language
10. View the bookings page
    --> Edit button is in English

11. Check the .po files for bookings locations
    --> No "Edit" string with "/bookings" location
Comment 1 Jonathan Druart 2024-10-15 12:18:19 UTC
Created attachment 172769 [details] [review]
Bug 38147: Fix Edit and Cancel translatability in booking table

No idea why they are not picked by the translator script, but this patch is
fixing the problem.

See comment 0 for a test plan.
Comment 2 David Nind 2024-10-20 20:55:55 UTC
I can't figure out how to update the language files - I thought I had it worked out! This is what I did, but the "Edit" action is still "Edit":

1. Install a language:
   1.1 koha-translate --install fr-CA --dev kohadev
   1.2 restart_all
   1.3 Enable the language: Administration > System preferences > I18N/L10N > StaffInterfaceLanguages > select the language you want to enable
   1.4 Choose the language from the staff interface footer
   
2. Apply the patch.

3. Update the language with the string changes:
   3.1 gulp po:update --lang fr-CA
   3.2 koha-translate --update fr-CA --dev kohadev
   3.3 restart_all

I must be missing a step somewhere!
Comment 3 Jonathan Druart 2024-10-21 08:27:49 UTC
Created attachment 173013 [details] [review]
Bug 38147: Fix Edit and Cancel translatability in booking table

It seems that "Edit" was not picked by the translator script because there was a TT tag
on the same line.

See comment 0 for a test plan.
Comment 4 David Nind 2024-10-21 10:02:24 UTC
After the patch, this is now working for the "Edit" action - it is now "Modifier".

However, after the patch the "Cancel" action, which was previously "Annuler" is now "Cancel" when Français is set as the language.