[Bug 37926] New: Bookings - "to" untranslatable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Bug ID: 37926 Summary: Bookings - "to" untranslatable Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com When placing a booking, where we choose the dates of the booking, the "to" between the two dates is not translatable. To get there: 1. In a detailed record, click on the Items tab on the left 2. Where it says Bookable, choose Yes and click Update 3. Click Place booking 4. Find and select a patron to enable the other fields 5. Under Booking dates, choose two dates --> Dates are displayed as date1 to date2 6. Translate the interface gulp po:update --lang fr-CA ./misc/translator/translate update fr-CA 7. In the system preference StaffInterfaceLanguage, select the other language and click Save all I18N/L10N preferences 8. Change the interface in the other language 9. Redo steps 3 to 5 --> Dates are still displayed as date1 to date2 I searched the various po files, but I didn't take the time to check all occurrences of "to", obviously. I mostly searched for "%s to %s" and modals/place_booking.inc. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | Severity|enhancement |normal Status|NEW |ASSIGNED CC| |f.demians@tamil.fr, | |jonathan.druart@gmail.com Component|Circulation |I18N/L10N -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183096|0 |1 is obsolete| | --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183096&action=edit Bug 37926: Allow for translation of "to" in date range selection Bug 37926: Allow for translation of "to" in date range selection When a calendar widget has been initiated as a date range selector (as it is when creating a new booking), the selected dates are added to the input field as "0000-00-00 to 0000-00-00". This "to" needs to be translatable. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update --lang fr-FR cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from intranet-tmpl/prog/js/calendar.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144 msgctxt "As in, from date1 to date2" msgid "to" msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR - In the staff interface, locate an bibliographic record with items and change the "Bookable" option from the item details screen. - Switch to your updated translation in the staff interface. - Click the "Place booking" button. - Fill out all the fields in the "Place booking" modal. - After you select a date range, the "Booking dates" input field should show your translated text. Sponsored-by: Athens County Public Libraries --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183129 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183129&action=edit Bug 37926: Allow for translation of "to" in date range selection When a calendar widget has been initiated as a date range selector (as it is when creating a new booking), the selected dates are added to the input field as "0000-00-00 to 0000-00-00". This "to" needs to be translatable. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update --lang fr-FR cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from intranet-tmpl/prog/js/calendar.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144 msgctxt "As in, from date1 to date2" msgid "to" msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR - In the staff interface, locate an bibliographic record with items and change the "Bookable" option from the item details screen. - Switch to your updated translation in the staff interface. - Click the "Place booking" button. - Fill out all the fields in the "Place booking" modal. - After you select a date range, the "Booking dates" input field should show your translated text. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 David Flater <flaterdavid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183129|0 |1 is obsolete| | --- Comment #3 from David Flater <flaterdavid@gmail.com> --- Created attachment 183216 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183216&action=edit Bug 37926: Allow for translation of "to" in date range selection When a calendar widget has been initiated as a date range selector (as it is when creating a new booking), the selected dates are added to the input field as "0000-00-00 to 0000-00-00". This "to" needs to be translatable. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update --lang fr-FR cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from intranet-tmpl/prog/js/calendar.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144 msgctxt "As in, from date1 to date2" msgid "to" msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR - In the staff interface, locate an bibliographic record with items and change the "Bookable" option from the item details screen. - Switch to your updated translation in the staff interface. - Click the "Place booking" button. - Fill out all the fields in the "Place booking" modal. - After you select a date range, the "Booking dates" input field should show your translated text. Sponsored-by: Athens County Public Libraries Signed-off-by: David Flater <flaterdavid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 David Flater <flaterdavid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |flaterdavid@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Hi Owen, How is this __p call supposed to work: + " " + __p("As in, from date1 to date2", "to") + " "; The As in.. is provided as context? How does that match work? How should the translation file look ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> ---
- Locate strings pulled from intranet-tmpl/prog/js/calendar.js for translation, e.g.:
#: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144 msgctxt "As in, from date1 to date2" msgid "to" msgstr ""
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Owen Leonard from comment #5)
- Locate strings pulled from intranet-tmpl/prog/js/calendar.js for translation, e.g.:
#: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144 msgctxt "As in, from date1 to date2" msgid "to" msgstr ""
Ok, thanks. So if someone wants to use this translation on another page in a date range context, he should know that he needs to add this specific context string "As in, from date1 to date2". As the use of these context translations increases, we will probably need some more direction on how to formulate them for efficient use. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183216|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 185087 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185087&action=edit Bug 37926: Allow for translation of "to" in date range selection When a calendar widget has been initiated as a date range selector (as it is when creating a new booking), the selected dates are added to the input field as "0000-00-00 to 0000-00-00". This "to" needs to be translatable. To test, apply the patch and test that the correct strings are translatable. In this example I'm testing fr-FR: - Update a translation:
gulp po:update --lang fr-FR cd misc/translator perl translate update fr-FR
- Open the corresponding .po file for the strings pulled from JavaScript e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from intranet-tmpl/prog/js/calendar.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/calendar.js:144 msgctxt "As in, from date1 to date2" msgid "to" msgstr "" - Edit the "msgstr" string however you want (it's just for testing) - Install the updated translation: > perl translate install fr-FR - In the staff interface, locate an bibliographic record with items and change the "Bookable" option from the item details screen. - Switch to your updated translation in the staff interface. - Click the "Place booking" button. - Fill out all the fields in the "Place booking" modal. - After you select a date range, the "Booking dates" input field should show your translated text. Sponsored-by: Athens County Public Libraries Signed-off-by: David Flater <flaterdavid@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 --- Comment #9 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Pushed to oldstable Version(s)|25.11.00,25.05.04 |25.11.00,25.05.04,24.11.10 released in| | --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37926 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #11 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org