Bug 33077: Improve ease of translating template title tags
authorOwen Leonard <oleonard@myacpl.org>
Mon, 27 Feb 2023 11:33:22 +0000 (11:33 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Tue, 23 May 2023 18:43:30 +0000 (20:43 +0200)
commitabd52f343dd01b3560644a7ed073e6dd685c03c9
treeefbb7051b9d059863d06700259a81b81b4901463
parent44f9c4c0cf16f26ff9279fb4034276e5d72e3cff
Bug 33077: Improve ease of translating template title tags

This patch uses the cities administration page as a proof-of-concept for
using the [% t() %] construction to wrap translatable string in template
<title> tags. This should result in a significant improvement in
translatability.

To test, apply the patch and run the translation script to update the
.po files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:

 - In fr-FR-staff-prog.po you should no longer see a reference to
   cities.tt line 6, "#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt:6"
 - In fr-FR-messages.po you should see several strings which have been
   pulled individually from the <title> tag:
   - cities.tt:9, msgid "Modify city"
   - cities.tt:11, msgid "New city"
   - cities.tt:15, msgid "Confirm deletion of city"
   - cities.tt:19, msgid "Administration", msgid "Cities", msgid "Koha",
     and msgid "Administration"

Translate the strings in fr-FR-messages.po and install the updated
translation:

perl misc/translator/translate install fr-FR

Swith to the update language in the staff interface and confirm that the
Cities page title is translated correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7020b90f305fbdf584b57f61e39d259d3f9e0d22)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 66b7de2ec2ee429b40831cdef68161ab18bb0035)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9d5bcfbfebc08cdb3e5925bb5be33b20d823cc5)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt