Bug 27815 - "Remove" in point of sale untranslatable
Summary: "Remove" in point of sale untranslatable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-26 19:15 UTC by Caroline Cyr La Rose
Modified: 2021-12-13 21:08 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.04,20.05.10
Circulation function:


Attachments
Screenshot of POS "This sale" in fr-CA (14.33 KB, image/png)
2021-02-26 19:15 UTC, Caroline Cyr La Rose
Details
Bug 27815: "Remove" in point of sale untranslatable (1.92 KB, patch)
2021-03-01 12:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27815: "Remove" in point of sale untranslatable (1.97 KB, patch)
2021-03-03 09:04 UTC, David Nind
Details | Diff | Splinter Review
Bug 27815: "Remove" in point of sale untranslatable (2.03 KB, patch)
2021-03-04 15:19 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 Caroline Cyr La Rose 2021-02-26 19:15:17 UTC
Created attachment 117396 [details]
Screenshot of POS "This sale" in fr-CA

The "Remove" button in "This sale" in the point of sale is untranslatable.

To reproduce:
1- Enable EnablePointOfSale syspref
2- Enable UseCashRegisters syspref
3- Set up at least one cash register in Administration > Cash registers
4- Set up at least on Debit type that can be sold through POS in Administration > Debit types
5- Install at least one other language in your staff interface and switch to that language
6- Go to Point of sale and click Add next to one item for purchase
7- Notice on the right hand side where the purchased item is added, the Removed button is still in English

I checked po/fr-CA-staff-prog.po, po/fr-CA-messages.po and po/fr-CA-messages-js.po and none of them have a "Remove" string in pay.tt.
Comment 1 Owen Leonard 2021-03-01 12:39:23 UTC
Created attachment 117444 [details] [review]
Bug 27815: "Remove" in point of sale untranslatable

This patch modifies the Point of Sale template so that the "Remove"
button can be translated. The string in the JavaScript block wasn't
wrapped in the correct function.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

- Update a translation:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  the template: e.g. misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from pos/pay.tt for translation to confirm the
  update, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt:189
  #, c-format
  msgid "Remove"
  msgstr "Enlever"

- Install the updated translation:

  > perl translate install fr-FR

- In the staff client, go to Point of Sale.
- Switch to the French translation and click the "Ajouter" button next
  to one of the items for purchase.
- In the "This sale" table, the item you added should have a
  corresponding "Enlever" button.
Comment 2 David Nind 2021-03-03 09:04:13 UTC
Created attachment 117553 [details] [review]
Bug 27815: "Remove" in point of sale untranslatable

This patch modifies the Point of Sale template so that the "Remove"
button can be translated. The string in the JavaScript block wasn't
wrapped in the correct function.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

- Update a translation:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  the template: e.g. misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from pos/pay.tt for translation to confirm the
  update, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt:189
  #, c-format
  msgid "Remove"
  msgstr "Enlever"

- Install the updated translation:

  > perl translate install fr-FR

- In the staff client, go to Point of Sale.
- Switch to the French translation and click the "Ajouter" button next
  to one of the items for purchase.
- In the "This sale" table, the item you added should have a
  corresponding "Enlever" button.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-03-04 15:19:09 UTC
Created attachment 117734 [details] [review]
Bug 27815: "Remove" in point of sale untranslatable

This patch modifies the Point of Sale template so that the "Remove"
button can be translated. The string in the JavaScript block wasn't
wrapped in the correct function.

To test, apply the patch and test that the correct strings are
translatable. In this example I'm testing fr-FR:

- Update a translation:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for the strings pulled from
  the template: e.g. misc/translator/po/fr-FR-staff-prog.po
- Locate strings pulled from pos/pay.tt for translation to confirm the
  update, e.g.:

  #: koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt:189
  #, c-format
  msgid "Remove"
  msgstr "Enlever"

- Install the updated translation:

  > perl translate install fr-FR

- In the staff client, go to Point of Sale.
- Switch to the French translation and click the "Ajouter" button next
  to one of the items for purchase.
- In the "This sale" table, the item you added should have a
  corresponding "Enlever" button.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-03-09 16:20:21 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-03-19 14:16:37 UTC
Pushed to 20.11.x for 20.11.04
Comment 6 Andrew Fuerste-Henry 2021-03-23 12:23:54 UTC
Pushed to 20.05.x for 20.05.10
Comment 7 Victor Grousset/tuxayo 2021-03-23 13:24:07 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.