summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.exrc3
-rw-r--r--GNUmakefile9
-rw-r--r--data/mintages/hr4
-rw-r--r--data/mintages/hr-c-circ.csv7
-rw-r--r--data/mintages/hr-c-nifc.csv6
-rw-r--r--data/mintages/hr-c-proof.csv6
-rw-r--r--data/mintages/hr-s-circ.csv4
-rw-r--r--data/mintages/hr-s-nifc.csv4
-rw-r--r--data/mintages/hr-s-proof.csv4
-rwxr-xr-xdatefmt19
-rw-r--r--src/i18n.go44
11 files changed, 89 insertions, 21 deletions
diff --git a/.exrc b/.exrc
index fdec142..ab31f20 100644
--- a/.exrc
+++ b/.exrc
@@ -13,5 +13,6 @@ autocmd FileType go autocmd BufWritePre <buffer>
nnoremap <silent> gM :wall \| make all-i18n<CR>
nnoremap <silent> <LocalLeader>t :vimgrep /\CTODO/ **/*<CR>
+runtime plugin/netrwPlugin.vim
let &wildignore = netrw_gitignore#Hide() . ',.git/*,vendor/*'
-let g:netrw_list_hide .= ',.*\\.gen\\..*' \ No newline at end of file
+let g:netrw_list_hide .= ',.*\\.gen\\..*'
diff --git a/GNUmakefile b/GNUmakefile
index e3aa32b..3142cd5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -19,7 +19,12 @@ exttmpl: $(exttmpl)
go build ./cmd/exttmpl
%.min.css: %.css
- lightningcss -m $< -o $@
+ if command -v lightningcss >/dev/null; \
+ then \
+ lightningcss -m $< -o $@; \
+ else \
+ cp $< $@; \
+ fi
clean:
find . -type f \( \
@@ -29,4 +34,4 @@ clean:
-or -name '*.tar.gz' \
\) -delete
-.PHONY: all-i18n clean release
+.PHONY: all-i18n clean release \ No newline at end of file
diff --git a/data/mintages/hr b/data/mintages/hr
deleted file mode 100644
index ecbddbd..0000000
--- a/data/mintages/hr
+++ /dev/null
@@ -1,4 +0,0 @@
-2023:
- 72.000.000 63.000.000 40.000.000 80.000.000 50.000.000 45.000.000 40.000.000 30.000.000
- ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ?
diff --git a/data/mintages/hr-c-circ.csv b/data/mintages/hr-c-circ.csv
new file mode 100644
index 0000000..312619c
--- /dev/null
+++ b/data/mintages/hr-c-circ.csv
@@ -0,0 +1,7 @@
+# TODO: Find the official names of all these coins
+Year,Name,Mintmark,Mintage,Reference
+2023,Introduction of the Euro,,,
+2024,City of Varaždin,,,
+2024,Marko Marulić,,,
+2025,City of Pula,,,
+2025,Kingdom of Croatia and King Tomislav,,, \ No newline at end of file
diff --git a/data/mintages/hr-c-nifc.csv b/data/mintages/hr-c-nifc.csv
new file mode 100644
index 0000000..726622f
--- /dev/null
+++ b/data/mintages/hr-c-nifc.csv
@@ -0,0 +1,6 @@
+Year,Name,Mintmark,Mintage,Reference
+2023,Introduction of the Euro,,,
+2024,City of Varaždin,,,
+2024,Marko Marulić,,,
+2025,City of Pula,,,
+2025,Kingdom of Croatia and King Tomislav,,, \ No newline at end of file
diff --git a/data/mintages/hr-c-proof.csv b/data/mintages/hr-c-proof.csv
new file mode 100644
index 0000000..726622f
--- /dev/null
+++ b/data/mintages/hr-c-proof.csv
@@ -0,0 +1,6 @@
+Year,Name,Mintmark,Mintage,Reference
+2023,Introduction of the Euro,,,
+2024,City of Varaždin,,,
+2024,Marko Marulić,,,
+2025,City of Pula,,,
+2025,Kingdom of Croatia and King Tomislav,,, \ No newline at end of file
diff --git a/data/mintages/hr-s-circ.csv b/data/mintages/hr-s-circ.csv
new file mode 100644
index 0000000..d7334f0
--- /dev/null
+++ b/data/mintages/hr-s-circ.csv
@@ -0,0 +1,4 @@
+Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00",Reference
+2023,,72000000,63000000,40000000,80000000,50000000,45000000,40000000,30000000,
+2024,,1089506,1088006,13088006,1048006,4508006,1028006,1028006,1008006,
+2025,,6609506,4328006,0,5128006,248006,0,0,0, \ No newline at end of file
diff --git a/data/mintages/hr-s-nifc.csv b/data/mintages/hr-s-nifc.csv
new file mode 100644
index 0000000..47e01c4
--- /dev/null
+++ b/data/mintages/hr-s-nifc.csv
@@ -0,0 +1,4 @@
+Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00",Reference
+2023,,,,,,,,,,
+2024,,,,,,,,,,
+2025,,,,,,,,,, \ No newline at end of file
diff --git a/data/mintages/hr-s-proof.csv b/data/mintages/hr-s-proof.csv
new file mode 100644
index 0000000..47e01c4
--- /dev/null
+++ b/data/mintages/hr-s-proof.csv
@@ -0,0 +1,4 @@
+Year,Mintmark,"€0,01","€0,02","€0,05","€0,10","€0,20","€0,50","€1,00","€2,00",Reference
+2023,,,,,,,,,,
+2024,,,,,,,,,,
+2025,,,,,,,,,, \ No newline at end of file
diff --git a/datefmt b/datefmt
new file mode 100755
index 0000000..747b47a
--- /dev/null
+++ b/datefmt
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+url()
+{
+ echo "https://raw.githubusercontent.com/unicode-org/cldr-json/refs/heads/main/cldr-json/cldr-dates-full/main/$1/ca-gregorian.json"
+}
+
+if [ $# -lt 1 ]
+then
+ echo "Usage: datefmt locale..." >&2
+ exit 1
+fi
+
+for l in "$@"
+do
+ [ $# -gt 1 ] && printf '%s:\t' "$l"
+ curl -s "$(url "$l")" | jq -r --arg l "$l" \
+ '.main.[$l].dates.calendars.gregorian.dateFormats.short'
+done
diff --git a/src/i18n.go b/src/i18n.go
index dabc966..1d53b52 100644
--- a/src/i18n.go
+++ b/src/i18n.go
@@ -1,4 +1,4 @@
-//go:generate gotext -srclang=en -dir=rosetta extract -lang=bg,el,en,nl .
+//go:generate go tool gotext -srclang=en -dir=rosetta extract -lang=bg,el,en,nl .
//go:generate ../exttmpl
package src
@@ -27,6 +27,8 @@ type locale struct {
}
var (
+ /* To determine the correct date format to use, use the ‘datefmt’ script in
+ the repository root */
Locales = [...]locale{
{
Bcp: "ca",
@@ -92,6 +94,13 @@ var (
Enabled: false,
},
{
+ Bcp: "hr",
+ Name: "hrvatski",
+ dateFmt: "02. 01. 2006.",
+ Eurozone: true,
+ Enabled: false,
+ },
+ {
Bcp: "it",
Name: "italiano",
dateFmt: "02/01/2006",
@@ -141,13 +150,6 @@ var (
Enabled: false,
},
{
- Bcp: "sh",
- Name: "srpskohrvatski",
- dateFmt: "02. 01. 2006.",
- Eurozone: true,
- Enabled: false,
- },
- {
Bcp: "sk",
Name: "slovenčina",
dateFmt: "2. 1. 2006",
@@ -178,6 +180,13 @@ var (
Enabled: true,
},
{
+ Bcp: "da",
+ Name: "dansk",
+ dateFmt: "02.01.2006",
+ Eurozone: false,
+ Enabled: false,
+ },
+ {
Bcp: "en-US",
Name: "English (US)",
dateFmt: "1/2/2006",
@@ -185,16 +194,23 @@ var (
Enabled: false,
},
{
- Bcp: "ro",
- Name: "română",
- dateFmt: "02.01.2006",
+ Bcp: "hu",
+ Name: "magyar",
+ dateFmt: "2006. 01. 02.",
Eurozone: false,
Enabled: false,
},
{
- Bcp: "sq",
- Name: "Shqip",
- dateFmt: "2.1.2006",
+ Bcp: "pl",
+ Name: "polski",
+ dateFmt: "2.01.2006",
+ Eurozone: false,
+ Enabled: false,
+ },
+ {
+ Bcp: "ro",
+ Name: "română",
+ dateFmt: "02.01.2006",
Eurozone: false,
Enabled: false,
},