Bug 34801 - Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)
Summary: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on: 34038
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-15 10:27 UTC by Matt Blenkinsop
Modified: 2024-07-04 20:40 UTC (History)
4 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:
23.11.00,23.05.05
Circulation function:


Attachments
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up) (2.38 KB, patch)
2023-09-15 10:30 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up) (2.41 KB, patch)
2023-10-01 19:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up) (2.47 KB, patch)
2023-10-01 21:39 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-09-15 10:27:13 UTC

    
Comment 1 Matt Blenkinsop 2023-09-15 10:30:42 UTC
Created attachment 155662 [details] [review]
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)

__() should be used in .js files, not .tt files

To test, apply the patch and update a translation, e.g. fr-FR:

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

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
  should find the lines in the commit
Comment 2 David Nind 2023-10-01 19:39:13 UTC
Created attachment 156448 [details] [review]
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)

__() should be used in .js files, not .tt files

To test, apply the patch and update a translation, e.g. fr-FR:

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

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
  should find the lines in the commit

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-10-01 19:49:55 UTC
Testing notes (using KTD):

1. po/fr-FR-staff-prog.po - 'Account has been deleted' was added to the .po file (no occurrence before patch applied).

2. po/fr-FR-opac-bootstrap.po - 'No title' was already in the .po file before applying the patch - an additional line was added after the patch was applied (#: koha-tmpl/opac-tmpl/bootstrap/en/includes/js-biblio-format.inc:1)
Comment 4 Victor Grousset/tuxayo 2023-10-01 21:39:00 UTC
Created attachment 156452 [details] [review]
Bug 34801: Fix incorrect use of __() in .tt and .inc files (bug 34038 follow-up)

__() should be used in .js files, not .tt files

To test, apply the patch and update a translation, e.g. fr-FR:

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

- Open the corresponding .po file for JavaScript strings, in this case
  misc/translator/po/fr-FR-staff-prog.po
- Confirm that the strings are now in the .po file for translation. You
  should find the lines in the commit

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 5 Victor Grousset/tuxayo 2023-10-01 21:41:17 UTC
Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 6 Tomás Cohen Arazi (tcohen) 2023-10-03 13:19:36 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-10-05 19:33:49 UTC
Pushed to 23.05.x for 23.05.05

Note that in 23.05.x js-biblio-format.inc does not exist