From 9dc1797c1534aa8ef1e86bed29e3f0f0dc3f8e88 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 25 Jul 2024 18:56:03 +0200 Subject: Add native-language country names --- GNUmakefile | 10 ++++++---- data/country-info | 44 ++++++++++++++++++++++---------------------- src/euro/index.ccoins.gsp | 5 ++++- src/style.css | 6 ++++++ 4 files changed, 38 insertions(+), 27 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index b1cdd28..6807748 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -43,9 +43,9 @@ eurocddeps := $(subst xyz,dcoins,$(euroxyzdeps)) data/coins euronddeps := $(subst xyz,dnotes,$(euroxyzdeps)) data/notes data/note-info eurotndeps := src/euro/index.tnotes.gsp src/euro/nav.dnotes.gsp data/notes -# Macro to get a countries demonym from their country code -demonym = $(shell awk '$$1 == toupper("$1") { print $$2 }' data/country-info) - +# Macros to get data to pass to m4 +altnames = $(shell awk 'BEGIN { FS = "\t" } $$1 == toupper("$1") { print $$4 }' data/country-info) +demonym = $(shell awk 'BEGIN { FS = "\t" } $$1 == toupper("$1") { print $$2 }' data/country-info) percentage = $(shell ./scripts/gen-stats $1) # Macros to handle dependencies for world pages @@ -67,7 +67,9 @@ out/%.html: src/%.gsp $(gspdeps) m4 -P lib.m4 $< | gsp >$@ $(eurocc): out/euro/%/index.html: $(gspdeps) $(euroccdeps) - m4 -P -D__coins -D__code=$* -D__demonym=$(call demonym,$*) \ + m4 -P -D__coins -D__code=$* \ + -D__demonym="$(call demonym,$*)" \ + -D__altnames="$(call altnames,$*)" \ -D__percentage="$(call percentage,$*)" \ lib.m4 src/euro/index.ccoins.gsp | gsp >$@ diff --git a/data/country-info b/data/country-info index 74449f3..1b5d033 100644 --- a/data/country-info +++ b/data/country-info @@ -1,31 +1,31 @@ AD Andorran Andorra -AT Austrian Austria -BE Belgian Belgium -BG Bulgarian Bulgaria -CY Cypriot Cyprus -DE German Germany -DE-R German Germany -DE-W German Germany -DE-X German Germany -EE Estonian Estonia -ES Spanish Spain -FI Finnish Finland +AT Austrian Austria Österreich +BE Belgian Belgium België / Belgique / Belgien +BG Bulgarian Bulgaria България +CY Cypriot Cyprus Κύπρος / Kıbrıs +DE German Germany Deutschland +DE-R German Germany Deutschland +DE-W German Germany Deutschland +DE-X German Germany Deutschland +EE Estonian Estonia Eesti +ES Spanish Spain España +FI Finnish Finland Suomi FR French France FR-E French France FR-U French France -GR Greek Greece -HR Croatian Croatia -IE Irish Ireland -IT Italian Italy -LT Lithuanian Lithuania -LU Luxembourgish Luxembourg -LV Latvian Latvia +GR Greek Greece Ελλάδα +HR Croatian Croatia Hrvatska +IE Irish Ireland Éire +IT Italian Italy Italia +LT Lithuanian Lithuania Lietuva +LU Luxembourgish Luxembourg Lëtzebuerg / Luxemburg +LV Latvian Latvia Latvija MC Monégasque Monaco MT Maltese Malta -NL Dutch Netherlands +NL Dutch Netherlands Nederland PT Portuguese Portugal -SI Slovene Slovenia -SK Slovak Slovakia +SI Slovene Slovenia Slovenija +SK Slovak Slovakia Slovensko SM Sammarinese San Marino US American United States of America -VA Vatican Vatican City +VA Vatican Vatican City Città del Vaticano diff --git a/src/euro/index.ccoins.gsp b/src/euro/index.ccoins.gsp index a8dcc00..ae16426 100644 --- a/src/euro/index.ccoins.gsp +++ b/src/euro/index.ccoins.gsp @@ -16,7 +16,10 @@ html lang="en" { section { header { h1 {-__demonym Euro Coins} - p {-__percentage} + h3 { + span {-__altnames} + span {-__percentage} + } } } diff --git a/src/style.css b/src/style.css index 7253503..6d00b54 100644 --- a/src/style.css +++ b/src/style.css @@ -226,6 +226,12 @@ header h1 { margin-bottom: 0; } +header h3 { + margin-top: 0; + display: flex; + justify-content: space-between; +} + header p { color: lightgrey; } -- cgit v1.2.3