From 4f2c55b10d4cbb7ed0fd2158d9e60e9aee468eb3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 16 Jun 2023 18:08:14 +0000 Subject: [PATCH] Bug 34043: Improve translation of CSV header templates This patch reformats serverl CSV header templates so that it's easier to translate the English strings. The templates now use the [% t(" ") %] construction to ensure that each string is managed separately. To test, apply the patch and go to Acquisitions. - Locate a vendor with a basket and view the basket. - Click the "Export as CSV" button. The CSV file you get should be well-formatted. - Go to basket groups for that vendor and click the "Closed" tab. - Click the "Export as CSV" button for one of the baskets. The CSV file should be correct. - Go to Acquisitions -> Late orders. - Check some checkboxes in the list of late orders. Click "Export as CSV" at the bottom of the page. The CSV file should be correct. - Go to the catalog's item search page. - Perform a search which will return results. On the result page, choose "Export all results to -> CSV" and check the resulting CSV file. - Go to Reports -> Statistics Wizards -> Cash register - Select "To a file" under "Output" and submit. Check the resulting CSV file. - Go to Reports -> Orders by funds. - Choose "To a file" under "Output" and submit. Check the resulting CSV file. Signed-off-by: Caroline Cyr La Rose --- .../en/includes/csv_headers/acqui/basket.tt | 38 +++++++++-- .../includes/csv_headers/acqui/basketgroup.tt | 62 +++++++++++++++-- .../includes/csv_headers/acqui/lateorders.tt | 32 +++++++-- .../csv_headers/catalogue/itemsearch.tt | 67 ++++++++++--------- .../reports/cash_register_stats.tt | 29 +++++++- .../csv_headers/reports/orders_by_budget.tt | 39 ++++++++++- 6 files changed, 220 insertions(+), 47 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt index bf408307f1a..d6ff935aa00 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basket.tt @@ -1,4 +1,34 @@ -[%- USE Koha -%] -[%- SET delimiter = Koha.CSVDelimiter() -%] - -[%- BLOCK -%]Contract name[% delimiter | html %]Order number[% delimiter | html %]Entry date[% delimiter | html %]ISBN[% delimiter | html %]Author[% delimiter | html %]Title[% delimiter | html %]Publication year[% delimiter | html %]Publisher[% delimiter | html %]Collection title[% delimiter | html %]Note for vendor[% delimiter | html %]Quantity[% delimiter | html %]RRP[% delimiter | html %]Delivery place[% delimiter | html %]Billing place[%- END -%] +[% FILTER collapse %] + [%- USE Koha -%] + [%- PROCESS 'i18n.inc' -%] + [%- SET delimiter = Koha.CSVDelimiter() -%] + [%- BLOCK -%] + "[% t("Contract name") | html %]" + [% delimiter | html %] + "[% t("Order number") | html %]" + [% delimiter | html %] + "[% t("Entry date") | html %]" + [% delimiter | html %] + "[% t("ISBN") | html %]" + [% delimiter | html %] + "[% t("Author") | html %]" + [% delimiter | html %] + "[% t("Title") | html %]" + [% delimiter | html %] + "[% t("Publication year") | html %]" + [% delimiter | html %] + "[% t("Publisher") | html %]" + [% delimiter | html %] + "[% t("Collection title") | html %]" + [% delimiter | html %] + "[% t("Note for vendor") | html %]" + [% delimiter | html %] + "[% t("Quantity") | html %]" + [% delimiter | html %] + "[% t("RRP") | html %]" + [% delimiter | html %] + "[% t("Delivery place") | html %]" + [% delimiter | html %] + "[% t("Billing place") | html %]" + [%- END -%] +[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt index be05cb98b42..d0f21a38073 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/basketgroup.tt @@ -1,4 +1,58 @@ -[%- USE Koha -%] -[%- SET delimiter = Koha.CSVDelimiter() -%] - -[%- BLOCK -%]Account number[% delimiter | html %]Basket name[% delimiter | html %]Order number[% delimiter | html %]Author[% delimiter | html %]Title[% delimiter | html %]Publisher[% delimiter | html %]Publication year[% delimiter | html %]Collection title[% delimiter | html %]ISBN[% delimiter | html %]Quantity[% delimiter | html %]RRP tax included[% delimiter | html %]RRP tax excluded[% delimiter | html %]Discount[% delimiter | html %]Estimated cost tax included[% delimiter | html %]Estimated cost tax excluded[% delimiter | html %]Note for vendor[% delimiter | html %]Entry date[% delimiter | html %]Bookseller name[% delimiter | html %]Bookseller physical address[% delimiter | html %]Bookseller postal address[% delimiter | html %]Contract number[% delimiter | html %]Contract name[% delimiter | html %]Basket group delivery place[% delimiter | html %]Basket group billing place[% delimiter | html %]Basket delivery place[% delimiter | html %]Basket billing place[%- END -%] +[% FILTER collapse %] + [%- USE Koha -%] + [%- PROCESS 'i18n.inc' -%] + [%- SET delimiter = Koha.CSVDelimiter() -%] + [%- BLOCK -%] + "[% t("Account number") | html %]" + [% delimiter | html %] + "[% t("Basket name") | html %]" + [% delimiter | html %] + "[% t("Order number") | html %]" + [% delimiter | html %] + "[% t("Author") | html %]" + [% delimiter | html %] + "[% t("Title") | html %]" + [% delimiter | html %] + "[% t("Publisher") | html %]" + [% delimiter | html %] + "[% t("Publication year") | html %]" + [% delimiter | html %] + "[% t("Collection title") | html %]" + [% delimiter | html %] + "[% t("ISBN") | html %]" + [% delimiter | html %] + "[% t("Quantity") | html %]" + [% delimiter | html %] + "[% t("RRP tax included") | html %]" + [% delimiter | html %] + "[% t("RRP tax excluded") | html %]" + [% delimiter | html %] + "[% t("Discount") | html %]" + [% delimiter | html %] + "[% t("Estimated cost tax included") | html %]" + [% delimiter | html %] + "[% t("Estimated cost tax excluded") | html %]" + [% delimiter | html %] + "[% t("Note for vendor") | html %]" + [% delimiter | html %] + "[% t("Entry date") | html %]" + [% delimiter | html %] + "[% t("Bookseller name") | html %]" + [% delimiter | html %] + "[% t("Bookseller physical address") | html %]" + [% delimiter | html %] + "[% t("Bookseller postal address") | html %]" + [% delimiter | html %] + "[% t("Contract number") | html %]" + [% delimiter | html %] + "[% t("Contract name") | html %]" + [% delimiter | html %] + "[% t("Basket group delivery place") | html %]" + [% delimiter | html %] + "[% t("Basket group billing place") | html %]" + [% delimiter | html %] + "[% t("Basket delivery place") | html %]" + [% delimiter | html %] + "[% t("Basket billing place") | html %]" + [%- END -%] +[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/lateorders.tt index bc02b073062..d787966a162 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/acqui/lateorders.tt @@ -1,4 +1,28 @@ -[%- USE Koha -%] -[%- SET delimiter = Koha.CSVDelimiter() -%] - -[%- BLOCK -%]ORDER DATE[%- delimiter | html -%]ESTIMATED DELIVERY DATE[%- delimiter | html -%]VENDOR[%- delimiter | html -%]INFORMATION[%- delimiter | html -%]TOTAL COST[%- delimiter | html -%]BASKET[%- delimiter | html -%]CLAIMS COUNT[%- delimiter | html -%]CLAIMED DATE[%- delimiter | html -%]INTERNAL NOTE[%- delimiter | html -%]VENDOR NOTE[%- delimiter | html -%]ISBN[%- END -%] +[% FILTER collapse %] + [%- USE Koha -%] + [%- PROCESS 'i18n.inc' -%] + [%- SET delimiter = Koha.CSVDelimiter() -%] + [%- BLOCK -%] + "[% t("ORDER DATE") | html %]" + [%- delimiter | html -%] + "[% t("ESTIMATED DELIVERY DATE") | html %]" + [%- delimiter | html -%] + "[% t("VENDOR") | html %]" + [%- delimiter | html -%] + "[% t("INFORMATION") | html %]" + [%- delimiter | html -%] + "[% t("TOTAL COST") | html %]" + [%- delimiter | html -%] + "[% t("BASKET") | html %]" + [%- delimiter | html -%] + "[% t("CLAIMS COUNT") | html %]" + [%- delimiter | html -%] + "[% t("CLAIMED DATE") | html %]" + [%- delimiter | html -%] + "[% t("INTERNAL NOTE") | html %]" + [%- delimiter | html -%] + "[% t("VENDOR NOTE") | html %]" + [%- delimiter | html -%] + "[% t("ISBN") | html %]" + [%- END -%] +[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt index be04f9d478e..930d9250ece 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt @@ -1,38 +1,39 @@ [%- USE raw -%] [%- USE Koha -%] +[%- PROCESS 'i18n.inc' -%] [%- SET delimiter = Koha.CSVDelimiter() -%] [%- BLOCK -%] -"Title" -[%- delimiter | $raw -%] -"Publication date" -[%- delimiter | $raw -%] -"Publisher" -[%- delimiter | $raw -%] -"Collection" -[%- delimiter | $raw -%] -"Barcode" -[%- delimiter | $raw -%] -"Serial enumeration" -[%- delimiter | $raw -%] -"Call number" -[%- delimiter | $raw -%] -"Home library" -[%- delimiter | $raw -%] -"Current library" -[%- delimiter | $raw -%] -"Shelving location" -[%- delimiter | $raw -%] -"Item type" -[%- delimiter | $raw -%] -"Inventory number" -[%- delimiter | $raw -%] -"Not for loan status" -[%- delimiter | $raw -%] -"Lost status" -[%- delimiter | $raw -%] -"Withdrawn status" -[%- delimiter | $raw -%] -"Checkouts" -[%- delimiter | $raw -%] -"Due date" + "[% t("Title") | html %]" + [%- delimiter | $raw -%] + "[% t("Publication date") | html %]" + [%- delimiter | $raw -%] + "[% t("Publisher") | html %]" + [%- delimiter | $raw -%] + "[% t("Collection") | html %]" + [%- delimiter | $raw -%] + "[% t("Barcode") | html %]" + [%- delimiter | $raw -%] + "[% t("Serial enumeration") | html %]" + [%- delimiter | $raw -%] + "[% t("Call number") | html %]" + [%- delimiter | $raw -%] + "[% t("Home library") | html %]" + [%- delimiter | $raw -%] + "[% t("Current library") | html %]" + [%- delimiter | $raw -%] + "[% t("Shelving location") | html %]" + [%- delimiter | $raw -%] + "[% t("Item type") | html %]" + [%- delimiter | $raw -%] + "[% t("Inventory number") | html %]" + [%- delimiter | $raw -%] + "[% t("Not for loan status") | html %]" + [%- delimiter | $raw -%] + "[% t("Lost status") | html %]" + [%- delimiter | $raw -%] + "[% t("Withdrawn status") | html %]" + [%- delimiter | $raw -%] + "[% t("Checkouts") | html %]" + [%- delimiter | $raw -%] + "[% t("Due date") | html %]" [%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt index cac35b99d3e..e77a60adddc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/cash_register_stats.tt @@ -1 +1,28 @@ -[%- BLOCK -%]Manager name[% sep | html %]Patron cardnumber[% sep | html %]Patron name[% sep | html %]Transaction library[% sep | html %]Transaction date[% sep | html %]Updated[% sep | html %]Transaction type[% sep |html %]Notes[% sep | html %]Amount[% sep | html %]Title[% sep | html %]Barcode[% sep | html %]Item type[%- END -%] +[% FILTER collapse %] + [%- PROCESS 'i18n.inc' -%] + [%- BLOCK -%] + "[% t("Manager name") | html %]" + [% sep | html %] + "[% t("Patron cardnumber") | html %]" + [% sep | html %] + "[% t("Patron name") | html %]" + [% sep | html %] + "[% t("Transaction library") | html %]" + [% sep | html %] + "[% t("Transaction date") | html %]" + [% sep | html %] + "[% t("Updated") | html %]" + [% sep | html %] + "[% t("Transaction type") | html %]" + [% sep |html %] + "[% t("Notes") | html %]" + [% sep | html %] + "[% t("Amount") | html %]" + [% sep | html %] + "[% t("Title") | html %]" + [% sep | html %] + "[% t("Barcode") | html %]" + [% sep | html %] + "[% t("Item type") | html %]" + [%- END -%] +[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt index d184b8bff02..7961e0624bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/reports/orders_by_budget.tt @@ -1 +1,38 @@ -[%- BLOCK -%]Fund[% sep | html %]"Basket num"[% sep | html %]"Basket name"[% sep | html %]"Authorised by"[% sep | html %]"Biblio number"[% sep | html %]Title[% sep | html %]Currency[% sep | html %]"Vendor price"[% sep | html %]RRP[% sep | html %]"Budgeted cost"[% sep | html %]Quantity[% sep | html %]"Total RRP"[% sep | html %]"Total cost"[% sep | html %]"Entry date"[% sep | html %]"Date received"[% sep | html %]"Internal note"[% sep | html %]"Vendor note"[%- END -%] +[% FILTER collapse %] + [%- PROCESS 'i18n.inc' -%] + [%- BLOCK -%] + "[% t("Fund") | html %]" + [% sep | html %] + "[% t("Basket num") | html %]" + [% sep | html %] + "[% t("Basket name") | html %]" + [% sep | html %] + "[% t("Authorised by") | html %]" + [% sep | html %] + "[% t("Biblio number") | html %]" + [% sep | html %] + "[% t("Title") | html %]" + [% sep | html %] + "[% t("Currency") | html %]" + [% sep | html %] + "[% t("Vendor price") | html %]" + [% sep | html %] + "[% t("RRP") | html %]" + [% sep | html %] + "[% t("Budgeted cost") | html %]" + [% sep | html %] + "[% t("Quantity") | html %]" + [% sep | html %] + "[% t("Total RRP") | html %]" + [% sep | html %] + "[% t("Total cost") | html %]" + [% sep | html %] + "[% t("Entry date") | html %]" + [% sep | html %] + "[% t("Date received") | html %]" + [% sep | html %] + "[% t("Internal note") | html %]" + [% sep | html %] + "[% t("Vendor note") | html %]" + [%- END -%] +[%- END -%] -- 2.34.1