From fe44b6b797d6e17a2cec81537dafe06e70f6f4d8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 22 Jun 2023 15:42:52 +0000 Subject: [PATCH] Bug 34098: Improve translation of some strings in the patron import template This patch updates a few sections of the patron import template in order to import the way strings are identified for translation. To test, apply the patch and install another translation if necessary. - Go to Tools -> Import patrons - Under "Notes," you should see a link, "Download a Starter CSV file with all the columns." - Test the process of importing a batch of patron records. - When the import completes, confirm that the status messages are correct: X imported records X overwritten records X not imported because they are already in borrowers table and overwrite is disabled X not imported because they are not in the expected format X records parsed TESTING TRANSLATABILITY - Update a translation, e.g. fr-FR: > cd misc/translator > perl translate update fr-FR - Open the corresponding .po file for the updated strings, e.g. misc/translator/po/fr-FR-messages.po - Locate strings pulled import_borrowers.tt for translation and confirm that they are readable and have context information under 'msgctxt' --- .../prog/en/modules/tools/import_borrowers.tt | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt index 4366ae46556..8639681a011 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -54,14 +55,35 @@ [% IF ( uploadborrowers ) %] <h5>Import results :</h5> <ul> - <li>[% imported | html %] imported records [% IF ( lastimported ) %](last was [% lastimported | html %])[% END %]</li> + <li> + [% tpx("Patron import", "{count_of_imported_records} imported records", {count_of_imported_records = imported}) | html %] + [% IF ( lastimported ) %] + [% tpx("Patron import", "(last was {last_imported_record})", {last_imported_record = lastimported}) | html %] + [% END %] + </li> [% IF imported and patronlistname %] - <li>Patronlist with imported patrons: [% patronlistname | html %]</li> + <li>Patron list with imported patrons: [% patronlistname | html %]</li> [% END %] - <li>[% overwritten | html %] overwritten [% IF ( lastoverwritten ) %](last was [% lastoverwritten | html %])[% END %]</li> - <li>[% alreadyindb | html %] not imported because already in borrowers table and overwrite disabled [% IF ( lastalreadyindb ) %](last was [% lastalreadyindb | html %])[% END %]</li> - <li>[% invalid | html %] not imported because they are not in the expected format [% IF ( lastinvalid ) %](last was [% lastinvalid | html %])[% END %]</li> - <li>[% total | html %] records parsed</li> + <li> + [% tpx("Patron import", "{count_of_overwritten_records} overwritten records", {count_of_overwritten_records = overwritten}) | html %] + [% IF ( lastoverwritten ) %] + [% tpx("Patron import", "(last was {last_overwritten_record})", {last_overwritten_record = lastoverwritten}) | html %] + [% END %] + </li> + <li> + [% tpx("Patron import", "{count_of_existing_records} not imported because they are already in borrowers table and overwrite is disabled ", {count_of_existing_records = alreadyindb}) | html %] + [% IF ( lastalreadyindb ) %] + [% tpx("Patron import", "(last was {last_existing_record})", {last_existing_record = lastalreadyindb}) | html %] + [% END %] + </li> + <li> + [% tpx("Patron import", "{count_of_invalid_records} not imported because they are not in the expected format", {count_of_invalid_records = invalid}) | html %] + [% IF ( lastinvalid ) %] + [% tpx("Patron import", "(last was {last_invalid_record})", {last_invalid_record = lastinvalid}) | html %] + [% END %] + <li> + [% tpx("Patron import", "{total} records parsed", {total = total}) | html %] + </li> <li><a href="/cgi-bin/koha/tools/tools-home.pl">Back to Tools</a></li> </ul> @@ -369,7 +391,12 @@ <ul> <li>The first line in the file must be a header row defining which columns you are supplying in the import file.</li> - <li><strong>Download a <a href="?sample=1">Starter CSV file</a> with all the columns.</strong> Values are comma-separated.</li> + <li> + <strong> + <a href="?sample=1">Download a Starter CSV file with all the columns.</a> + </strong> + [% tp("CSV file", "Values are comma-separated.") | html %] + </li> <li> OR choose which fields you want to supply from the following list: -- 2.30.2