Bugzilla – Attachment 147465 Details for
Bug 33077
Improve ease of translating template title tags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33077: Improve ease of translating template title tags
Bug-33077-Improve-ease-of-translating-template-tit.patch (text/plain), 2.62 KB, created by
Owen Leonard
on 2023-02-27 18:34:45 UTC
(
hide
)
Description:
Bug 33077: Improve ease of translating template title tags
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-02-27 18:34:45 UTC
Size:
2.62 KB
patch
obsolete
>From cda8cbe37725c674a8f3aa2c4f256f21db89488e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 27 Feb 2023 11:33:22 +0000 >Subject: [PATCH] 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. >--- > .../prog/en/modules/admin/cities.tt | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >index 98235c8215..ba2e3e341f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >@@ -2,19 +2,22 @@ > [% USE Asset %] > [% SET footerjs = 1 %] > [% USE TablesSettings %] >+[% PROCESS 'i18n.inc' %] > [% INCLUDE 'doc-head-open.inc' %] >-<title> >+<title>[% FILTER collapse %] > [% IF op =='add_form' %] > [% IF city.cityid %] >- Modify city >+ [% t("Modify city") | html %] > [% ELSE %] >- New city >- [% END %] › [% ELSE %] >+ [% t("New city") | html %] >+ [% END %] › >+ [% ELSE %] > [% IF op == 'delete_confirm' %] >- Confirm deletion of city › [% END %] >+ [% t("Confirm deletion of city") | html %] › >+ [% END %] > [% END %] >- Cities › Administration › Koha >-</title> >+ [% t("Cities") | html %] › [% t("Administration") | html %] › [% t("Koha") | html %] >+[% END %]</title> > [% INCLUDE 'doc-head-close.inc' %] > </head> > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33077
:
147465
|
147794
|
149333