Summary: | Move translatable strings out of merge-record-strings.inc into merge-record.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: | aleisha, f.demians, jonathan.druart, lucas, testopia |
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, 20.05.05
|
|
Circulation function: | |||
Bug Depends on: | 21156 | ||
Bug Blocks: | |||
Attachments: |
Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js
Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js Bug 25320: (follow-up) Remove obsolete include file |
Description
Owen Leonard
2020-04-29 18:57:17 UTC
Created attachment 106025 [details] [review] Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js This patch eliminates the use of a separate include file containing translatable strings in favor of embedding translatable strings in the JavaScript itself. To test, apply the patch and clear your browser cache if necessary. - Perform a catalog search in the staff interface. - Select two results to merge. Click Edit -> Merge records. - Click "Next" on the "Merging records" page. - On the "Source records" page click the second tab where all the checkboxes are unchecked. - Check the box for a tag which is non-repeatable, e.g. 245. - You should see a message, "The field is non-repeatable and already exists in the destination record. Therefore, you cannot add it." - Check the box for a subfield which is non-repeatable, e.g. 245$a. - You should see a message, "The subfield is non-repeatable and already exists in the destination record. Therefore, you cannot add it." 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 prog/js/merge-record.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/merge-record.js:72 msgctxt "Bibliographic record" msgid "" "The field is non-repeatable and already exists in the destination record. " "Therefore, you cannot add it." 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 string should appear. Created attachment 110575 [details] [review] Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js This patch eliminates the use of a separate include file containing translatable strings in favor of embedding translatable strings in the JavaScript itself. To test, apply the patch and clear your browser cache if necessary. - Perform a catalog search in the staff interface. - Select two results to merge. Click Edit -> Merge records. - Click "Next" on the "Merging records" page. - On the "Source records" page click the second tab where all the checkboxes are unchecked. - Check the box for a tag which is non-repeatable, e.g. 245. - You should see a message, "The field is non-repeatable and already exists in the destination record. Therefore, you cannot add it." - Check the box for a subfield which is non-repeatable, e.g. 245$a. - You should see a message, "The subfield is non-repeatable and already exists in the destination record. Therefore, you cannot add it." 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 prog/js/merge-record.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/merge-record.js:72 msgctxt "Bibliographic record" msgid "" "The field is non-repeatable and already exists in the destination record. " "Therefore, you cannot add it." 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 string should appear. Signed-off-by: David Nind <david@davidnind.com> Created attachment 110627 [details] [review] Bug 25320: Move translatable strings out of merge-record-strings.inc into merge-record.js This patch eliminates the use of a separate include file containing translatable strings in favor of embedding translatable strings in the JavaScript itself. To test, apply the patch and clear your browser cache if necessary. - Perform a catalog search in the staff interface. - Select two results to merge. Click Edit -> Merge records. - Click "Next" on the "Merging records" page. - On the "Source records" page click the second tab where all the checkboxes are unchecked. - Check the box for a tag which is non-repeatable, e.g. 245. - You should see a message, "The field is non-repeatable and already exists in the destination record. Therefore, you cannot add it." - Check the box for a subfield which is non-repeatable, e.g. 245$a. - You should see a message, "The subfield is non-repeatable and already exists in the destination record. Therefore, you cannot add it." 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 prog/js/merge-record.js for translation, e.g.: #: koha-tmpl/intranet-tmpl/prog/js/merge-record.js:72 msgctxt "Bibliographic record" msgid "" "The field is non-repeatable and already exists in the destination record. " "Therefore, you cannot add it." 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 string should appear. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Include file still used in authorities/merge.tt koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt: [% INCLUDE 'merge-record-strings.inc' %] Created attachment 110901 [details] [review] Bug 25320: (follow-up) Remove obsolete include file Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.05 enhancement, not backported to 19.11.x |