Bug 29585 - "Go to field" in cataloguing alerts is not translatable
Summary: "Go to field" in cataloguing alerts is not translatable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 28694
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-28 16:28 UTC by Katrin Fischer
Modified: 2022-12-12 21:23 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the 'Go to field' and 'Errors' strings in the basic MARC editor to make them translatable. (This is a follow-up to bug 28694 that changed the way validation error messages are displayed when using the basic MARC editor in cataloging.)
Version(s) released in:
22.05.00,21.11.03


Attachments
Bug 29585: Fix unstranslatable strings in addbiblio.tt (3.96 KB, patch)
2021-11-29 11:01 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 29585: Fix unstranslatable strings in addbiblio.tt (4.03 KB, patch)
2021-12-19 13:59 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 Katrin Fischer 2021-11-28 16:28:09 UTC
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt

var subfield=tagsubfieldid.substr(3,1);
StrAlert += "<li>"+_("Tag %s subfield %s %s in tab %s").format(tag, subfield, formatFieldName( tabflag[tagsubfieldid][1] ), tabflag[tagsubfieldid][2]) + ' <a class="linkfield btn btn-link" href="#" data-tab="' + tabflag[tagsubfieldid][2] + '" data-field="' + tabflag[tagsubfieldid][3] + '"><i class="fa fa-arrow-right" aria-hidden="true"></i> Go to field</a></li>';
Comment 1 Tomás Cohen Arazi 2021-11-29 11:01:38 UTC
Created attachment 128066 [details] [review]
Bug 29585: Fix unstranslatable strings in addbiblio.tt

This patch makes 'Go to field' and 'Errors' strings translatable

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 David Nind 2021-11-30 00:52:56 UTC
How can I test this? 

I thought this would work as I've tested things before for Owen, for example bug 26257. But those were for js strings.

Before applying the patch
~~~~~~~~~~~~~~~~~~~~~~~~~

1. View misc/translator/po/de-DE-staff-prog.po
   . search for "Go to field" (without the ")
   . no occurrences found
2. Install the language:
   . cd misc/translator
   . perl translate install de-DE
3. Change the staff interface language (System preferences > I18N/L18N > enable language.
4. Change interface to the language.
5. Create a new record.
6. Save.
7. The "Go to field" for the error messages is in English.

After applying the patch
~~~~~~~~~~~~~~~~~~~~~~~~

1. Update the language files: perl translate install de-DE
2. misc/translator/po/de-DE-staff-prog.po should have a translatable string (already translated) for "Go to field".
3. Install the language files: perl translate install de-DE
4. Try creating and saving a record again - the "Go to field" should be in German.
Comment 3 Katrin Fischer 2021-12-19 13:59:17 UTC
Created attachment 128723 [details] [review]
Bug 29585: Fix unstranslatable strings in addbiblio.tt

This patch makes 'Go to field' and 'Errors' strings translatable

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-12-19 14:03:32 UTC
Hi David, thx for trying to test this! 

> After applying the patch
> ~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 1. Update the language files: perl translate install de-DE

This step will install de-DE again, but the po file won't have been updated to have the string yet. So you need to follow the instructions here first:
https://wiki.koha-community.org/wiki/Translating_Koha#Updating_the_po_files_in_your_installation

Then you should be able to verify, that the string appeared in the po files and you can edit them to translate them if you want. 


As this one is an easy fix, I am taking the liberty to move it straight to PQA.
Comment 5 David Nind 2021-12-20 17:06:30 UTC
Thanks Katrin for the link and how to make his work! Noted for any future bug testing...
Comment 6 Katrin Fischer 2022-01-09 11:44:28 UTC
Can this please be pushed before next string freeze?
Comment 7 Fridolin Somers 2022-01-18 00:56:29 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 8 Kyle M Hall 2022-02-04 18:26:08 UTC
Pushed to 21.11.x for 21.11.03
Comment 9 Andrew Fuerste-Henry 2022-02-10 15:49:31 UTC
Missing dependency, not backported to 21.05