Bug 29529 - Fix \n in hint on Koha to MARC mappings
Summary: Fix \n in hint on Koha to MARC mappings
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: Manual
Depends on:
Blocks:
 
Reported: 2021-11-19 13:57 UTC by Katrin Fischer
Modified: 2021-12-22 21:36 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes: - a string in Koha to MARC mappings (koha2marclinks.tt:86) so that it can be correctly translated (excludes "\n" from what is translated), and - capitalization for the breadcrumb link: Administration > Koha to MARC mappings.
Version(s) released in:
22.05.00,21.11.01,21.05.08


Attachments
Bug 29529: Fix \n in hint on Koha to MARC mappings (2.67 KB, patch)
2021-11-19 15:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29529: Fix \n in hint on Koha to MARC mappings (2.72 KB, patch)
2021-11-25 19:23 UTC, David Nind
Details | Diff | Splinter Review
Bug 29529: Fix \n in hint on Koha to MARC mappings (2.82 KB, patch)
2021-11-26 08:43 UTC, Marcel de Rooy
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-19 13:57:26 UTC
The \n don't work in translations as Pootle escapes them. We should not use them in translatable text and have fixed other occurences in the past:

koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt:86

Please enter field tag and subfield code, separated by a comma. (For control fields: add '@' as subfield code.)\nThe change will be applied immediately.
Comment 1 Owen Leonard 2021-11-19 15:00:50 UTC
Created attachment 127876 [details] [review]
Bug 29529: Fix \n in hint on Koha to MARC mappings

This patch breaks up a translatable string so that "\n" is excluded from
what is translated.

Unrelated: Capitalization is corrected on an instance of the phrase
"Koha to MARC Mappings."

To test, apply the patch and go to Administration -> Koha to MARC
mapping.

- The breadcrumb for the current page should have correct capitalization
  ("mapping" instead of "Mapping").
- Click the "Add" button for any Koha field. The dialog should display
  correctly:

  Adding a mapping for: biblio.abstract.
  Please enter field tag and subfield code, separated by a comma. (For
  control fields: add '@' as subfield code.)
  The change will be applied immediately.

Test the way the po file is updated:

 > cd misc/translator
 > perl translate update en-GB (for example)
 - Open the updated po file, en-GB-staff-prog.po
 - You should find these lines:

 SCRIPT
 koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt:86
 msgid "The change will be applied immediately."
 msgstr ""
Comment 2 David Nind 2021-11-25 19:23:05 UTC
Created attachment 128015 [details] [review]
Bug 29529: Fix \n in hint on Koha to MARC mappings

This patch breaks up a translatable string so that "\n" is excluded from
what is translated.

Unrelated: Capitalization is corrected on an instance of the phrase
"Koha to MARC Mappings."

To test, apply the patch and go to Administration -> Koha to MARC
mapping.

- The breadcrumb for the current page should have correct capitalization
  ("mapping" instead of "Mapping").
- Click the "Add" button for any Koha field. The dialog should display
  correctly:

  Adding a mapping for: biblio.abstract.
  Please enter field tag and subfield code, separated by a comma. (For
  control fields: add '@' as subfield code.)
  The change will be applied immediately.

Test the way the po file is updated:

 > cd misc/translator
 > perl translate update en-GB (for example)
 - Open the updated po file, en-GB-staff-prog.po
 - You should find these lines:

 SCRIPT
 koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt:86
 msgid "The change will be applied immediately."
 msgstr ""

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2021-11-26 08:43:16 UTC
Created attachment 128027 [details] [review]
Bug 29529: Fix \n in hint on Koha to MARC mappings

This patch breaks up a translatable string so that "\n" is excluded from
what is translated.

Unrelated: Capitalization is corrected on an instance of the phrase
"Koha to MARC Mappings."

To test, apply the patch and go to Administration -> Koha to MARC
mapping.

- The breadcrumb for the current page should have correct capitalization
  ("mapping" instead of "Mapping").
- Click the "Add" button for any Koha field. The dialog should display
  correctly:

  Adding a mapping for: biblio.abstract.
  Please enter field tag and subfield code, separated by a comma. (For
  control fields: add '@' as subfield code.)
  The change will be applied immediately.

Test the way the po file is updated:

 > cd misc/translator
 > perl translate update en-GB (for example)
 - Open the updated po file, en-GB-staff-prog.po
 - You should find these lines:

 SCRIPT
 koha-tmpl/intranet-tmpl/prog/en/modules/admin/koha2marclinks.tt:86
 msgid "The change will be applied immediately."
 msgstr ""

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Fridolin Somers 2021-12-02 07:48:02 UTC
Pushed to master for 22.05, thanks to everybody involved!
Comment 5 Kyle M Hall 2021-12-03 15:15:55 UTC
Pushed to 21.11.x for 21.11.01
Comment 6 David Nind 2021-12-16 13:28:54 UTC
Added Manual keyword for 22.05 bugs that I consider require documentation changes. See bug 29640 and the linked spreadsheet for additional details.
Comment 7 Andrew Fuerste-Henry 2021-12-17 19:05:41 UTC
Pushed to 21.05.x for 21.05.08
Comment 8 Victor Grousset/tuxayo 2021-12-22 21:36:09 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.