Summary: | Move translatable strings out of catalog-strings.inc into catalog.js | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | I18N/L10N | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | f.demians, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00
|
|
Circulation function: | |||
Bug Depends on: | 21156 | ||
Bug Blocks: | |||
Attachments: |
Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js
Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js |
Description
Owen Leonard
2020-09-11 19:38:07 UTC
*** Bug 26446 has been marked as a duplicate of this bug. *** Created attachment 110410 [details] [review] Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js This patch moves translatable strings out of catalog-strings.inc into catalog.js, wrapped in the double-underscore function for translation. To test that each affected string correctly appears in the interface: - View the details for a bibliographic record which has items attached. - From the Edit menu, choose "Delete record." You should get an alert, "X item(s) are attached to this record. You must delete all items before deleting this record." - From the Edit menu, choose "Delete all items." You should get an alert, "Are you sure you want to delete the X attached items?" - When logged in as a user with acquisitions and cataloging privileges, view the details for a bibliographic record which is used in an order in Acquisitions. Delete any items attached. - Choose "Delete record" from the Edit menu. You should get an alert, "Warning: This record is used in X order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?" - In Acquisitions, view a basket containing orders. Cancel the order for a title in the basket. Open the detail page for the title in the cancelled order. Try to delete it. You should get an confirmation, "X deleted order(s) are using this record. Are you sure you want to delete this record?" - Perform the same test as a user with cataloging but not acquisitions privileges. The alert should say "X deleted order(s) are using this record. You need order managing permissions to delete this record." - When logged in as a user with cataloging but not acquisitions privileges, view the details for a bibliographic record which is used in an order in Acquisitions. Delete any items attached. - Choose "Delete record" from the Edit menu. You should get an alert, "X order(s) are using this record. You need order managing permissions to delete this record." - View the details for a bibliographic record which has a hold. - Choose "Delete all items" from the Edit menu. You should get an alert, "X hold(s) on this record. You must delete all holds before deleting all items." - View the details for a bibliographic record which has no items. - Choose "Delete record" from the Edit menu. You should get an alert, "Are you sure you want to delete this record?" - Choose "Edit items in a batch" from the Edit menu. You should get an alert, "This record has no items." I could not find any instance of the PopupZ3950Confirmed function in catalog.js being triggered so I don't think the associated string can be tested. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/catalog.js for translation, e.g.: msgid "This record has no items." msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation: > perl translate install fr-FR - Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. Created attachment 110818 [details] [review] Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js This patch moves translatable strings out of catalog-strings.inc into catalog.js, wrapped in the double-underscore function for translation. To test that each affected string correctly appears in the interface: - View the details for a bibliographic record which has items attached. - From the Edit menu, choose "Delete record." You should get an alert, "X item(s) are attached to this record. You must delete all items before deleting this record." - From the Edit menu, choose "Delete all items." You should get an alert, "Are you sure you want to delete the X attached items?" - When logged in as a user with acquisitions and cataloging privileges, view the details for a bibliographic record which is used in an order in Acquisitions. Delete any items attached. - Choose "Delete record" from the Edit menu. You should get an alert, "Warning: This record is used in X order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?" - In Acquisitions, view a basket containing orders. Cancel the order for a title in the basket. Open the detail page for the title in the cancelled order. Try to delete it. You should get an confirmation, "X deleted order(s) are using this record. Are you sure you want to delete this record?" - Perform the same test as a user with cataloging but not acquisitions privileges. The alert should say "X deleted order(s) are using this record. You need order managing permissions to delete this record." - When logged in as a user with cataloging but not acquisitions privileges, view the details for a bibliographic record which is used in an order in Acquisitions. Delete any items attached. - Choose "Delete record" from the Edit menu. You should get an alert, "X order(s) are using this record. You need order managing permissions to delete this record." - View the details for a bibliographic record which has a hold. - Choose "Delete all items" from the Edit menu. You should get an alert, "X hold(s) on this record. You must delete all holds before deleting all items." - View the details for a bibliographic record which has no items. - Choose "Delete record" from the Edit menu. You should get an alert, "Are you sure you want to delete this record?" - Choose "Edit items in a batch" from the Edit menu. You should get an alert, "This record has no items." I could not find any instance of the PopupZ3950Confirmed function in catalog.js being triggered so I don't think the associated string can be tested. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/catalog.js for translation, e.g.: msgid "This record has no items." msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation: > perl translate install fr-FR - Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. Signed-off-by: David Nind <david@davidnind.com> Created attachment 110820 [details] [review] Bug 26441: Move translatable strings out of catalog-strings.inc into catalog.js This patch moves translatable strings out of catalog-strings.inc into catalog.js, wrapped in the double-underscore function for translation. To test that each affected string correctly appears in the interface: - View the details for a bibliographic record which has items attached. - From the Edit menu, choose "Delete record." You should get an alert, "X item(s) are attached to this record. You must delete all items before deleting this record." - From the Edit menu, choose "Delete all items." You should get an alert, "Are you sure you want to delete the X attached items?" - When logged in as a user with acquisitions and cataloging privileges, view the details for a bibliographic record which is used in an order in Acquisitions. Delete any items attached. - Choose "Delete record" from the Edit menu. You should get an alert, "Warning: This record is used in X order(s). Deleting it could cause serious issues on acquisition module. Are you sure you want to delete this record?" - In Acquisitions, view a basket containing orders. Cancel the order for a title in the basket. Open the detail page for the title in the cancelled order. Try to delete it. You should get an confirmation, "X deleted order(s) are using this record. Are you sure you want to delete this record?" - Perform the same test as a user with cataloging but not acquisitions privileges. The alert should say "X deleted order(s) are using this record. You need order managing permissions to delete this record." - When logged in as a user with cataloging but not acquisitions privileges, view the details for a bibliographic record which is used in an order in Acquisitions. Delete any items attached. - Choose "Delete record" from the Edit menu. You should get an alert, "X order(s) are using this record. You need order managing permissions to delete this record." - View the details for a bibliographic record which has a hold. - Choose "Delete all items" from the Edit menu. You should get an alert, "X hold(s) on this record. You must delete all holds before deleting all items." - View the details for a bibliographic record which has no items. - Choose "Delete record" from the Edit menu. You should get an alert, "Are you sure you want to delete this record?" - Choose "Edit items in a batch" from the Edit menu. You should get an alert, "This record has no items." I could not find any instance of the PopupZ3950Confirmed function in catalog.js being triggered so I don't think the associated string can be tested. TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/catalog.js for translation, e.g.: msgid "This record has no items." msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation: > perl translate install fr-FR - Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 20.11, thanks to everybody involved! Unfortunately this one does not apply cleanly to 20.05.x, no backport IF need please rebase |