aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/i18n/i18n.go405
-rw-r--r--src/templates/-404.html.tmpl2
-rw-r--r--src/templates/-error.html.tmpl4
-rw-r--r--src/templates/coins-designs-ad.html.tmpl4
-rw-r--r--src/templates/coins-designs-de.html.tmpl63
-rw-r--r--src/templates/coins-designs-hr.html.tmpl8
-rw-r--r--src/templates/coins-designs-nl.html.tmpl48
-rw-r--r--src/templates/coins-mintages.html.tmpl87
8 files changed, 355 insertions, 266 deletions
diff --git a/src/i18n/i18n.go b/src/i18n/i18n.go
index 3bc490f..b996681 100644
--- a/src/i18n/i18n.go
+++ b/src/i18n/i18n.go
@@ -17,11 +17,12 @@ type Printer struct {
}
type LocaleInfo struct {
- Bcp, Name string
- Eurozone, Enabled bool
- DateFormat string
- ThousandsSeparator, DecimalSeparator rune
- MonetaryPre, MonetaryPost [2]string
+ Bcp, Name string
+ Eurozone, Enabled bool
+ DateFormat string
+ GroupSeparator, DecimalSeparator rune
+ MonetaryPre [2]string
+ MonetaryPost string
}
type number interface {
@@ -41,205 +42,267 @@ var (
'r': sprintfr,
}
- /* To determine the correct date format to use, use the ‘datefmt’ script in
- the repository root */
+ /* To determine the correct currency-, date-, and number formats to
+ use, use the ‘getfmt’ script in the repository root */
locales = [...]LocaleInfo{
{
- Bcp: "ca",
- Name: "Català",
- DateFormat: "2/1/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "ca",
+ Name: "Català",
+ DateFormat: "2/1/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "de",
- Name: "Deutsch",
- DateFormat: "2.1.2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "de",
+ Name: "Deutsch",
+ DateFormat: "2.1.2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "el",
- Name: "Ελληνικά",
- DateFormat: "2/1/2006",
- Eurozone: true,
- Enabled: true,
+ Bcp: "el",
+ Name: "Ελληνικά",
+ DateFormat: "2/1/2006",
+ Eurozone: true,
+ Enabled: true,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "en",
- Name: "English",
- DateFormat: "02/01/2006",
- Eurozone: true,
- Enabled: true,
- ThousandsSeparator: ',',
- DecimalSeparator: '.',
- MonetaryPre: [2]string{"€", "-€"},
+ Bcp: "en",
+ Name: "English",
+ DateFormat: "02/01/2006",
+ Eurozone: true,
+ Enabled: true,
+ GroupSeparator: ',',
+ DecimalSeparator: '.',
+ MonetaryPre: [2]string{"€", "-€"},
},
{
- Bcp: "es",
- Name: "Español",
- DateFormat: "2/1/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "es",
+ Name: "Español",
+ DateFormat: "2/1/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "et",
- Name: "Eesti",
- DateFormat: "2.1.2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "et",
+ Name: "Eesti",
+ DateFormat: "2.1.2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "fi",
- Name: "Suomi",
- DateFormat: "2.1.2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "fi",
+ Name: "Suomi",
+ DateFormat: "2.1.2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "fr",
- Name: "Français",
- DateFormat: "02/01/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "fr",
+ Name: "Français",
+ DateFormat: "02/01/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "ga",
- Name: "Gaeilge",
- DateFormat: "02/01/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "ga",
+ Name: "Gaeilge",
+ DateFormat: "02/01/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ',',
+ DecimalSeparator: '.',
+ MonetaryPre: [2]string{"€", "-€"},
},
{
- Bcp: "hr",
- Name: "Hrvatski",
- DateFormat: "02. 01. 2006.",
- Eurozone: true,
- Enabled: false,
+ Bcp: "hr",
+ Name: "Hrvatski",
+ DateFormat: "02. 01. 2006.",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "it",
- Name: "Italiano",
- DateFormat: "02/01/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "it",
+ Name: "Italiano",
+ DateFormat: "02/01/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "lb",
- Name: "Lëtzebuergesch",
- DateFormat: "2.1.2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "lb",
+ Name: "Lëtzebuergesch",
+ DateFormat: "2.1.2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "lt",
- Name: "Lietuvių",
- DateFormat: "2006-01-02",
- Eurozone: true,
- Enabled: false,
+ Bcp: "lt",
+ Name: "Lietuvių",
+ DateFormat: "2006-01-02",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "lv",
- Name: "Latviešu",
- DateFormat: "2.01.2006.",
- Eurozone: true,
- Enabled: false,
+ Bcp: "lv",
+ Name: "Latviešu",
+ DateFormat: "2.01.2006.",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "mt",
- Name: "Malti",
- DateFormat: "2/1/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "mt",
+ Name: "Malti",
+ DateFormat: "2/1/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ',',
+ DecimalSeparator: '.',
+ MonetaryPre: [2]string{"€", "-€"},
},
{
- Bcp: "nl",
- Name: "Nederlands",
- DateFormat: "2-1-2006",
- Eurozone: true,
- Enabled: true,
- ThousandsSeparator: '.',
- DecimalSeparator: ',',
- MonetaryPre: [2]string{"€ ", "€ -"},
+ Bcp: "nl",
+ Name: "Nederlands",
+ DateFormat: "2-1-2006",
+ Eurozone: true,
+ Enabled: true,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"€ ", "€ -"},
},
{
- Bcp: "pt",
- Name: "Português",
- DateFormat: "02/01/2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "pt",
+ Name: "Português",
+ DateFormat: "02/01/2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"€ ", "€ -"},
},
{
- Bcp: "sk",
- Name: "Slovenčina",
- DateFormat: "2. 1. 2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "sk",
+ Name: "Slovenčina",
+ DateFormat: "2. 1. 2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "sl",
- Name: "Slovenščina",
- DateFormat: "2. 1. 2006",
- Eurozone: true,
- Enabled: false,
+ Bcp: "sl",
+ Name: "Slovenščina",
+ DateFormat: "2. 1. 2006",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "sv",
- Name: "Svenska",
- DateFormat: "2006-01-02",
- Eurozone: true,
- Enabled: false,
+ Bcp: "sv",
+ Name: "Svenska",
+ DateFormat: "2006-01-02",
+ Eurozone: true,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
-
/* Non-Eurozone locales */
{
- Bcp: "bg",
- Name: "Български",
- DateFormat: "2.01.2006 г.",
- Eurozone: false, /* TODO(2026): Set to true */
- Enabled: true,
- },
- {
- Bcp: "da",
- Name: "Dansk",
- DateFormat: "02.01.2006",
- Eurozone: false,
- Enabled: false,
- },
- {
- Bcp: "en-US",
- Name: "English (US)",
- DateFormat: "1/2/2006",
- Eurozone: false,
- Enabled: false,
- },
- {
- Bcp: "hu",
- Name: "Magyar",
- DateFormat: "2006. 01. 02.",
- Eurozone: false,
- Enabled: false,
+ Bcp: "bg",
+ Name: "Български",
+ DateFormat: "2.01.2006 г.",
+ Eurozone: false, /* TODO(2026): Set to true */
+ Enabled: true,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "pl",
- Name: "Polski",
- DateFormat: "2.01.2006",
- Eurozone: false,
- Enabled: false,
+ Bcp: "en-US",
+ Name: "English (US)",
+ DateFormat: "1/2/2006",
+ Eurozone: false,
+ Enabled: false,
+ GroupSeparator: ',',
+ DecimalSeparator: '.',
+ MonetaryPre: [2]string{"€", "-€"},
},
{
- Bcp: "ro",
- Name: "Română",
- DateFormat: "02.01.2006",
- Eurozone: false,
- Enabled: false,
+ Bcp: "ro",
+ Name: "Română",
+ DateFormat: "02.01.2006",
+ Eurozone: false,
+ Enabled: false,
+ GroupSeparator: '.',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
{
- Bcp: "uk",
- Name: "Yкраїнська",
- DateFormat: "02.01.2006",
- Eurozone: false,
- Enabled: false,
+ Bcp: "uk",
+ Name: "Yкраїнська",
+ DateFormat: "02.01.2006",
+ Eurozone: false,
+ Enabled: false,
+ GroupSeparator: ' ',
+ DecimalSeparator: ',',
+ MonetaryPre: [2]string{"", "-"},
+ MonetaryPost: " €",
},
}
/* Map of language codes to printers. We do this instead of just
@@ -280,7 +343,7 @@ func (l LocaleInfo) Language() string {
func (p Printer) Sprintf(format string, args ...map[string]any) string {
var bob strings.Builder
vars := map[string]any{
- "-": "",
+ "-": "a",
}
for _, arg := range args {
maps.Copy(vars, arg)
@@ -347,9 +410,9 @@ func sprintfGeneric(li LocaleInfo, bob *strings.Builder, v any) error {
case time.Time:
htmlesc(bob, v.(time.Time).Format(li.DateFormat))
case int:
- writeInt(bob, v.(int), li.ThousandsSeparator)
+ writeInt(bob, v.(int), li.GroupSeparator)
case float64:
- writeFloat(bob, v.(float64), li.ThousandsSeparator, li.DecimalSeparator)
+ writeFloat(bob, v.(float64), li.GroupSeparator, li.DecimalSeparator)
case string:
htmlesc(bob, v.(string))
default:
@@ -371,8 +434,16 @@ func sprintfe(li LocaleInfo, bob *strings.Builder, v any) error {
return nil
}
-func sprintfE(li LocaleInfo, bob *strings.Builder, _ any) error {
- bob.WriteString("</a>")
+func sprintfE(li LocaleInfo, bob *strings.Builder, v any) error {
+ s, ok := v.(string)
+ if !ok {
+ return errors.New("TODO")
+ }
+ for tag := range strings.SplitSeq(s, ",") {
+ bob.WriteString("</")
+ bob.WriteString(tag)
+ bob.WriteByte('>')
+ }
return nil
}
@@ -402,16 +473,14 @@ func sprintfm(li LocaleInfo, bob *strings.Builder, v any) error {
switch v.(type) {
case int:
n := v.(int)
- i := btoi(n >= 0)
- htmlesc(bob, li.MonetaryPre[i])
- writeInt(bob, abs(n), li.ThousandsSeparator)
- htmlesc(bob, li.MonetaryPost[i])
+ htmlesc(bob, li.MonetaryPre[btoi(n >= 0)])
+ writeInt(bob, abs(n), li.GroupSeparator)
+ htmlesc(bob, li.MonetaryPost)
case float64:
n := v.(float64)
- i := btoi(n >= 0)
- htmlesc(bob, li.MonetaryPre[i])
- writeFloat(bob, abs(n), li.ThousandsSeparator, li.DecimalSeparator)
- htmlesc(bob, li.MonetaryPost[i])
+ htmlesc(bob, li.MonetaryPre[btoi(n >= 0)])
+ writeFloat(bob, abs(n), li.GroupSeparator, li.DecimalSeparator)
+ htmlesc(bob, li.MonetaryPost)
default:
return errors.New("TODO")
}
diff --git a/src/templates/-404.html.tmpl b/src/templates/-404.html.tmpl
index 06ac02b..03602e1 100644
--- a/src/templates/-404.html.tmpl
+++ b/src/templates/-404.html.tmpl
@@ -5,7 +5,7 @@
</header>
<main>
<p>
- {{ .Get "The page you were looking for does not exist. If you believe this is a mistake then don’t hesitate to contact ‘@onetruemangoman’ on Discord or email us at %(Email:e)."
+ {{ .Get "The page you were looking for does not exist. If you believe this is a mistake then don’t hesitate to contact ‘@onetruemangoman’ on Discord or email us at {Email:e}."
(map "Email" "mail@euro-cash.eu") }}
</p>
</main>
diff --git a/src/templates/-error.html.tmpl b/src/templates/-error.html.tmpl
index 5b8258b..a18ec3e 100644
--- a/src/templates/-error.html.tmpl
+++ b/src/templates/-error.html.tmpl
@@ -8,8 +8,8 @@
{{ .Get "If you’re seeing this page, it means that something went wrong on our end that we need to fix. Our team has been notified of this error, and we apologise for the inconvenience." }}
</p>
<p>
- {{ .Get "If this issue persists, don’t hesitate to contact ‘@onetruemangoman’ on Discord or to email us at %(Email:e)"
- (map "Email" "mail@euro-cash.eu") }}
+ {{ .Get "If this issue persists, don’t hesitate to contact ‘@onetruemangoman’ on Discord or to email us at {Email:e}"
+ (map "Email" "mail@euro-cash.eu") }}
</p>
</main>
{{ end }} \ No newline at end of file
diff --git a/src/templates/coins-designs-ad.html.tmpl b/src/templates/coins-designs-ad.html.tmpl
index ab27555..d63110c 100644
--- a/src/templates/coins-designs-ad.html.tmpl
+++ b/src/templates/coins-designs-ad.html.tmpl
@@ -44,8 +44,8 @@
<li>{{ .Get "The arms of Catalonia" }}</li>
<li>{{ .Get "The arms of the Viscounts of Béarn" }}</li>
</ul>
- {{ .Get "The bottom of the coat of arms has the motto ‘{LatinStart:r}VIRTVS VNITA FORTIOR{LatinEnd:r}’ (English: ‘UNITED VIRTUE IS STRONGER’)."
- (map "LatinStart" `<span lang="la"><em>` "LatinEnd" `</em></span>`) }}
+ {{ .Get "The bottom of the coat of arms has the motto ‘{LatinStart:r}VIRTVS VNITA FORTIOR{LatinEnd:E}’ (English: ‘UNITED VIRTUE IS STRONGER’)."
+ (map "LatinStart" `<span lang="la"><em>` "LatinEnd" "em,span") }}
</p>
</main>
{{ end }} \ No newline at end of file
diff --git a/src/templates/coins-designs-de.html.tmpl b/src/templates/coins-designs-de.html.tmpl
new file mode 100644
index 0000000..995752f
--- /dev/null
+++ b/src/templates/coins-designs-de.html.tmpl
@@ -0,0 +1,63 @@
+{{ define "content" }}
+<header>
+ {{ template "navbar" . }}
+ <h1>{{ .Get "German Euro Coin Designs" }}</h1>
+</header>
+<main>
+ {{ $deargs := (map "GermanStart" `<span lang="de"><em>` "GermanEnd" "em,span") }}
+
+ <div class="design-container">
+ <img alt="{{ .Get `German €0.01 coin` }}" src="/designs/de-001.avif">
+ <img alt="{{ .Get `German €0.10 coin` }}" src="/designs/de-010.avif">
+ <img alt="{{ .Get `German €1 coin` }}" src="/designs/de-100.avif">
+ </div>
+ <p>
+ {{ .Get "The German euro coins feature three different designs. A unique feature of German euro coins are the mint marks on each coin that denote in which city a given coin was minted. Germany has five active mints that produce Euro coins, which are denoted in the table below." }}
+ </p>
+
+ <table>
+ <thead>
+ <tr>
+ <th>{{ .Get "City" }}</th>
+ <th>{{ .Get "Mintmark" }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ .Get "Berlin" }}</td>
+ <td>A</td>
+ </tr>
+ <tr>
+ <td>{{ .Get "Munich" }}</td>
+ <td>D</td>
+ </tr>
+ <tr>
+ <td>{{ .Get "Stuttgart" }}</td>
+ <td>F</td>
+ </tr>
+ <tr>
+ <td>{{ .Get "Karlsruhe" }}</td>
+ <td>G</td>
+ </tr>
+ <tr>
+ <td>{{ .Get "Hamburg" }}</td>
+ <td>J</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>
+ {{ .Get "The bronze coins display an oak twig which is similar to the one found on the former Pfennig coins from the German Mark. The mint mark and year are located on the left- and right-hand sides of the stem." }}
+ </p>
+ <p>
+ {{ .Get "The gold coins feature the Brandenburg Gate, a symbol of Berlin and Germany as a whole, but also a symbol of German division and unity. The mint mark is located below the year." }}
+ </p>
+ <p>
+ {{ .Get "The bimetallic coins feature an interpretation of the German Federal Eagle (German: ‘{GermanStart:r}Bundesadler{GermanEnd:E}’). The eagle is a common motif in German heraldry — including in the German coat of arms — and represents strength and freedom. The mint mark is located to the right of the year." $deargs }}
+ </p>
+ <p>
+ <!-- TODO: Get a picture of the edge-inscription -->
+ {{ .Get "The €2 coin also features an edge-inscription of Germany’s national motto and incipit of Germany’s national anthem. It reads ‘{GermanStart:r}EINIGKEIT UND RECHT UND FREIHEIT{GermanEnd:E}’ (English: ‘UNITY AND JUSTICE AND FREEDOM’)." $deargs }}
+ </p>
+</main>
+{{ end }} \ No newline at end of file
diff --git a/src/templates/coins-designs-hr.html.tmpl b/src/templates/coins-designs-hr.html.tmpl
index 3c8fae5..9f98a9b 100644
--- a/src/templates/coins-designs-hr.html.tmpl
+++ b/src/templates/coins-designs-hr.html.tmpl
@@ -4,7 +4,7 @@
<h1>{{ .Get "Croatian Euro Coin Designs" }}</h1>
</header>
<main>
- {{ $hrargs := (map "CroatianStart" `<span lang="hr"><em>` "CroatianEnd" `</em></span>`) }}
+ {{ $hrargs := (map "CroatianStart" `<span lang="hr"><em>` "CroatianEnd" "em,span") }}
<div class="design-container">
<img alt="{{ .Get `Croatian €0.01 coin` }}" src="/designs/hr-001.avif" />
<img alt="{{ .Get `Croatian €0.50 coin` }}" src="/designs/hr-050.avif" />
@@ -14,7 +14,7 @@
<img alt="{{ .Get `Croatian €2 coin` }}" src="/designs/hr-200.avif" />
</div>
<p>
- {{ .Get "The Croatian euro coins feature four different themes, with each design featuring the Croatian checkerboard and the country’s name in Croatian (‘{CroatianStart:r}HRVATSKA{CroatianEnd:r}’). All designs were selected after voting in a public design competition."
+ {{ .Get "The Croatian euro coins feature four different themes, with each design featuring the Croatian checkerboard and the country’s name in Croatian (‘{CroatianStart:r}HRVATSKA{CroatianEnd:E}’). All designs were selected after voting in a public design competition."
$hrargs }}
</p>
<p>
@@ -26,12 +26,12 @@
(map "Link" "https://www.wikipedia.org/wiki/Nikola_Tesla") }}
</p>
<p>
- {{ .Get "The 1 euro coin was designed by Jagor Šunde, David Čemeljić and Fran Zekan and features a marten. The marten is the semi-official national animal of Croatia and the Kuna — their pre-Euro currency — was named after the marten (‘{CroatianStart:r}kuna zlatica{CroatianEnd:r}’ in Croatian)."
+ {{ .Get "The 1 euro coin was designed by Jagor Šunde, David Čemeljić and Fran Zekan and features a marten. The marten is the semi-official national animal of Croatia and the Kuna — their pre-Euro currency — was named after the marten (‘{CroatianStart:r}kuna zlatica{CroatianEnd:E}’ in Croatian)."
$hrargs }}
</p>
<p>
<!-- TODO: Include a photo of the edge inscription -->
- {{ .Get "The 2 euro coin was designed by Ivan Šivak and features the map of Croatia. The coin also has an edge-inscription that reads ‘{CroatianStart:r}O LIJEPA O DRAGA O SLATKA SLOBODO{CroatianEnd:r}’ (English: ‘OH BEAUTIFUL, OH DEAR, OH SWEET FREEDOM’) which is a line from the play {Link:L}Dubravka{-:E} by Ivan Gundulić."
+ {{ .Get "The 2 euro coin was designed by Ivan Šivak and features the map of Croatia. The coin also has an edge-inscription that reads ‘{CroatianStart:r}O LIJEPA O DRAGA O SLATKA SLOBODO{CroatianEnd:E}’ (English: ‘OH BEAUTIFUL, OH DEAR, OH SWEET FREEDOM’) which is a line from the play {Link:L}Dubravka{-:E} by Ivan Gundulić."
$hrargs (map "Link" "https://www.wikipedia.org/wiki/Dubravka_(drama)") }}
</p>
</main>
diff --git a/src/templates/coins-designs-nl.html.tmpl b/src/templates/coins-designs-nl.html.tmpl
index 2395480..e98e77b 100644
--- a/src/templates/coins-designs-nl.html.tmpl
+++ b/src/templates/coins-designs-nl.html.tmpl
@@ -1,65 +1,41 @@
{{ define "content" }}
<header>
{{ template "navbar" . }}
- <h1>{{ .T "Dutch Euro Coin Designs" }}</h1>
+ <h1>{{ .Get "Dutch Euro Coin Designs" }}</h1>
</header>
<main>
- {{ $dutchStart := `<span lang="nl">` }}
- {{ $dutchEnd := `</span>` }}
+ {{ $nlargs := (map "DutchStart" `<span lang="nl"><em>` "DutchEnd" "em,span") }}
<div class="design-container">
<img
- alt="Dutch 50 euro cent coin (Beatrix)"
+ alt="Dutch €0.50 coin (Queen Beatrix)"
src="/designs/nl-050-beatrix.avif"
/>
<img
- alt="Dutch 50 euro cent coin (Willem-Alexander)"
+ alt="Dutch €0.50 coin (King Willem-Alexander)"
src="/designs/nl-050-willem-alexander.avif"
/>
</div>
<div class="design-container">
<img
- alt="Dutch 1 euro coin (Beatrix)"
+ alt="Dutch €1 coin (Queen Beatrix)"
src="/designs/nl-100-beatrix.avif"
/>
<img
- alt="Dutch 1 euro coin (Willem-Alexander)"
+ alt="Dutch €1 coin (King Willem-Alexander)"
src="/designs/nl-100-willem-alexander.avif"
/>
</div>
<p>
- {{ .T `
- From the years 1999–2013 all Dutch euro coins featured the portrait
- of Queen Beatrix of the Netherlands. After her abdication from the
- throne in 2013 the designs of all denominations were changed to
- feature the portrait of the new King Willem-Alexander. After her
- abdication the direction in which the monarchs portrait faced was
- flipped; a tradition dating back to the earliest coins of the
- Kingdom of the Netherlands.
- ` }}
+ {{ .Get "From the years 1999–2013 all Dutch euro coins featured the portrait of Queen Beatrix of the Netherlands. After her abdication from the throne in 2013 the designs of all denominations were changed to feature the portrait of the new King Willem-Alexander. After her abdication the direction in which the monarchs portrait faced was flipped; a tradition shared by the coins of many monarchies around the world." }}
</p>
<p>
<!-- TODO: Get a picture of the edge-inscription -->
- {{ .T `
- Coins featuring both monarchs contain text reading ‘%sBEATRIX
- KONINGIN DER NEDERLANDEN%s’ (‘BEATRIX QUEEN OF THE
- NETHERLANDS’) and ‘%sWillem-Alexander Koning der
- Nederlanden%s’ (‘Willem-Alexander King of the Netherlands’)
- respectively. The €2 coins also feature an edge-inscription
- reading ‘%sGOD ⋆ ZIJ ⋆ MET ⋆ ONS ⋆%s’
- (‘GOD ⋆ IS ⋆ WITH ⋆ US ⋆’).
- `
- $dutchStart $dutchEnd
- $dutchStart $dutchEnd
- $dutchStart $dutchEnd | safe }}
+ {{ .Get "Coins featuring both monarchs contain text reading ‘{DutchStart:r}BEATRIX KONINGIN DER NEDERLANDEN{DutchEnd:E}’ (English: ‘BEATRIX QUEEN OF THE NETHERLANDS’) and ‘{DutchStart:r}Willem-Alexander Koning der Nederlanden{DutchEnd:E}’ (English: ‘Willem-Alexander King of the Netherlands’) respectively. The €2 coins also feature an edge-inscription reading ‘{DutchStart:r}GOD ⋆ ZIJ ⋆ MET ⋆ ONS ⋆{DutchEnd:E}’ (English: ‘GOD ⋆ IS ⋆ WITH ⋆ US ⋆’)."
+ $nlargs }}
</p>
<p>
- {{ .T `
- The €1 and €2 coins featuring King Willem-Alexander were minted
- with a much lower %srelief%s than most euro coins of the same
- denomination. As a result it is not uncommon for these coins to
- appear worn after little use in circulation.`
- `<a href="/jargon#relief">` `</a>` | safe
- }}
+ {{ .Get "The €1 and €2 coins featuring King Willem-Alexander were minted with a much lower {Link:l}relief{-:E} than most euro coins of the same denomination. As a result it is not uncommon for these coins to appear worn after little use in circulation."
+ (map "Link" "/jargon#relief") }}
</p>
</main>
-{{ end }}
+{{ end }} \ No newline at end of file
diff --git a/src/templates/coins-mintages.html.tmpl b/src/templates/coins-mintages.html.tmpl
index 1cf7c70..8df0868 100644
--- a/src/templates/coins-mintages.html.tmpl
+++ b/src/templates/coins-mintages.html.tmpl
@@ -1,38 +1,19 @@
{{ define "content" }}
<header>
{{ template "navbar" . }}
- <h1>{{ .T "Euro Coin Mintages" }}</h1>
+ <h1>{{ .Get "Euro Coin Mintages" }}</h1>
</header>
<main>
<p>
- {{ .T `
- Here you’ll be able to view all the known mintages for all
- coins. You’ll also be able to filter on country, denomination,
- etc. If you have any mintage data that’s missing from our site,
- feel free to contact us.
- ` }}
+ {{ .Get "Here you’ll be able to view all the known mintages for all coins. You’ll also be able to filter on country, denomination, etc. If you have any mintage data that’s missing from our site, feel free to contact us." }}
</p>
<hr />
{{ if eq .Code "nl" }}
- <h2>{{ .T "Additional Notes" }}</h2>
+ <h2>{{ .Get "Additional Notes" }}</h2>
<ul>
<li>
- {{ .T `
- Most coins from the years 2003–2016 are listed as NIFC coins
- while other popular sources such as Numista claim they were
- minted for circulation. For more information on why others are
- wrong, %sclick here%s.`
- `<a href="#TODO">` `</a>` | safe
- }}
- </li>
- <li>
- {{ .T `
- In 2003 Numista calculated a total of %d coins issued for coin
- sets per denomination. Our own calculations found only
- %d. Numista also forgot to include the many hundred thousand
- coins from the coin roll sets that were produced.`
- 217503 177003
- }}
+ {{ .Get "Most coins from the years 2003–2016 are listed as NIFC coins while other popular sources such as Numista claim they were minted for circulation. For more information on why others are wrong, {Link:l}click here{-:E}."
+ (map "Link" "#TODO") }}
</li>
</ul>
{{ end }}
@@ -40,12 +21,12 @@
<form>
<div class="grid">
<label for="country-dd">
- {{ .T "Country" }}
+ {{ .Get "Country" }}
<select id="country-dd" name="code">
{{ $code := .Code }}
{{ range .Countries }}
<option
- value={{ .Code }}
+ value="{{ .Code }}"
{{ if eq .Code $code }}
selected
{{ end }}
@@ -57,28 +38,28 @@
</label>
<fieldset>
{{ template "coin-type-radio"
- (tuple .Type "circ" (.T "Circulation Coins")) }}
+ (tuple .Type "circ" (.Get "Circulation Coins")) }}
{{ template "coin-type-radio"
- (tuple .Type "nifc" (.T "NIFC / BU Sets")) }}
+ (tuple .Type "nifc" (.Get "NIFC / BU Sets")) }}
{{ template "coin-type-radio"
- (tuple .Type "proof" (.T "Proof Coins")) }}
+ (tuple .Type "proof" (.Get "Proof Coins")) }}
</fieldset>
</div>
- <button type="submit">{{ .T "Filter" }}</button>
+ <button type="submit">{{ .Get "Filter" }}</button>
</form>
<figure>
- <figcaption>{{ .T "Standard Issue Coins" }}</figcaption>
+ <figcaption>{{ .Get "Standard Issue Coins" }}</figcaption>
<table class="mintage-table" role="grid">
<thead>
- <th>{{ .T "Year" }}</th>
- <th>{{ .M 0.01 }}</th>
- <th>{{ .M 0.02 }}</th>
- <th>{{ .M 0.05 }}</th>
- <th>{{ .M 0.10 }}</th>
- <th>{{ .M 0.20 }}</th>
- <th>{{ .M 0.50 }}</th>
- <th>{{ .M 1.00 }}</th>
- <th>{{ .M 2.00 }}</th>
+ <th>{{ .Get "Year" }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 0.01) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 0.02) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 0.05) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 0.10) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 0.20) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 0.50) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 1.00) }}</th>
+ <th>{{ .Printer.Sprintf "{N:m}" (map "N" 2.00) }}</th>
</thead>
<tbody>
{{ $p := .Printer }}
@@ -92,13 +73,13 @@
</th>
{{ range .Mintages }}
{{ if eq . -1 }}
- <td>{{ $p.T "Unknown" }}</td>
+ <td>{{ $p.Get "Unknown" }}</td>
{{ else if eq . -2 }}
- <td class="error">{{ $p.T "Error" }}</td>
+ <td class="error">{{ $p.Get "Error" }}</td>
{{ else if eq . 0 }}
<td>—</td>
{{ else }}
- <td>{{ $p.N . }}</td>
+ <td>{{ $p.Sprintf "{N}" (map "N" .) }}</td>
{{ end }}
</td>
{{ end }}
@@ -109,12 +90,12 @@
</figure>
{{ if ne (len .Mintages.Commemorative) 0 }}
<figure>
- <figcaption>{{ .T "Commemorative Coins" }}</figcaption>
+ <figcaption>{{ .Get "Commemorative Coins" }}</figcaption>
<table class="mintage-table-cc" role="grid">
<thead>
- <th>{{ .T "Year" }}</th>
- <th>{{ .T "Commemorated Issue" }}</th>
- <th>{{ .T "Mintage" }}</th>
+ <th>{{ .Get "Year" }}</th>
+ <th>{{ .Get "Commemorated Issue" }}</th>
+ <th>{{ .Get "Mintage" }}</th>
</thead>
<tbody>
{{ $p := .Printer }}
@@ -130,13 +111,13 @@
<td>{{ .Name }}</td>
{{ with .Mintage }}
{{ if eq . -1 }}
- <td>{{ $p.T "Unknown" }}</td>
+ <td>{{ $p.Get "Unknown" }}</td>
{{ else if eq . -2 }}
- <td class="error">{{ $p.T "Error" }}</td>
+ <td class="error">{{ $p.Get "Error" }}</td>
{{ else if eq . 0 }}
<td>—</td>
{{ else }}
- <td>{{ $p.N . }}</td>
+ <td>{{ $p.Sprintf "{N}" (map "N" .) }}</td>
{{ end }}
{{ end }}
</tr>
@@ -150,12 +131,12 @@
{{ end }}
{{ define "coin-type-radio" }}
-<label for={{ index . 1 }}>
+<label for="{{ index . 1 }}">
<input
- id={{ index . 1 }}
+ id="{{ index . 1 }}"
name="type"
type="radio"
- value={{ index . 1 }}
+ value="{{ index . 1 }}"
{{ if eq (index . 0) (index . 1) }}
checked
{{ end }}