From c100eda1bd4c6fa4fb46c95b70efef3bbe4c75a2 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' Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/tools/import_borrowers.tt | 40 +++++++++++++++---- 1 file changed, 33 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 ec1cb170a4..0ea592976e 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 @@ -58,14 +58,35 @@ [% IF ( uploadborrowers ) %]

Import results

    -
  • [% imported | html %] imported records [% IF ( lastimported ) %](last was [% lastimported | html %])[% END %]
  • +
  • + [% 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 %] +
  • [% IF imported and patronlistname %] -
  • Patronlist with imported patrons: [% patronlistname | html %]
  • +
  • Patron list with imported patrons: [% patronlistname | html %]
  • [% END %] -
  • [% overwritten | html %] overwritten [% IF ( lastoverwritten ) %](last was [% lastoverwritten | html %])[% END %]
  • -
  • [% alreadyindb | html %] not imported because already in borrowers table and overwrite disabled [% IF ( lastalreadyindb ) %](last was [% lastalreadyindb | html %])[% END %]
  • -
  • [% invalid | html %] not imported because they are not in the expected format [% IF ( lastinvalid ) %](last was [% lastinvalid | html %])[% END %]
  • -
  • [% total | html %] records parsed
  • +
  • + [% 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 %] +
  • +
  • + [% 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 %] +
  • +
  • + [% 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 %] +
  • + [% tpx("Patron import", "{total} records parsed", {total = total}) | html %] +
  • Back to Tools
@@ -373,7 +394,12 @@
  • The first line in the file must be a header row defining which columns you are supplying in the import file.
  • -
  • Download a Starter CSV file with all the columns. Values are comma-separated.
  • +
  • + + Download a Starter CSV file with all the columns. + + [% tp("CSV file", "Values are comma-separated.") | html %] +
  • OR choose which fields you want to supply from the following list: -- 2.39.5