Bug 25321 - Move translatable strings out of strings.inc into the corresponding JavaScript
Summary: Move translatable strings out of strings.inc into the corresponding JavaScript
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 21156
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-29 19:00 UTC by Owen Leonard
Modified: 2020-11-20 20:19 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Who signed the patch off:
Manual merge request:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.05


Attachments
Bug 25321: (Part 1) Move translatable strings out of strings.inc into checkouts.js (20.68 KB, patch)
2020-06-18 16:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25321: (Part 1) Move translatable strings out of strings.inc into checkouts.js (19.22 KB, patch)
2020-06-18 16:55 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript (39.30 KB, patch)
2020-08-24 17:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript (39.30 KB, patch)
2020-09-10 18:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript (39.36 KB, patch)
2020-09-11 23:02 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript (39.42 KB, patch)
2020-09-12 17:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25321: Remove PLACE_HOLD from results.js (1.50 KB, patch)
2020-09-29 09:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25321: Remove 2 remaining occurrences of strings.inc (1.62 KB, patch)
2020-09-29 12:27 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-04-29 19:00:56 UTC
Strings which were put in strings.inc for translation purposes can now be wrapped in the new translation function and put in the various JavaScript files where they're used.
Comment 1 Owen Leonard 2020-06-18 16:26:50 UTC
Files to be updated:

checkouts.js
holds.js
results.js
Comment 2 Owen Leonard 2020-06-18 16:50:33 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2020-06-18 16:55:00 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2020-08-24 17:58:58 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2020-09-10 18:38:04 UTC
Created attachment 109858 [details] [review]
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript

This patch moves string definitions out of strings.inc and into the
corresponding JavaScript files.

To test, apply the patch and test various pages in the staff interface:

A few suggestions:

- Perform a catalog search and view the detail page for a bibliographic record.
  - Confirm that the search results browser in the left-hand sidebar
    work correctly and that the title attributes of the controls are
    correct.
- Locate a patron with multiple checkouts. View the checkout page and
  test the various controls in the table of checkouts: Renew, check in,
  return claims, etc.
- View the list of holds on a patron's account. Test suspending and
  resuming holds.

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/checkouts.js for
  translation, e.g.:

  msgid "Checked in"
  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.
Comment 6 Lucas Gass 2020-09-11 23:02:58 UTC
Created attachment 109971 [details] [review]
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript

This patch moves string definitions out of strings.inc and into the
corresponding JavaScript files.

To test, apply the patch and test various pages in the staff interface:

A few suggestions:

- Perform a catalog search and view the detail page for a bibliographic record.
  - Confirm that the search results browser in the left-hand sidebar
    work correctly and that the title attributes of the controls are
    correct.
- Locate a patron with multiple checkouts. View the checkout page and
  test the various controls in the table of checkouts: Renew, check in,
  return claims, etc.
- View the list of holds on a patron's account. Test suspending and
  resuming holds.

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/checkouts.js for
  translation, e.g.:

  msgid "Checked in"
  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: Lucas Gass <lucas@bywatersolutions.com>
Comment 7 Katrin Fischer 2020-09-12 17:44:00 UTC
Created attachment 109984 [details] [review]
Bug 25321: Move translatable strings out of strings.inc into the corresponding JavaScript

This patch moves string definitions out of strings.inc and into the
corresponding JavaScript files.

To test, apply the patch and test various pages in the staff interface:

A few suggestions:

- Perform a catalog search and view the detail page for a bibliographic record.
  - Confirm that the search results browser in the left-hand sidebar
    work correctly and that the title attributes of the controls are
    correct.
- Locate a patron with multiple checkouts. View the checkout page and
  test the various controls in the table of checkouts: Renew, check in,
  return claims, etc.
- View the list of holds on a patron's account. Test suspending and
  resuming holds.

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/checkouts.js for
  translation, e.g.:

  msgid "Checked in"
  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: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Jonathan Druart 2020-09-29 09:12:39 UTC
Created attachment 110893 [details] [review]
Bug 25321: Remove PLACE_HOLD from results.js
Comment 9 Jonathan Druart 2020-09-29 12:22:50 UTC
Cannot edit a biblio:
Template process failed: file error - strings.inc: not found at /kohadevbox/koha/C4/Templates.pm line 122

There are 2 remaining occurrences of strings.inc

koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt:[% INCLUDE 'strings.inc' %]
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt:[% INCLUDE 'strings.inc' %]
Comment 10 Jonathan Druart 2020-09-29 12:27:38 UTC
Created attachment 110906 [details] [review]
Bug 25321: Remove 2 remaining occurrences of strings.inc

They were used for browser.js
Comment 11 Jonathan Druart 2020-09-29 12:31:08 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 12 Lucas Gass 2020-10-20 16:15:08 UTC
backported to 20.05.x for 20.05.05
Comment 13 Aleisha Amohia 2020-10-27 04:25:06 UTC
enhancement, not backported to 19.11.x