From 7950fc7d20444d7fc0605d54c8fa1a1b288c7d0a Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 3 Aug 2025 16:13:26 +0200 Subject: Improve the banknotes/codes page --- src/templates.go | 5 ++ src/templates/banknotes-codes.html.tmpl | 126 +++++++++++++++++++++++--------- 2 files changed, 95 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/templates.go b/src/templates.go index a553766..3852b9d 100644 --- a/src/templates.go +++ b/src/templates.go @@ -31,6 +31,7 @@ var ( "locales": i18n.Locales, "map": templateMakeMap, "safe": asHTML, + "toString": toString, "toUpper": strings.ToUpper, "tuple": templateMakeTuple, "withTranslation": withTranslation, @@ -92,6 +93,10 @@ func asHTML(s string) template.HTML { return template.HTML(s) } +func toString(s template.HTML) string { + return string(s) +} + func templateMakeTuple(args ...any) []any { return args } diff --git a/src/templates/banknotes-codes.html.tmpl b/src/templates/banknotes-codes.html.tmpl index b86ca4e..ef926a1 100644 --- a/src/templates/banknotes-codes.html.tmpl +++ b/src/templates/banknotes-codes.html.tmpl @@ -143,76 +143,103 @@ D {{ .GetC "Finland" "Place Name" }} - SETEC + {{ withTranslations "td" + (.GetC "SETEC" "Company Name" | toString) + (tuple "" "SETEC") }} E {{ .GetC "France" "Place Name" }} - Oberthur + {{ withTranslations "td" + (.GetC "Oberthur" "Company Name" | toString) + (tuple "" "Oberthur") }} F {{ .GetC "Austria" "Place Name" }} - - - Österreichische Banknoten- und Sicherheitsdruck GmbH - - + {{ withTranslations "td" + (.GetC "Austrian Banknote and Security Printing" "Company Name" | toString) + (tuple "de" "Oesterreichische Banknoten- und Sicherheitsdruck") }} G {{ .GetC "Netherlands" "Place Name" }} - Koninklijke Joh. Enschedé + {{ withTranslations "td" + (.GetC "Royal Joh. Enschedé" "Company Name" | toString) + (tuple "nl" "Koninklijke Joh. Enschedé") }} H {{ .GetC "United Kingdom" "Place Name" }} - De La Rue + {{ withTranslations "td" + (.GetC "De La Rue" "Company Name" | toString) + (tuple "" "De La Rue") }} J {{ .GetC "Italy" "Place Name" }} - {{ .Get "Bank of Italy" }} + {{ withTranslations "td" + (.GetC "Bank of Italy" "Company Name" | toString) + (tuple "it" "Banca d’Italia") }} K {{ .GetC "Ireland" "Place Name" }} - {{ .Get "Central Bank of Ireland" }} + {{ withTranslations "td" + (.GetC "Central Bank of Ireland" "Company Name" | toString) + (tuple "ga" "Banc Ceannais na hÉireann") + (tuple "en" "Central Bank of Ireland") }} L {{ .GetC "France" "Place Name" }} - {{ .Get "Bank of France" }} + {{ withTranslations "td" + (.GetC "Bank of France" "Company Name" | toString) + (tuple "fr" "Banque du France") }} M {{ .GetC "Spain" "Place Name" }} - {{ .Get "Royal Mint of Spain" }} + {{ withTranslations "td" + (.GetC "Royal Mint of Spain" "Company Name" | toString) + (tuple "es" "Fábrica Nacional de Moneda y Timbre") }} N {{ .GetC "Greece" "Place Name" }} - {{ .Get "Bank of Greece" }} + {{ withTranslations "td" + (.GetC "Bank of Greece" "Company Name" | toString) + (tuple "gr" "Τράπεζα της Ελλάδος") }} P {{ .GetC "Germany" "Place Name" }} - Giesecke+Devrient GmbH + {{ withTranslations "td" + (.GetC "Giesecke+Devrient" "Company Name" | toString) + (tuple "de" "Giesecke+Devrient") }} R {{ .GetC "Germany" "Place Name" }} - Bundesdruckerei GmbH + {{ withTranslations "td" + (.GetC "Federal Printing Office" "Company Name" | toString) + (tuple "de" "Bundesdruckerei") }} T {{ .GetC "Belgium" "Place Name" }} - {{ .Get "National Bank of Belgium" }} + {{ withTranslations "td" + (.GetC "National Bank of Belgium" "Company Name" | toString) + (tuple "nl" "Nationale Bank van België") + (tuple "fr" "Banque nationale de Belgique") + (tuple "de" "Belgische Nationalbank") }} U {{ .GetC "Portugal" "Place Name" }} - Valora S.A. + {{ withTranslations "td" + (.GetC "Valora S.A." "Company Name" | toString) + (tuple "" "Valora S.A.") }} @@ -232,76 +259,103 @@ E {{ .GetC "France" "Place Name" }} - Oberthur + {{ withTranslations "td" + (.GetC "Oberthur" "Company Name" | toString) + (tuple "" "Oberthur") }} F {{ .GetC "Bulgaria" "Place Name" }} - Oberthur Fiduciaire AD + {{ withTranslations "td" + (.GetC "Oberthur Fiduciaire AD" "Company Name" | toString) + (tuple "" "Oberthur Fiduciaire AD") }} M {{ .GetC "Portugal" "Place Name" }} - Valora S.A. + {{ withTranslations "td" + (.GetC "Valora S.A." "Company Name" | toString) + (tuple "" "Valora S.A.") }} N {{ .GetC "Austria" "Place Name" }} - - - Österreichische Banknoten- und Sicherheitsdruck GmbH - - + {{ withTranslations "td" + (.GetC "Austrian Banknote and Security Printing" "Company Name" | toString) + (tuple "de" "Oesterreichische Banknoten- und Sicherheitsdruck") }} P {{ .GetC "Netherlands" "Place Name" }} - Koninklijke Joh. Enschedé + {{ withTranslations "td" + (.GetC "Royal Joh. Enschedé" "Company Name" | toString) + (tuple "nl" "Koninklijke Joh. Enschedé") }} R {{ .GetC "Germany" "Place Name" }} - Bundesdruckerei GmbH + {{ withTranslations "td" + (.GetC "Federal Printing Office" "Company Name" | toString) + (tuple "de" "Bundesdruckerei") }} S {{ .GetC "Italy" "Place Name" }} - {{ .Get "Bank of Italy" }} + {{ withTranslations "td" + (.GetC "Bank of Italy" "Company Name" | toString) + (tuple "it" "Banca d’Italia") }} T {{ .GetC "Ireland" "Place Name" }} - {{ .Get "Central Bank of Ireland" }} + {{ withTranslations "td" + (.GetC "Central Bank of Ireland" "Company Name" | toString) + (tuple "ga" "Banc Ceannais na hÉireann") + (tuple "en" "Central Bank of Ireland") }} U {{ .GetC "France" "Place Name" }} - {{ .Get "Bank of France" }} + {{ withTranslations "td" + (.GetC "Bank of France" "Company Name" | toString) + (tuple "fr" "Banque du France") }} V {{ .GetC "Spain" "Place Name" }} - {{ .Get "Royal Mint of Spain" }} + {{ withTranslations "td" + (.GetC "Royal Mint of Spain" "Company Name" | toString) + (tuple "es" "Fábrica Nacional de Moneda y Timbre") }} W {{ .GetC "Germany" "Place Name" }} - Giesecke+Devrient GmbH {{ .Get "Leipzig" }} + {{ withTranslations "td" + (.GetC "Giesecke+Devrient Leipzig" "Company Name" | toString) + (tuple "de" "Giesecke+Devrient Leipzig") }} X {{ .GetC "Germany" "Place Name" }} - Giesecke+Devrient GmbH {{ .Get "Munich" }} + {{ withTranslations "td" + (.GetC "Giesecke+Devrient Munich" "Company Name" | toString) + (tuple "de" "Giesecke+Devrient München") }} Y {{ .GetC "Greece" "Place Name" }} - {{ .Get "Bank of Greece" }} + {{ withTranslations "td" + (.GetC "Bank of Greece" "Company Name" | toString) + (tuple "gr" "Τράπεζα της Ελλάδος") }} Z {{ .GetC "Belgium" "Place Name" }} - {{ .Get "National Bank of Belgium" }} + {{ withTranslations "td" + (.GetC "National Bank of Belgium" "Company Name" | toString) + (tuple "nl" "Nationale Bank van België") + (tuple "fr" "Banque nationale de Belgique") + (tuple "de" "Belgische Nationalbank") }} -- cgit v1.2.3