summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--i18n/catalog.go118
-rw-r--r--i18n/locales/el/messages.gotext.json (renamed from i18n/locales/nl-NL/messages.gotext.json)2
-rw-r--r--i18n/locales/en/messages.gotext.json (renamed from i18n/locales/en-GB/messages.gotext.json)2
-rw-r--r--i18n/locales/nl/messages.gotext.json399
-rw-r--r--i18n/printer.go65
-rw-r--r--templates/coins_designs_templ.go136
-rw-r--r--templates/coins_index_templ.go147
-rw-r--r--templates/language.templ4
-rw-r--r--templates/language_templ.go8
-rw-r--r--templates/root.templ2
-rw-r--r--templates/root_templ.go6
11 files changed, 843 insertions, 46 deletions
diff --git a/i18n/catalog.go b/i18n/catalog.go
index f0c2822..544260b 100644
--- a/i18n/catalog.go
+++ b/i18n/catalog.go
@@ -27,10 +27,13 @@ func (d *dictionary) Lookup(key string) (data string, ok bool) {
func init() {
dict := map[string]catalog.Dictionary{
+ "el": &dictionary{index: elIndex, data: elData},
+ "en": &dictionary{index: enIndex, data: enData},
"en_GB": &dictionary{index: en_GBIndex, data: en_GBData},
+ "nl": &dictionary{index: nlIndex, data: nlData},
"nl_NL": &dictionary{index: nl_NLIndex, data: nl_NLData},
}
- fallback := language.MustParse("en-GB")
+ fallback := language.MustParse("en")
cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback))
if err != nil {
panic(err)
@@ -107,6 +110,92 @@ var messageKeyToIndex = map[string]int{
"diversity": 63,
}
+var elIndex = []uint32{ // 67 elements
+ // Entry 0 - 1F
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ // Entry 20 - 3F
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ // Entry 40 - 5F
+ 0x00000000, 0x00000000, 0x00000000,
+} // Size: 292 bytes
+
+const elData string = ""
+
+var enIndex = []uint32{ // 67 elements
+ // Entry 0 - 1F
+ 0x00000000, 0x0000000f, 0x00000018, 0x00000024,
+ 0x00000189, 0x00000194, 0x00000385, 0x00000394,
+ 0x000003a0, 0x000003a9, 0x000003b6, 0x000003d2,
+ 0x000003dc, 0x000003e4, 0x000003ec, 0x000003f4,
+ 0x000003fb, 0x00000403, 0x0000040b, 0x00000411,
+ 0x00000419, 0x00000420, 0x00000427, 0x0000042f,
+ 0x00000437, 0x0000043d, 0x00000447, 0x00000452,
+ 0x00000459, 0x00000460, 0x00000466, 0x00000472,
+ // Entry 20 - 3F
+ 0x0000047b, 0x00000484, 0x0000048d, 0x00000498,
+ 0x000004a5, 0x000004b7, 0x00000599, 0x000005a4,
+ 0x0000065e, 0x00000666, 0x00000691, 0x0000069a,
+ 0x000006ca, 0x000006d4, 0x000006f7, 0x0000070c,
+ 0x0000073f, 0x00000752, 0x00000762, 0x00000767,
+ 0x0000076c, 0x0000077c, 0x00000782, 0x0000078c,
+ 0x00000793, 0x0000079b, 0x000007a1, 0x000007aa,
+ 0x000007e5, 0x000007fe, 0x00000817, 0x00000821,
+ // Entry 40 - 5F
+ 0x0000082b, 0x00000830, 0x00000948,
+} // Size: 292 bytes
+
+const enData string = "" + // Size: 2376 bytes
+ "\x02Page not found\x02About Us\x02Open Source\x02This website is an open" +
+ " project, and a collaboration between developers, translators, and resea" +
+ "rchers. All source code, data, images, and more for the website are open" +
+ " source and can be found %[1]shere%[2]s. This site is licensed under the" +
+ " BSD 0-Clause license giving you the full freedom to do whatever you wou" +
+ "ld like with any of the content on this site.\x02Contact Us\x02While we " +
+ "try to stay as up-to-date as possible and to fact check our information," +
+ " it is always possible that we get something wrong, lack a translation, " +
+ "or are missing some piece of data you may have. In such a case don’t hes" +
+ "itate to contact us; we’ll try to get the site updated or fixed as soon " +
+ "as possible. You are always free to contribute via a git patch if you ar" +
+ "e more technically included, but if not you can always send an email to " +
+ "%[1]s or contact ‘@onetruemangoman’ on Discord.\x02Special Thanks\x02Dev" +
+ "elopment\x02Research\x02Translations\x02British- & American English\x02I" +
+ "celandic\x02Andorra\x02Austria\x02Belgium\x02Cyprus\x02Germany\x02Estoni" +
+ "a\x02Spain\x02Finland\x02France\x02Greece\x02Croatia\x02Ireland\x02Italy" +
+ "\x02Lithuania\x02Luxembourg\x02Latvia\x02Monaco\x02Malta\x02Netherlands" +
+ "\x02Portugal\x02Slovenia\x02Slovakia\x02San Marino\x02Vatican City\x02Eu" +
+ "ro Coin Designs\x02Here you’ll be able to view all the coin designs for " +
+ "each country in the Eurozone. This section of the site doesn’t include m" +
+ "inor varieties such as different mintmarks or errors; those are on the %" +
+ "[1]svarieties%[2]s page.\x02Euro Coins\x02On this section of the site yo" +
+ "u can find everything there is to know about the coins of the Eurozone. " +
+ "For the latest news on coin- and design releases, check out the %[1]snew" +
+ "s%[2]s tab!\x02Designs\x02View the 600+ different Euro-coin designs!\x02" +
+ "Mintages\x02View the mintage figures of all the Euro coins!\x02Varieties" +
+ "\x02View all the known Euro varieties!\x02Select Your Language\x02Select" +
+ " your preferred language to use on the site.\x02Eurozone Languages\x02Ot" +
+ "her Languages\x02Home\x02News\x02Coin Collecting\x02Coins\x02Banknotes" +
+ "\x02Jargon\x02Discord\x02About\x02Language\x02Found a mistake or want to" +
+ " contribute missing information?\x02Feel free to contact us!\x02The Euro" +
+ " Cash Compendium\x02United in\x02diversity\x02cash\x02Welcome to the Eur" +
+ "o Cash Compendium. This sites aims to be a resource for you to discover " +
+ "everything there is to know about the coins and banknotes of the Euro, a" +
+ " currency that spans 26 countries and 350 million people. We also have d" +
+ "edicated sections of the site for collectors."
+
var en_GBIndex = []uint32{ // 67 elements
// Entry 0 - 1F
0x00000000, 0x0000000f, 0x00000018, 0x00000024,
@@ -168,6 +257,31 @@ const en_GBData string = "" + // Size: 2376 bytes
" currency that spans 26 countries and 350 million people. We also have d" +
"edicated sections of the site for collectors."
+var nlIndex = []uint32{ // 67 elements
+ // Entry 0 - 1F
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ // Entry 20 - 3F
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ // Entry 40 - 5F
+ 0x00000000, 0x00000000, 0x00000000,
+} // Size: 292 bytes
+
+const nlData string = ""
+
var nl_NLIndex = []uint32{ // 67 elements
// Entry 0 - 1F
0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -193,4 +307,4 @@ var nl_NLIndex = []uint32{ // 67 elements
const nl_NLData string = ""
-// Total table size 2960 bytes (2KiB); checksum: DDBC1523
+// Total table size 6212 bytes (6KiB); checksum: 7D179823
diff --git a/i18n/locales/nl-NL/messages.gotext.json b/i18n/locales/el/messages.gotext.json
index c3a6053..cae5b37 100644
--- a/i18n/locales/nl-NL/messages.gotext.json
+++ b/i18n/locales/el/messages.gotext.json
@@ -1,5 +1,5 @@
{
- "language": "nl-NL",
+ "language": "el",
"messages": [
{
"id": "Page not found",
diff --git a/i18n/locales/en-GB/messages.gotext.json b/i18n/locales/en/messages.gotext.json
index 9c44cf1..6505619 100644
--- a/i18n/locales/en-GB/messages.gotext.json
+++ b/i18n/locales/en/messages.gotext.json
@@ -1,5 +1,5 @@
{
- "language": "en-GB",
+ "language": "en",
"messages": [
{
"id": "Page not found",
diff --git a/i18n/locales/nl/messages.gotext.json b/i18n/locales/nl/messages.gotext.json
new file mode 100644
index 0000000..ed11410
--- /dev/null
+++ b/i18n/locales/nl/messages.gotext.json
@@ -0,0 +1,399 @@
+{
+ "language": "nl",
+ "messages": [
+ {
+ "id": "Page not found",
+ "message": "Page not found",
+ "translation": ""
+ },
+ {
+ "id": "About Us",
+ "message": "About Us",
+ "translation": ""
+ },
+ {
+ "id": "Open Source",
+ "message": "Open Source",
+ "translation": ""
+ },
+ {
+ "id": "This website is an open project, and a collaboration between developers, translators, and researchers. All source code, data, images, and more for the website are open source and can be found {RepoLinkStart}here{LinkEnd}. This site is licensed under the BSD 0-Clause license giving you the full freedom to do whatever you would like with any of the content on this site.",
+ "message": "This website is an open project, and a collaboration between developers, translators, and researchers. All source code, data, images, and more for the website are open source and can be found {RepoLinkStart}here{LinkEnd}. This site is licensed under the BSD 0-Clause license giving you the full freedom to do whatever you would like with any of the content on this site.",
+ "translation": "",
+ "placeholders": [
+ {
+ "id": "RepoLinkStart",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "repoLinkStart"
+ },
+ {
+ "id": "LinkEnd",
+ "string": "%[2]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 2,
+ "expr": "linkEnd"
+ }
+ ]
+ },
+ {
+ "id": "Contact Us",
+ "message": "Contact Us",
+ "translation": ""
+ },
+ {
+ "id": "While we try to stay as up-to-date as possible and to fact check our information, it is always possible that we get something wrong, lack a translation, or are missing some piece of data you may have. In such a case don’t hesitate to contact us; we’ll try to get the site updated or fixed as soon as possible. You are always free to contribute via a git patch if you are more technically included, but if not you can always send an email to {ContactEmail} or contact ‘@onetruemangoman’ on Discord.",
+ "message": "While we try to stay as up-to-date as possible and to fact check our information, it is always possible that we get something wrong, lack a translation, or are missing some piece of data you may have. In such a case don’t hesitate to contact us; we’ll try to get the site updated or fixed as soon as possible. You are always free to contribute via a git patch if you are more technically included, but if not you can always send an email to {ContactEmail} or contact ‘@onetruemangoman’ on Discord.",
+ "translation": "",
+ "placeholders": [
+ {
+ "id": "ContactEmail",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "contactEmail"
+ }
+ ]
+ },
+ {
+ "id": "Special Thanks",
+ "message": "Special Thanks",
+ "translation": ""
+ },
+ {
+ "id": "Development",
+ "message": "Development",
+ "translation": ""
+ },
+ {
+ "id": "Research",
+ "message": "Research",
+ "translation": ""
+ },
+ {
+ "id": "Translations",
+ "message": "Translations",
+ "translation": ""
+ },
+ {
+ "id": "British- \u0026 American English",
+ "message": "British- \u0026 American English",
+ "translation": ""
+ },
+ {
+ "id": "Icelandic",
+ "message": "Icelandic",
+ "translation": ""
+ },
+ {
+ "id": "Andorra",
+ "message": "Andorra",
+ "translation": ""
+ },
+ {
+ "id": "Austria",
+ "message": "Austria",
+ "translation": ""
+ },
+ {
+ "id": "Belgium",
+ "message": "Belgium",
+ "translation": ""
+ },
+ {
+ "id": "Cyprus",
+ "message": "Cyprus",
+ "translation": ""
+ },
+ {
+ "id": "Germany",
+ "message": "Germany",
+ "translation": ""
+ },
+ {
+ "id": "Estonia",
+ "message": "Estonia",
+ "translation": ""
+ },
+ {
+ "id": "Spain",
+ "message": "Spain",
+ "translation": ""
+ },
+ {
+ "id": "Finland",
+ "message": "Finland",
+ "translation": ""
+ },
+ {
+ "id": "France",
+ "message": "France",
+ "translation": ""
+ },
+ {
+ "id": "Greece",
+ "message": "Greece",
+ "translation": ""
+ },
+ {
+ "id": "Croatia",
+ "message": "Croatia",
+ "translation": ""
+ },
+ {
+ "id": "Ireland",
+ "message": "Ireland",
+ "translation": ""
+ },
+ {
+ "id": "Italy",
+ "message": "Italy",
+ "translation": ""
+ },
+ {
+ "id": "Lithuania",
+ "message": "Lithuania",
+ "translation": ""
+ },
+ {
+ "id": "Luxembourg",
+ "message": "Luxembourg",
+ "translation": ""
+ },
+ {
+ "id": "Latvia",
+ "message": "Latvia",
+ "translation": ""
+ },
+ {
+ "id": "Monaco",
+ "message": "Monaco",
+ "translation": ""
+ },
+ {
+ "id": "Malta",
+ "message": "Malta",
+ "translation": ""
+ },
+ {
+ "id": "Netherlands",
+ "message": "Netherlands",
+ "translation": ""
+ },
+ {
+ "id": "Portugal",
+ "message": "Portugal",
+ "translation": ""
+ },
+ {
+ "id": "Slovenia",
+ "message": "Slovenia",
+ "translation": ""
+ },
+ {
+ "id": "Slovakia",
+ "message": "Slovakia",
+ "translation": ""
+ },
+ {
+ "id": "San Marino",
+ "message": "San Marino",
+ "translation": ""
+ },
+ {
+ "id": "Vatican City",
+ "message": "Vatican City",
+ "translation": ""
+ },
+ {
+ "id": "Euro Coin Designs",
+ "message": "Euro Coin Designs",
+ "translation": ""
+ },
+ {
+ "id": "Here you’ll be able to view all the coin designs for each country in the Eurozone. This section of the site doesn’t include minor varieties such as different mintmarks or errors; those are on the {VarietiesLinkStart}varieties{LinkEnd} page.",
+ "message": "Here you’ll be able to view all the coin designs for each country in the Eurozone. This section of the site doesn’t include minor varieties such as different mintmarks or errors; those are on the {VarietiesLinkStart}varieties{LinkEnd} page.",
+ "translation": "",
+ "placeholders": [
+ {
+ "id": "VarietiesLinkStart",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "varietiesLinkStart"
+ },
+ {
+ "id": "LinkEnd",
+ "string": "%[2]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 2,
+ "expr": "linkEnd"
+ }
+ ]
+ },
+ {
+ "id": "Euro Coins",
+ "message": "Euro Coins",
+ "translation": ""
+ },
+ {
+ "id": "On this section of the site you can find everything there is to know about the coins of the Eurozone. For the latest news on coin- and design releases, check out the {NewsLinkStart}news{LinkEnd} tab!",
+ "message": "On this section of the site you can find everything there is to know about the coins of the Eurozone. For the latest news on coin- and design releases, check out the {NewsLinkStart}news{LinkEnd} tab!",
+ "translation": "",
+ "placeholders": [
+ {
+ "id": "NewsLinkStart",
+ "string": "%[1]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 1,
+ "expr": "newsLinkStart"
+ },
+ {
+ "id": "LinkEnd",
+ "string": "%[2]s",
+ "type": "string",
+ "underlyingType": "string",
+ "argNum": 2,
+ "expr": "linkEnd"
+ }
+ ]
+ },
+ {
+ "id": "Designs",
+ "message": "Designs",
+ "translation": ""
+ },
+ {
+ "id": "View the 600+ different Euro-coin designs!",
+ "message": "View the 600+ different Euro-coin designs!",
+ "translation": ""
+ },
+ {
+ "id": "Mintages",
+ "message": "Mintages",
+ "translation": ""
+ },
+ {
+ "id": "View the mintage figures of all the Euro coins!",
+ "message": "View the mintage figures of all the Euro coins!",
+ "translation": ""
+ },
+ {
+ "id": "Varieties",
+ "message": "Varieties",
+ "translation": ""
+ },
+ {
+ "id": "View all the known Euro varieties!",
+ "message": "View all the known Euro varieties!",
+ "translation": ""
+ },
+ {
+ "id": "Select Your Language",
+ "message": "Select Your Language",
+ "translation": ""
+ },
+ {
+ "id": "Select your preferred language to use on the site.",
+ "message": "Select your preferred language to use on the site.",
+ "translation": ""
+ },
+ {
+ "id": "Eurozone Languages",
+ "message": "Eurozone Languages",
+ "translation": ""
+ },
+ {
+ "id": "Other Languages",
+ "message": "Other Languages",
+ "translation": ""
+ },
+ {
+ "id": "Home",
+ "message": "Home",
+ "translation": ""
+ },
+ {
+ "id": "News",
+ "message": "News",
+ "translation": ""
+ },
+ {
+ "id": "Coin Collecting",
+ "message": "Coin Collecting",
+ "translation": ""
+ },
+ {
+ "id": "Coins",
+ "message": "Coins",
+ "translation": ""
+ },
+ {
+ "id": "Banknotes",
+ "message": "Banknotes",
+ "translation": ""
+ },
+ {
+ "id": "Jargon",
+ "message": "Jargon",
+ "translation": ""
+ },
+ {
+ "id": "Discord",
+ "message": "Discord",
+ "translation": ""
+ },
+ {
+ "id": "About",
+ "message": "About",
+ "translation": ""
+ },
+ {
+ "id": "Language",
+ "message": "Language",
+ "translation": ""
+ },
+ {
+ "id": "Found a mistake or want to contribute missing information?",
+ "message": "Found a mistake or want to contribute missing information?",
+ "translation": ""
+ },
+ {
+ "id": "Feel free to contact us!",
+ "message": "Feel free to contact us!",
+ "translation": ""
+ },
+ {
+ "id": "The Euro Cash Compendium",
+ "message": "The Euro Cash Compendium",
+ "translation": ""
+ },
+ {
+ "id": "United in",
+ "message": "United in",
+ "translation": ""
+ },
+ {
+ "id": "diversity",
+ "message": "diversity",
+ "translation": ""
+ },
+ {
+ "id": "cash",
+ "message": "cash",
+ "translation": ""
+ },
+ {
+ "id": "Welcome to the Euro Cash Compendium. This sites aims to be a resource for you to discover everything there is to know about the coins and banknotes of the Euro, a currency that spans 26 countries and 350 million people. We also have dedicated sections of the site for collectors.",
+ "message": "Welcome to the Euro Cash Compendium. This sites aims to be a resource for you to discover everything there is to know about the coins and banknotes of the Euro, a currency that spans 26 countries and 350 million people. We also have dedicated sections of the site for collectors.",
+ "translation": ""
+ }
+ ]
+} \ No newline at end of file
diff --git a/i18n/printer.go b/i18n/printer.go
index fc198f5..83ef625 100644
--- a/i18n/printer.go
+++ b/i18n/printer.go
@@ -9,7 +9,7 @@ import (
"golang.org/x/text/message"
)
-//go:generate gotext -srclang=en-GB update -out=catalog.go -lang=en-GB,nl-NL git.thomasvoss.com/euro-cash.eu
+//go:generate gotext -srclang=en update -out=catalog.go -lang=el,en,nl git.thomasvoss.com/euro-cash.eu
type Printer struct {
Locale Locale
@@ -17,7 +17,7 @@ type Printer struct {
}
type Locale struct {
- Code string
+ Bcp string
Name string
dateFmt string
moneyFmt string
@@ -28,133 +28,133 @@ type Locale struct {
var (
Locales = [...]Locale{
{
- Code: "ca-AD",
+ Bcp: "ca",
Name: "català",
dateFmt: "2/1/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "de-DE",
+ Bcp: "de",
Name: "Deutsch",
dateFmt: "2.1.2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "el-GR",
+ Bcp: "el",
Name: "ελληνικά",
dateFmt: "2/1/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "en-GB",
+ Bcp: "en",
Name: "English",
dateFmt: "02/01/2006",
Eurozone: true,
Enabled: true,
},
{
- Code: "es-ES",
+ Bcp: "es",
Name: "español",
dateFmt: "2/1/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "et-EE",
+ Bcp: "et",
Name: "eesti",
dateFmt: "2.1.2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "fi-FI",
+ Bcp: "fi",
Name: "suomi",
dateFmt: "2.1.2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "fr-FR",
+ Bcp: "fr",
Name: "français",
dateFmt: "02/01/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "ga-IE",
+ Bcp: "ga",
Name: "Gaeilge",
dateFmt: "02/01/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "hr-HR",
+ Bcp: "hr",
Name: "hrvatski",
dateFmt: "02. 01. 2006.",
Eurozone: true,
Enabled: false,
},
{
- Code: "it-IT",
+ Bcp: "it",
Name: "italiano",
dateFmt: "02/01/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "lb-LU",
+ Bcp: "lb",
Name: "lëtzebuergesch",
dateFmt: "2.1.2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "lt-LT",
+ Bcp: "lt",
Name: "lietuvių",
dateFmt: "2006-01-02",
Eurozone: true,
Enabled: false,
},
{
- Code: "lv-LV",
+ Bcp: "lv",
Name: "latviešu",
dateFmt: "2.01.2006.",
Eurozone: true,
Enabled: false,
},
{
- Code: "mt-MT",
+ Bcp: "mt",
Name: "Malti",
dateFmt: "2/1/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "nl-NL",
+ Bcp: "nl",
Name: "Nederlands",
dateFmt: "2-1-2006",
Eurozone: true,
Enabled: true,
},
{
- Code: "pt-PT",
+ Bcp: "pt",
Name: "português",
dateFmt: "02/01/2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "sk-SK",
+ Bcp: "sk",
Name: "slovenčina",
dateFmt: "2. 1. 2006",
Eurozone: true,
Enabled: false,
},
{
- Code: "sl-SI",
+ Bcp: "sl",
Name: "slovenščina",
dateFmt: "2. 1. 2006",
Eurozone: true,
@@ -163,28 +163,28 @@ var (
/* Non-Eurozone locales */
{
- Code: "bg-BG",
+ Bcp: "bg",
Name: "български",
dateFmt: "2.01.2006 г.",
Eurozone: false,
Enabled: false,
},
{
- Code: "en-US",
+ Bcp: "en-US",
Name: "English (US)",
dateFmt: "1/2/2006",
Eurozone: false,
Enabled: false,
},
{
- Code: "ro-RO",
+ Bcp: "ro",
Name: "română",
dateFmt: "02.01.2006",
Eurozone: false,
Enabled: false,
},
{
- Code: "uk-UA",
+ Bcp: "uk",
Name: "yкраїнська",
dateFmt: "02.01.2006",
Eurozone: false,
@@ -201,14 +201,14 @@ var (
func InitPrinters() {
for _, loc := range Locales {
if loc.Enabled {
- lang := language.MustParse(loc.Code)
- Printers[strings.ToLower(loc.Code)] = Printer{
+ lang := language.MustParse(loc.Bcp)
+ Printers[strings.ToLower(loc.Bcp)] = Printer{
Locale: loc,
printer: message.NewPrinter(lang),
}
}
}
- DefaultPrinter = Printers["en-gb"]
+ DefaultPrinter = Printers["en"]
}
func (p Printer) T(fmt string, args ...any) string {
@@ -235,16 +235,17 @@ func (p Printer) Money(val float64, round bool) string {
/* All Eurozone languages place the eurosign after the value except
for Dutch, English, Gaelic, and Maltese. Austrian German also
uses Dutch-style formatting, but we do not support that dialect. */
- switch p.Locale.Code {
- case "en-GB", "en-US", "ga-IE", "mt-MT":
+ switch p.Locale.Bcp {
+ case "en", "en-US", "ga", "mt":
return fmt.Sprintf("€%s", valstr)
- case "nl-NL":
+ case "nl":
return fmt.Sprintf("€ %s", valstr)
default:
return fmt.Sprintf("%s €", valstr)
}
}
+/* Transform ‘en-US’ to ‘en’ */
func (l Locale) Language() string {
- return l.Code[:2]
+ return l.Bcp[:2]
}
diff --git a/templates/coins_designs_templ.go b/templates/coins_designs_templ.go
new file mode 100644
index 0000000..c826541
--- /dev/null
+++ b/templates/coins_designs_templ.go
@@ -0,0 +1,136 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.2.747
+package templates
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "git.thomasvoss.com/euro-cash.eu/i18n"
+
+type country struct {
+ Code, Name string
+}
+
+var varietiesLinkStart = `<a href="/coins/varieties">`
+
+func CoinsDesigns() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+
+ p := ctx.Value("printer").(i18n.Printer)
+ countries := []country{
+ {Code: "AD", Name: p.T("Andorra")},
+ {Code: "AT", Name: p.T("Austria")},
+ {Code: "BE", Name: p.T("Belgium")},
+ {Code: "CY", Name: p.T("Cyprus")},
+ {Code: "DE", Name: p.T("Germany")},
+ {Code: "EE", Name: p.T("Estonia")},
+ {Code: "ES", Name: p.T("Spain")},
+ {Code: "FI", Name: p.T("Finland")},
+ {Code: "FR", Name: p.T("France")},
+ {Code: "GR", Name: p.T("Greece")},
+ {Code: "HR", Name: p.T("Croatia")},
+ {Code: "IE", Name: p.T("Ireland")},
+ {Code: "IT", Name: p.T("Italy")},
+ {Code: "LT", Name: p.T("Lithuania")},
+ {Code: "LU", Name: p.T("Luxembourg")},
+ {Code: "LV", Name: p.T("Latvia")},
+ {Code: "MC", Name: p.T("Monaco")},
+ {Code: "MT", Name: p.T("Malta")},
+ {Code: "NL", Name: p.T("Netherlands")},
+ {Code: "PT", Name: p.T("Portugal")},
+ {Code: "SI", Name: p.T("Slovenia")},
+ {Code: "SK", Name: p.T("Slovakia")},
+ {Code: "SM", Name: p.T("San Marino")},
+ {Code: "VA", Name: p.T("Vatican City")},
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<header>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = navbar().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h1>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Euro Coin Designs"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_designs.templ`, Line: 43, Col: 32}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></header><main><p>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ.Raw(p.T("Here you’ll be able to view all the coin designs for each country in the Eurozone. This section of the site doesn’t include minor varieties such as different mintmarks or errors; those are on the %svarieties%s page.", varietiesLinkStart, linkEnd)).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><hr><div class=\"country-grid\">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for _, c := range countries {
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<a role=\"button\" class=\"outline\" data-code=\"")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(c.Code)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_designs.templ`, Line: 55, Col: 23}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" href=\"#TODO\">")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var4 string
+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.T(c.Name))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_designs.templ`, Line: 58, Col: 18}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></main>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return templ_7745c5c3_Err
+ })
+}
diff --git a/templates/coins_index_templ.go b/templates/coins_index_templ.go
new file mode 100644
index 0000000..ad40c1e
--- /dev/null
+++ b/templates/coins_index_templ.go
@@ -0,0 +1,147 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.2.747
+package templates
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "git.thomasvoss.com/euro-cash.eu/i18n"
+
+const newsLinkStart = `<a href="/news">`
+
+func CoinsIndex() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ p := ctx.Value("printer").(i18n.Printer)
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<header>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = navbar().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h1>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Euro Coins"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 11, Col: 25}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1></header><main><p>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ.Raw(p.T("On this section of the site you can find everything there is to know about the coins of the Eurozone. For the latest news on coin- and design releases, check out the %snews%s tab!", newsLinkStart, linkEnd)).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><hr><section><div class=\"grid\"><a class=\"no-deco\" href=\"/coins/designs\"><article><header><h3>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Designs"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 23, Col: 27}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></header><main>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var4 string
+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("View the 600+ different Euro-coin designs!"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 26, Col: 58}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></article></a> <a class=\"no-deco\" href=\"#TODO\"><article><header><h3>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Mintages"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 33, Col: 28}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></header><main>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var6 string
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("View the mintage figures of all the Euro coins!"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 36, Col: 63}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></article></a> <a class=\"no-deco\" href=\"#TODO\"><article><header><h3>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var7 string
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("Varieties"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 43, Col: 29}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></header><main>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var8 string
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(p.T("View all the known Euro varieties!"))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `coins_index.templ`, Line: 46, Col: 50}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</main></article></a></div></section></main>")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return templ_7745c5c3_Err
+ })
+}
diff --git a/templates/language.templ b/templates/language.templ
index ba8db78..58dc8b6 100644
--- a/templates/language.templ
+++ b/templates/language.templ
@@ -37,11 +37,11 @@ templ languageGrid(eurozone bool) {
<button
type="submit"
name="locale"
- value={ loc.Code }
+ value={ loc.Bcp }
disabled?={ !loc.Enabled }
>
<span
- lang={ loc.Code }
+ lang={ loc.Bcp }
data-code={ strings.ToUpper(loc.Language()) }
>
{ loc.Name }
diff --git a/templates/language_templ.go b/templates/language_templ.go
index 6842b99..6d7182c 100644
--- a/templates/language_templ.go
+++ b/templates/language_templ.go
@@ -146,9 +146,9 @@ func languageGrid(eurozone bool) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(loc.Code)
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(loc.Bcp)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `language.templ`, Line: 40, Col: 22}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `language.templ`, Line: 40, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -169,9 +169,9 @@ func languageGrid(eurozone bool) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(loc.Code)
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(loc.Bcp)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `language.templ`, Line: 44, Col: 22}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `language.templ`, Line: 44, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
diff --git a/templates/root.templ b/templates/root.templ
index 80b4a95..f4fd0e2 100644
--- a/templates/root.templ
+++ b/templates/root.templ
@@ -5,7 +5,7 @@ import "git.thomasvoss.com/euro-cash.eu/i18n"
templ Root(head, body templ.Component) {
{{ p := ctx.Value("printer").(i18n.Printer) }}
<!DOCTYPE html>
- <html lang={ p.Locale.Code } data-theme={ ctx.Value("theme").(string) }>
+ <html lang={ p.Locale.Bcp } data-theme={ ctx.Value("theme").(string) }>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
diff --git a/templates/root_templ.go b/templates/root_templ.go
index dbb6345..895e404 100644
--- a/templates/root_templ.go
+++ b/templates/root_templ.go
@@ -34,9 +34,9 @@ func Root(head, body templ.Component) templ.Component {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
- templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.Locale.Code)
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(p.Locale.Bcp)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `root.templ`, Line: 8, Col: 27}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `root.templ`, Line: 8, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -49,7 +49,7 @@ func Root(head, body templ.Component) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(ctx.Value("theme").(string))
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `root.templ`, Line: 8, Col: 70}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `root.templ`, Line: 8, Col: 69}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {