Bug 26339 - Move translatable strings out of addorderiso2709.tt into addorderiso2709.js
Summary: Move translatable strings out of addorderiso2709.tt into addorderiso2709.js
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 21156
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-01 13:40 UTC by Owen Leonard
Modified: 2021-06-14 21:30 UTC (History)
4 users (show)

See Also:
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


Attachments
Bug 26339: Move translatable strings out of addorderiso2709.tt into addorderiso2709.js (4.43 KB, patch)
2020-09-01 14:01 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26339: Move translatable strings out of addorderiso2709.tt into addorderiso2709.js (4.47 KB, patch)
2020-09-27 03:06 UTC, David Nind
Details | Diff | Splinter Review
Bug 26339: Move translatable strings out of addorderiso2709.tt into addorderiso2709.js (4.53 KB, patch)
2020-09-27 11:47 UTC, Katrin Fischer
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-09-01 13:40:40 UTC
Strings defined for translation in addorderiso2709.tt can now be wrapped in the new translation function and put in addorderiso2709.js.
Comment 1 Owen Leonard 2020-09-01 14:01:03 UTC Comment hidden (obsolete)
Comment 2 David Nind 2020-09-27 03:06:19 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2020-09-27 11:47:39 UTC
Created attachment 110827 [details] [review]
Bug 26339: Move translatable strings out of addorderiso2709.tt into addorderiso2709.js

This patch moves strings defined for translation in addorderiso2709.tt
into addorderiso2709.js for translation using the new double-underscore
i81n function.

To test, apply the patch and go to Acquisitions -> Vendor -> Basket ->
Add orders from MARC file.

 - Click "Add orders" next to a staged file.
 - Without making any selections, click "Save." You should get an error,
   "There is no record selected."
 - Select a record and click "Save." You should get an error, "Some
   budgets are not defined in item records."
 - Enter a non-numeric value in the "Quantity" field and click "Save."
   You should get an error, "1 quantity values are not filled in or are
    not numbers."

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

  msgid "Some budgets are not defined in item records"
  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>
Comment 4 Jonathan Druart 2020-09-29 12:32:01 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-10-20 15:26:21 UTC
backported to 20.05.x for 20.05.05
Comment 6 Aleisha Amohia 2020-10-27 04:22:42 UTC
enhancement, not backported to 19.11.x