From 639c60d5f3e8b5dff3105fc7aadcf8830c636b20 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 18 Oct 2023 14:18:40 +0000 Subject: [PATCH] Bug 35091: Improve translation of usage statistics country list This patch reworks country-list.inc so that each country name can be wrapped separately in the t() translation function and be processed individually during the translation process. To test, apply the patch and update a translation, e.g. fr-FR: - perl misc/translator/translate update fr-FR - Edit the updated po file for the language you chose, e.g. misc/translator/po/fr-FR-messages.po, and locate strings from country-strings.inc. Each country names should show up as a separate string for translation. - Update the file to fill in translated strings for one or more countries. For example: koha-tmpl/intranet-tmpl/prog/en/includes/country-list.inc:2 msgid "Afghanistan" msgstr "" - Install the updated po file: - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Go to Administration -> Share usage statistics and check the "Your country" dropdown. The list should look correct. - Switch to your updated translation and confirm that the country names you translated show up as expected. Signed-off-by: Lucas Gass Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/country-list.inc | 392 +++++++++--------- .../prog/en/modules/admin/usage_statistics.tt | 6 +- 2 files changed, 199 insertions(+), 199 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/country-list.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/country-list.inc index 30d44e5f83..7f9d6480a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/country-list.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/country-list.inc @@ -1,196 +1,196 @@ -[% SET countries = [ -"Afghanistan", -"Albania", -"Algeria", -"Andorra", -"Angola", -"Antigua & Deps", -"Argentina", -"Armenia", -"Australia", -"Austria", -"Azerbaijan", -"Bahamas", -"Bahrain", -"Bangladesh", -"Barbados", -"Belarus", -"Belgium", -"Belize", -"Benin", -"Bhutan", -"Bolivia", -"Bosnia Herz.", -"Botswana", -"Brazil", -"Brunei", -"Bulgaria", -"Burkina", -"Burundi", -"Cambodia", -"Cameroon", -"Canada", -"Cape Verde", -"Centr. Afr. Rep", -"Chad", -"Chile", -"China", -"Colombia", -"Comoros", -"Congo", -"Costa Rica", -"Croatia", -"Cuba", -"Cyprus", -"Czech Republic", -"Denmark", -"Djibouti", -"Dominica", -"Dominican Rep.", -"East Timor", -"Ecuador", -"Egypt", -"El Salvador", -"Equator. Guinea", -"Eritrea", -"Estonia", -"Ethiopia", -"Fiji", -"Finland", -"France", -"Gabon", -"Gambia", -"Georgia", -"Germany", -"Ghana", -"Greece", -"Grenada", -"Guatemala", -"Guinea", -"Guinea-Bissau", -"Guyana", -"Haiti", -"Honduras", -"Hungary", -"Iceland", -"India", -"Indonesia", -"Iran", -"Iraq", -"Ireland", -"Israel", -"Italy", -"Ivory Coast", -"Jamaica", -"Japan", -"Jordan", -"Kazakhstan", -"Kenya", -"Kiribati", -"Korea North", -"Korea South", -"Kosovo", -"Kuwait", -"Kyrgyzstan", -"Laos", -"Latvia", -"Lebanon", -"Lesotho", -"Liberia", -"Libya", -"Liechtenstein", -"Lithuania", -"Luxembourg", -"Macedonia", -"Madagascar", -"Malawi", -"Malaysia", -"Maldives", -"Mali", -"Malta", -"Marshall Isl.", -"Mauritania", -"Mauritius", -"Mexico", -"Micronesia", -"Moldova", -"Monaco", -"Mongolia", -"Montenegro", -"Morocco", -"Mozambique", -"Myanmar", -"Namibia", -"Nauru", -"Nepal", -"Netherlands", -"New Zealand", -"Nicaragua", -"Niger", -"Nigeria", -"Norway", -"Oman", -"Pakistan", -"Palau", -"Panama", -"Papua N. Guinea", -"Paraguay", -"Peru", -"Philippines", -"Poland", -"Portugal", -"Qatar", -"Romania", -"Russian Fed.", -"Rwanda", -"St Kitts & Nev.", -"St Lucia", -"Saint Vincent", -"Samoa", -"San Marino", -"Sao Tome", -"Saudi Arabia", -"Senegal", -"Serbia", -"Seychelles", -"Sierra Leone", -"Singapore", -"Slovakia", -"Slovenia", -"Solomon Islands", -"Somalia", -"South Africa", -"Spain", -"Sri Lanka", -"Sudan", -"Suriname", -"Swaziland", -"Sweden", -"Switzerland", -"Syria", -"Taiwan", -"Tajikistan", -"Tanzania", -"Thailand", -"Togo", -"Tonga", -"Trinidad & Tob.", -"Tunisia", -"Turkey", -"Turkmenistan", -"Tuvalu", -"Uganda", -"Ukraine", -"UAE", -"United Kingdom", -"USA", -"Uruguay", -"Uzbekistan", -"Vanuatu", -"Vatican City", -"Venezuela", -"Vietnam", -"Yemen", -"Zambia", -"Zimbabwe", -] %] +[% country_strings = BLOCK %] + [% t("Afghanistan") | html %], + [% t("Albania") | html %], + [% t("Algeria") | html %], + [% t("Andorra") | html %], + [% t("Angola") | html %], + [% t("Antigua & Deps") | html %], + [% t("Argentina") | html %], + [% t("Armenia") | html %], + [% t("Australia") | html %], + [% t("Austria") | html %], + [% t("Azerbaijan") | html %], + [% t("Bahamas") | html %], + [% t("Bahrain") | html %], + [% t("Bangladesh") | html %], + [% t("Barbados") | html %], + [% t("Belarus") | html %], + [% t("Belgium") | html %], + [% t("Belize") | html %], + [% t("Benin") | html %], + [% t("Bhutan") | html %], + [% t("Bolivia") | html %], + [% t("Bosnia Herz.") | html %], + [% t("Botswana") | html %], + [% t("Brazil") | html %], + [% t("Brunei") | html %], + [% t("Bulgaria") | html %], + [% t("Burkina") | html %], + [% t("Burundi") | html %], + [% t("Cambodia") | html %], + [% t("Cameroon") | html %], + [% t("Canada") | html %], + [% t("Cape Verde") | html %], + [% t("Centr. Afr. Rep") | html %], + [% t("Chad") | html %], + [% t("Chile") | html %], + [% t("China") | html %], + [% t("Colombia") | html %], + [% t("Comoros") | html %], + [% t("Congo") | html %], + [% t("Costa Rica") | html %], + [% t("Croatia") | html %], + [% t("Cuba") | html %], + [% t("Cyprus") | html %], + [% t("Czech Republic") | html %], + [% t("Denmark") | html %], + [% t("Djibouti") | html %], + [% t("Dominica") | html %], + [% t("Dominican Rep.") | html %], + [% t("East Timor") | html %], + [% t("Ecuador") | html %], + [% t("Egypt") | html %], + [% t("El Salvador") | html %], + [% t("Equator. Guinea") | html %], + [% t("Eritrea") | html %], + [% t("Estonia") | html %], + [% t("Ethiopia") | html %], + [% t("Fiji") | html %], + [% t("Finland") | html %], + [% t("France") | html %], + [% t("Gabon") | html %], + [% t("Gambia") | html %], + [% t("Georgia") | html %], + [% t("Germany") | html %], + [% t("Ghana") | html %], + [% t("Greece") | html %], + [% t("Grenada") | html %], + [% t("Guatemala") | html %], + [% t("Guinea") | html %], + [% t("Guinea-Bissau") | html %], + [% t("Guyana") | html %], + [% t("Haiti") | html %], + [% t("Honduras") | html %], + [% t("Hungary") | html %], + [% t("Iceland") | html %], + [% t("India") | html %], + [% t("Indonesia") | html %], + [% t("Iran") | html %], + [% t("Iraq") | html %], + [% t("Ireland") | html %], + [% t("Israel") | html %], + [% t("Italy") | html %], + [% t("Ivory Coast") | html %], + [% t("Jamaica") | html %], + [% t("Japan") | html %], + [% t("Jordan") | html %], + [% t("Kazakhstan") | html %], + [% t("Kenya") | html %], + [% t("Kiribati") | html %], + [% t("Korea North") | html %], + [% t("Korea South") | html %], + [% t("Kosovo") | html %], + [% t("Kuwait") | html %], + [% t("Kyrgyzstan") | html %], + [% t("Laos") | html %], + [% t("Latvia") | html %], + [% t("Lebanon") | html %], + [% t("Lesotho") | html %], + [% t("Liberia") | html %], + [% t("Libya") | html %], + [% t("Liechtenstein") | html %], + [% t("Lithuania") | html %], + [% t("Luxembourg") | html %], + [% t("Macedonia") | html %], + [% t("Madagascar") | html %], + [% t("Malawi") | html %], + [% t("Malaysia") | html %], + [% t("Maldives") | html %], + [% t("Mali") | html %], + [% t("Malta") | html %], + [% t("Marshall Isl.") | html %], + [% t("Mauritania") | html %], + [% t("Mauritius") | html %], + [% t("Mexico") | html %], + [% t("Micronesia") | html %], + [% t("Moldova") | html %], + [% t("Monaco") | html %], + [% t("Mongolia") | html %], + [% t("Montenegro") | html %], + [% t("Morocco") | html %], + [% t("Mozambique") | html %], + [% t("Myanmar") | html %], + [% t("Namibia") | html %], + [% t("Nauru") | html %], + [% t("Nepal") | html %], + [% t("Netherlands") | html %], + [% t("New Zealand") | html %], + [% t("Nicaragua") | html %], + [% t("Niger") | html %], + [% t("Nigeria") | html %], + [% t("Norway") | html %], + [% t("Oman") | html %], + [% t("Pakistan") | html %], + [% t("Palau") | html %], + [% t("Panama") | html %], + [% t("Papua N. Guinea") | html %], + [% t("Paraguay") | html %], + [% t("Peru") | html %], + [% t("Philippines") | html %], + [% t("Poland") | html %], + [% t("Portugal") | html %], + [% t("Qatar") | html %], + [% t("Romania") | html %], + [% t("Russian Fed.") | html %], + [% t("Rwanda") | html %], + [% t("St Kitts & Nev.") | html %], + [% t("St Lucia") | html %], + [% t("Saint Vincent") | html %], + [% t("Samoa") | html %], + [% t("San Marino") | html %], + [% t("Sao Tome") | html %], + [% t("Saudi Arabia") | html %], + [% t("Senegal") | html %], + [% t("Serbia") | html %], + [% t("Seychelles") | html %], + [% t("Sierra Leone") | html %], + [% t("Singapore") | html %], + [% t("Slovakia") | html %], + [% t("Slovenia") | html %], + [% t("Solomon Islands") | html %], + [% t("Somalia") | html %], + [% t("South Africa") | html %], + [% t("Spain") | html %], + [% t("Sri Lanka") | html %], + [% t("Sudan") | html %], + [% t("Suriname") | html %], + [% t("Swaziland") | html %], + [% t("Sweden") | html %], + [% t("Switzerland") | html %], + [% t("Syria") | html %], + [% t("Taiwan") | html %], + [% t("Tajikistan") | html %], + [% t("Tanzania") | html %], + [% t("Thailand") | html %], + [% t("Togo") | html %], + [% t("Tonga") | html %], + [% t("Trinidad & Tob.") | html %], + [% t("Tunisia") | html %], + [% t("Turkey") | html %], + [% t("Turkmenistan") | html %], + [% t("Tuvalu") | html %], + [% t("Uganda") | html %], + [% t("Ukraine") | html %], + [% t("UAE") | html %], + [% t("United Kingdom") | html %], + [% t("USA") | html %], + [% t("Uruguay") | html %], + [% t("Uzbekistan") | html %], + [% t("Vanuatu") | html %], + [% t("Vatican City") | html %], + [% t("Venezuela") | html %], + [% t("Vietnam") | html %], + [% t("Yemen") | html %], + [% t("Zambia") | html %], + [% t("Zimbabwe") | html %] +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt index a6630da114..2311248d01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/usage_statistics.tt @@ -97,12 +97,12 @@ [% PROCESS 'country-list.inc' %] -- 2.39.5