summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-05-14 17:17:50 -0300
committerEuAndreh <eu@euandre.org>2025-05-14 17:36:00 -0300
commit07276d16b83d2fd78ac8948da89820337160e278 (patch)
tree2baa874af86357e9760f1f977e7d6870e313cbed
parentdoc/: Add uuid.en.{0,3,7.{CHANGELOG,README,TODOs,recipes,tutorial,why}}.adoc (diff)
downloaduuid-07276d16b83d2fd78ac8948da89820337160e278.tar.gz
uuid-07276d16b83d2fd78ac8948da89820337160e278.tar.xz
Revamp i18n: use gotext
-rw-r--r--.gitignore5
-rw-r--r--Makefile40
-rw-r--r--deps.mk32
-rw-r--r--doc/uuid.de.0.adoc13
-rw-r--r--doc/uuid.de.1.adoc159
-rw-r--r--doc/uuid.de.3.adoc5
-rw-r--r--doc/uuid.de.7CHANGELOG.adoc22
-rw-r--r--doc/uuid.de.7README.adoc5
-rw-r--r--doc/uuid.de.7recipes.adoc5
-rw-r--r--doc/uuid.de.7tutorial.adoc5
-rw-r--r--doc/uuid.de.7why.adoc5
-rw-r--r--doc/uuid.eo.0.adoc13
-rw-r--r--doc/uuid.eo.1.adoc159
-rw-r--r--doc/uuid.eo.3.adoc5
-rw-r--r--doc/uuid.eo.7CHANGELOG.adoc22
-rw-r--r--doc/uuid.eo.7README.adoc5
-rw-r--r--doc/uuid.eo.7recipes.adoc5
-rw-r--r--doc/uuid.eo.7tutorial.adoc5
-rw-r--r--doc/uuid.eo.7why.adoc5
-rw-r--r--doc/uuid.es.0.adoc13
-rw-r--r--doc/uuid.es.1.adoc159
-rw-r--r--doc/uuid.es.3.adoc5
-rw-r--r--doc/uuid.es.7CHANGELOG.adoc22
-rw-r--r--doc/uuid.es.7README.adoc5
-rw-r--r--doc/uuid.es.7recipes.adoc5
-rw-r--r--doc/uuid.es.7tutorial.adoc5
-rw-r--r--doc/uuid.es.7why.adoc5
-rw-r--r--doc/uuid.fr.0.adoc13
-rw-r--r--doc/uuid.fr.1.adoc159
-rw-r--r--doc/uuid.fr.3.adoc5
-rw-r--r--doc/uuid.fr.7CHANGELOG.adoc22
-rw-r--r--doc/uuid.fr.7README.adoc5
-rw-r--r--doc/uuid.fr.7recipes.adoc5
-rw-r--r--doc/uuid.fr.7tutorial.adoc5
-rw-r--r--doc/uuid.fr.7why.adoc5
-rw-r--r--doc/uuid.pt.0.adoc13
-rw-r--r--doc/uuid.pt.1.adoc159
-rw-r--r--doc/uuid.pt.3.adoc5
-rw-r--r--doc/uuid.pt.7CHANGELOG.adoc22
-rw-r--r--doc/uuid.pt.7README.adoc5
-rw-r--r--doc/uuid.pt.7recipes.adoc5
-rw-r--r--doc/uuid.pt.7tutorial.adoc5
-rw-r--r--doc/uuid.pt.7why.adoc5
-rwxr-xr-xmkdeps.sh18
-rw-r--r--po/doc/de.po (renamed from po/de.po)10
-rw-r--r--po/doc/doc.pot (renamed from po/uuid.pot)11
-rw-r--r--po/doc/eo.po (renamed from po/eo.po)10
-rw-r--r--po/doc/es.po (renamed from po/es.po)10
-rw-r--r--po/doc/fr.po (renamed from po/fr.po)10
-rw-r--r--po/doc/note.txt (renamed from po/note.txt)0
-rw-r--r--po/doc/po4a.cfg (renamed from po/po4a.cfg)3
-rw-r--r--po/doc/pt.po (renamed from po/pt.po)10
-rw-r--r--po/uuid/de.po19
-rw-r--r--po/uuid/eo.po19
-rw-r--r--po/uuid/es.po19
-rw-r--r--po/uuid/fr.po19
-rw-r--r--po/uuid/po4a.cfg3
-rw-r--r--po/uuid/pt.po19
-rw-r--r--po/uuid/uuid.pot19
-rw-r--r--src/uuid.go15
60 files changed, 199 insertions, 1187 deletions
diff --git a/.gitignore b/.gitignore
index fa77916..d3c2f8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
-!/doc/*.adoc
/doc/*
-/src/version.go
+!/doc/*.en.*.adoc
+/po/*/*.mo
+/src/meta.go
/*.bin
/src/*.a
/src/*.bin
diff --git a/Makefile b/Makefile
index d912d70..974b992 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@ DATE = 1970-01-01
VERSION = 0.1.0
NAME = uuid
NAME_UC = $(NAME)
-LANGUAGES = en
## Installation prefix. Defaults to "/usr".
PREFIX = /usr
BINDIR = $(PREFIX)/bin
@@ -24,12 +23,12 @@ GOLDFLAGS = -L $(GOLIBDIR)
.SUFFIXES:
-.SUFFIXES: .go .a .bin .bin-check .adoc
+.SUFFIXES: .go .a .bin .bin-check .adoc .po .mo
.go.a:
go tool compile -I $(@D) $(GOCFLAGS) -o $@ -p $(*F) \
`find $< $$(if [ $(*F) != main ]; then \
- echo src/$(NAME).go src/version.go; fi) | uniq`
+ echo src/$(NAME).go src/meta.go; fi) | uniq`
.a.bin:
go tool link -L $(@D) $(GOLDFLAGS) -o $@ --extldflags '$(LDLIBS)' $<
@@ -37,6 +36,9 @@ GOLDFLAGS = -L $(GOLIBDIR)
.adoc:
asciidoctor -b manpage -o $@ $<
+.po.mo:
+ msgfmt -c -o $@ $<
+
all:
@@ -49,21 +51,25 @@ mains.bin = $(mains.go:.go=.bin)
functional-tests/lib.a = $(functional-tests/lib.go:.go=.a)
fuzz-targets/lib.a = $(fuzz-targets/lib.go:.go=.a)
benchmarks/lib.a = $(benchmarks/lib.go:.go=.a)
+manpages.N.adoc = $(manpages.en.N.adoc) $(manpages.xx.N.adoc)
manpages.N = $(manpages.N.adoc:.adoc=)
+sources.mo = $(sources.po:.po=.mo)
sources = \
src/$(NAME).go \
- src/version.go \
+ src/meta.go \
src/main.go \
derived-assets = \
- src/version.go \
+ src/meta.go \
$(libs.a) \
$(mains.a) \
$(mains.bin) \
$(NAME).bin \
+ $(manpages.xx.N.adoc) \
$(manpages.N) \
+ $(sources.mo) \
side-assets = \
tests/fuzz/corpus/ \
@@ -77,19 +83,25 @@ all: $(derived-assets)
$(libs.a): Makefile deps.mk
-$(libs.a): src/$(NAME).go src/version.go
+$(libs.a): src/$(NAME).go src/meta.go
$(fuzz-targets/lib.a):
go tool compile $(GOCFLAGS) -o $@ -p $(NAME) -d=libfuzzer \
- $*.go src/$(NAME).go src/version.go
+ $*.go src/$(NAME).go src/meta.go
-src/version.go: Makefile
- echo 'package $(NAME); const Version = "$(VERSION)"' > $@
+src/meta.go: Makefile
+ echo 'package $(NAME)' > $@
+ echo 'const Version = "$(VERSION)"' >> $@
+ echo 'const Name = "$(NAME)"' >> $@
+ echo 'const LOCALEDIR = "$(LOCALEDIR)"' >> $@
$(NAME).bin: src/main.bin
ln -fs src/main.bin $@
+$(manpages.xx.N.adoc): po/doc/po4a.cfg
+ po4a --no-update --translate-only $@ po/doc/po4a.cfg
+
tests.bin-check = \
@@ -142,8 +154,14 @@ bench: $(benchmarks/main.bin-check)
-i18n:
- po4a po/po4a.cfg
+i18n-doc:
+ po4a po/doc/po4a.cfg
+
+i18n-code:
+ gotext src/$(NAME).go > po/$(NAME)/$(NAME).pot
+ po4a po/$(NAME)/po4a.cfg
+
+i18n: i18n-doc i18n-code
diff --git a/deps.mk b/deps.mk
index 8dc5380..b6bcb65 100644
--- a/deps.mk
+++ b/deps.mk
@@ -16,15 +16,7 @@ mains.go = \
tests/fuzz/new-v7-from/main.go \
tests/main.go \
-manpages.N.adoc = \
- doc/uuid.de.0.adoc \
- doc/uuid.de.1.adoc \
- doc/uuid.de.3.adoc \
- doc/uuid.de.7CHANGELOG.adoc \
- doc/uuid.de.7README.adoc \
- doc/uuid.de.7recipes.adoc \
- doc/uuid.de.7tutorial.adoc \
- doc/uuid.de.7why.adoc \
+manpages.en.N.adoc = \
doc/uuid.en.0.adoc \
doc/uuid.en.1.adoc \
doc/uuid.en.3.adoc \
@@ -34,11 +26,23 @@ manpages.N.adoc = \
doc/uuid.en.7recipes.adoc \
doc/uuid.en.7tutorial.adoc \
doc/uuid.en.7why.adoc \
+
+manpages.xx.N.adoc = \
+ doc/uuid.de.0.adoc \
+ doc/uuid.de.1.adoc \
+ doc/uuid.de.3.adoc \
+ doc/uuid.de.7CHANGELOG.adoc \
+ doc/uuid.de.7README.adoc \
+ doc/uuid.de.7TODOs.adoc \
+ doc/uuid.de.7recipes.adoc \
+ doc/uuid.de.7tutorial.adoc \
+ doc/uuid.de.7why.adoc \
doc/uuid.eo.0.adoc \
doc/uuid.eo.1.adoc \
doc/uuid.eo.3.adoc \
doc/uuid.eo.7CHANGELOG.adoc \
doc/uuid.eo.7README.adoc \
+ doc/uuid.eo.7TODOs.adoc \
doc/uuid.eo.7recipes.adoc \
doc/uuid.eo.7tutorial.adoc \
doc/uuid.eo.7why.adoc \
@@ -47,6 +51,7 @@ manpages.N.adoc = \
doc/uuid.es.3.adoc \
doc/uuid.es.7CHANGELOG.adoc \
doc/uuid.es.7README.adoc \
+ doc/uuid.es.7TODOs.adoc \
doc/uuid.es.7recipes.adoc \
doc/uuid.es.7tutorial.adoc \
doc/uuid.es.7why.adoc \
@@ -55,6 +60,7 @@ manpages.N.adoc = \
doc/uuid.fr.3.adoc \
doc/uuid.fr.7CHANGELOG.adoc \
doc/uuid.fr.7README.adoc \
+ doc/uuid.fr.7TODOs.adoc \
doc/uuid.fr.7recipes.adoc \
doc/uuid.fr.7tutorial.adoc \
doc/uuid.fr.7why.adoc \
@@ -63,10 +69,18 @@ manpages.N.adoc = \
doc/uuid.pt.3.adoc \
doc/uuid.pt.7CHANGELOG.adoc \
doc/uuid.pt.7README.adoc \
+ doc/uuid.pt.7TODOs.adoc \
doc/uuid.pt.7recipes.adoc \
doc/uuid.pt.7tutorial.adoc \
doc/uuid.pt.7why.adoc \
+sources.po = \
+ po/uuid/de.po \
+ po/uuid/eo.po \
+ po/uuid/es.po \
+ po/uuid/fr.po \
+ po/uuid/pt.po \
+
functional-tests/lib.go = \
tests/functional/string-round-trip/uuid.go \
diff --git a/doc/uuid.de.0.adoc b/doc/uuid.de.0.adoc
deleted file mode 100644
index 1670ad5..0000000
--- a/doc/uuid.de.0.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-= uuid(0)
-
-
-
-== NAME
-
-uuid - generate or parse UUID values.
-
-
-
-== DESCRIPTION
-
-*uuid* generates UUID of version 4 or version 7, or validate a given UUID.
diff --git a/doc/uuid.de.1.adoc b/doc/uuid.de.1.adoc
deleted file mode 100644
index e64c665..0000000
--- a/doc/uuid.de.1.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-= uuid(1)
-
-
-
-== NAME
-
-uuid - generate a UUID version 4 or 7, or validate a UUID string.
-
-
-
-== SYNOPSYS
-
-*uuid* [-v (4|7)] *uuid* [_STRING_]
-
-
-
-== EXAMPLES
-
-
-=== Print a (version 4) UUID on the terminal
-
-[source, sh]
-....
-$ uuid
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Print a verson 7 UUID on the terminal
-
-[source, sh]
-....
-$ uuid -v 7
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Create a new UUID as part of a path
-
-[source, sh]
-....
-dir="$PWD"/"$(uuid)"/data
-....
-
-
-=== Validate a given UUID
-
-[source, sh]
-....
-ID="$(basename -- "$directory")"
-if ! uuid "$ID"; then
- echo "Bad UUID in directory: $ID" >&2
- exit 1
-fi
-....
-
-
-
-== DESCRIPTION
-
-The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output.
-
-The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default.
-
-
-
-== OPTIONS
-
-*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7.
-
-
-
-== OPERANDS
-
-_STRING_:: If it is
-
- *not given*::: generate a brand new random UUIDv4, print it to _stdout_ and exit normally;
- *given*::: test if it is a valid UUIDv4 and exit normally if so.
-
-
-
-== IO
-
-
-=== STDIN
-
-Not used.
-
-
-=== STDOUT
-
-The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator:
-
-[source, sh]
-....
-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-....
-
-An example output is:
-
-[source, sh]
-....
-cb46d0c0-b2aa-4a6c-a119-8deace2544a2
-....
-
-
-=== STDERR
-
-Errors on UUID validation are sent to the standard error. For instance:
-
-[source, sh]
-....
-$ uuid not-a-uuid-123 1>/dev/null
-uuid: str isn't of the correct length
-....
-
-When valid, validation emits nothing and exits with 0.
-
-
-=== INPUT FILES
-
-None.
-
-
-=== OUTPUT FILES
-
-None.
-
-
-
-== EXIT STATUS
-
-0:: Generating or validating a UUID was successfull.
-3:: UUID validation failed.
-
-
-
-== CONFORMING TO
-
-The versions 4 and 7 of the UUID defined in *RFC 9562*.
-
-
-
-== SEE ALSO
-
-
-
-== AUTHORS
-
-mailto:eu@euandre.org[EuAndreh] and contributors.
-
-
-
-== BUGS
-
-* Report bugs to the mailto:~euandreh/public-inbox@lists.sr.ht[mailing list]. Use the subject "[uuid] BUG or TASK: <description>".
-* Browse bugs https://euandre.org/git/uuid/TODOs.html[online].
-* https://euandre.org/git/uuid/[Homepage].
-* https://lists.sr.ht/~euandreh/public-inbox?search=%5Buuid%5D[Comments and discussions].
diff --git a/doc/uuid.de.3.adoc b/doc/uuid.de.3.adoc
deleted file mode 100644
index 24fcde5..0000000
--- a/doc/uuid.de.3.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(3)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.de.7CHANGELOG.adoc b/doc/uuid.de.7CHANGELOG.adoc
deleted file mode 100644
index e1b6975..0000000
--- a/doc/uuid.de.7CHANGELOG.adoc
+++ /dev/null
@@ -1,22 +0,0 @@
-= uuid(7CHANGELOG)
-
-== NAME
-
-uuid - .
-
-== DESCRIPTION
-
-////
-Entry template:
-== Unreleased
-=== Added
-=== Changed
-=== Deprecated
-=== Removed
-=== Fixed
-=== Security
-////
-
-Changelog for https://euandre.org/s/uuid/en/[uuid].
-
-== Unreleased
diff --git a/doc/uuid.de.7README.adoc b/doc/uuid.de.7README.adoc
deleted file mode 100644
index 3def718..0000000
--- a/doc/uuid.de.7README.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7README)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.de.7recipes.adoc b/doc/uuid.de.7recipes.adoc
deleted file mode 100644
index 2f20a16..0000000
--- a/doc/uuid.de.7recipes.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7recipes)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.de.7tutorial.adoc b/doc/uuid.de.7tutorial.adoc
deleted file mode 100644
index 1a77799..0000000
--- a/doc/uuid.de.7tutorial.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7tutorial)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.de.7why.adoc b/doc/uuid.de.7why.adoc
deleted file mode 100644
index 51096c1..0000000
--- a/doc/uuid.de.7why.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7why)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.eo.0.adoc b/doc/uuid.eo.0.adoc
deleted file mode 100644
index 1670ad5..0000000
--- a/doc/uuid.eo.0.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-= uuid(0)
-
-
-
-== NAME
-
-uuid - generate or parse UUID values.
-
-
-
-== DESCRIPTION
-
-*uuid* generates UUID of version 4 or version 7, or validate a given UUID.
diff --git a/doc/uuid.eo.1.adoc b/doc/uuid.eo.1.adoc
deleted file mode 100644
index e64c665..0000000
--- a/doc/uuid.eo.1.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-= uuid(1)
-
-
-
-== NAME
-
-uuid - generate a UUID version 4 or 7, or validate a UUID string.
-
-
-
-== SYNOPSYS
-
-*uuid* [-v (4|7)] *uuid* [_STRING_]
-
-
-
-== EXAMPLES
-
-
-=== Print a (version 4) UUID on the terminal
-
-[source, sh]
-....
-$ uuid
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Print a verson 7 UUID on the terminal
-
-[source, sh]
-....
-$ uuid -v 7
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Create a new UUID as part of a path
-
-[source, sh]
-....
-dir="$PWD"/"$(uuid)"/data
-....
-
-
-=== Validate a given UUID
-
-[source, sh]
-....
-ID="$(basename -- "$directory")"
-if ! uuid "$ID"; then
- echo "Bad UUID in directory: $ID" >&2
- exit 1
-fi
-....
-
-
-
-== DESCRIPTION
-
-The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output.
-
-The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default.
-
-
-
-== OPTIONS
-
-*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7.
-
-
-
-== OPERANDS
-
-_STRING_:: If it is
-
- *not given*::: generate a brand new random UUIDv4, print it to _stdout_ and exit normally;
- *given*::: test if it is a valid UUIDv4 and exit normally if so.
-
-
-
-== IO
-
-
-=== STDIN
-
-Not used.
-
-
-=== STDOUT
-
-The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator:
-
-[source, sh]
-....
-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-....
-
-An example output is:
-
-[source, sh]
-....
-cb46d0c0-b2aa-4a6c-a119-8deace2544a2
-....
-
-
-=== STDERR
-
-Errors on UUID validation are sent to the standard error. For instance:
-
-[source, sh]
-....
-$ uuid not-a-uuid-123 1>/dev/null
-uuid: str isn't of the correct length
-....
-
-When valid, validation emits nothing and exits with 0.
-
-
-=== INPUT FILES
-
-None.
-
-
-=== OUTPUT FILES
-
-None.
-
-
-
-== EXIT STATUS
-
-0:: Generating or validating a UUID was successfull.
-3:: UUID validation failed.
-
-
-
-== CONFORMING TO
-
-The versions 4 and 7 of the UUID defined in *RFC 9562*.
-
-
-
-== SEE ALSO
-
-
-
-== AUTHORS
-
-mailto:eu@euandre.org[EuAndreh] and contributors.
-
-
-
-== BUGS
-
-* Report bugs to the mailto:~euandreh/public-inbox@lists.sr.ht[mailing list]. Use the subject "[uuid] BUG or TASK: <description>".
-* Browse bugs https://euandre.org/git/uuid/TODOs.html[online].
-* https://euandre.org/git/uuid/[Homepage].
-* https://lists.sr.ht/~euandreh/public-inbox?search=%5Buuid%5D[Comments and discussions].
diff --git a/doc/uuid.eo.3.adoc b/doc/uuid.eo.3.adoc
deleted file mode 100644
index 24fcde5..0000000
--- a/doc/uuid.eo.3.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(3)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.eo.7CHANGELOG.adoc b/doc/uuid.eo.7CHANGELOG.adoc
deleted file mode 100644
index e1b6975..0000000
--- a/doc/uuid.eo.7CHANGELOG.adoc
+++ /dev/null
@@ -1,22 +0,0 @@
-= uuid(7CHANGELOG)
-
-== NAME
-
-uuid - .
-
-== DESCRIPTION
-
-////
-Entry template:
-== Unreleased
-=== Added
-=== Changed
-=== Deprecated
-=== Removed
-=== Fixed
-=== Security
-////
-
-Changelog for https://euandre.org/s/uuid/en/[uuid].
-
-== Unreleased
diff --git a/doc/uuid.eo.7README.adoc b/doc/uuid.eo.7README.adoc
deleted file mode 100644
index 3def718..0000000
--- a/doc/uuid.eo.7README.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7README)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.eo.7recipes.adoc b/doc/uuid.eo.7recipes.adoc
deleted file mode 100644
index 2f20a16..0000000
--- a/doc/uuid.eo.7recipes.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7recipes)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.eo.7tutorial.adoc b/doc/uuid.eo.7tutorial.adoc
deleted file mode 100644
index 1a77799..0000000
--- a/doc/uuid.eo.7tutorial.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7tutorial)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.eo.7why.adoc b/doc/uuid.eo.7why.adoc
deleted file mode 100644
index 51096c1..0000000
--- a/doc/uuid.eo.7why.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7why)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.es.0.adoc b/doc/uuid.es.0.adoc
deleted file mode 100644
index 1670ad5..0000000
--- a/doc/uuid.es.0.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-= uuid(0)
-
-
-
-== NAME
-
-uuid - generate or parse UUID values.
-
-
-
-== DESCRIPTION
-
-*uuid* generates UUID of version 4 or version 7, or validate a given UUID.
diff --git a/doc/uuid.es.1.adoc b/doc/uuid.es.1.adoc
deleted file mode 100644
index e64c665..0000000
--- a/doc/uuid.es.1.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-= uuid(1)
-
-
-
-== NAME
-
-uuid - generate a UUID version 4 or 7, or validate a UUID string.
-
-
-
-== SYNOPSYS
-
-*uuid* [-v (4|7)] *uuid* [_STRING_]
-
-
-
-== EXAMPLES
-
-
-=== Print a (version 4) UUID on the terminal
-
-[source, sh]
-....
-$ uuid
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Print a verson 7 UUID on the terminal
-
-[source, sh]
-....
-$ uuid -v 7
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Create a new UUID as part of a path
-
-[source, sh]
-....
-dir="$PWD"/"$(uuid)"/data
-....
-
-
-=== Validate a given UUID
-
-[source, sh]
-....
-ID="$(basename -- "$directory")"
-if ! uuid "$ID"; then
- echo "Bad UUID in directory: $ID" >&2
- exit 1
-fi
-....
-
-
-
-== DESCRIPTION
-
-The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output.
-
-The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default.
-
-
-
-== OPTIONS
-
-*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7.
-
-
-
-== OPERANDS
-
-_STRING_:: If it is
-
- *not given*::: generate a brand new random UUIDv4, print it to _stdout_ and exit normally;
- *given*::: test if it is a valid UUIDv4 and exit normally if so.
-
-
-
-== IO
-
-
-=== STDIN
-
-Not used.
-
-
-=== STDOUT
-
-The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator:
-
-[source, sh]
-....
-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-....
-
-An example output is:
-
-[source, sh]
-....
-cb46d0c0-b2aa-4a6c-a119-8deace2544a2
-....
-
-
-=== STDERR
-
-Errors on UUID validation are sent to the standard error. For instance:
-
-[source, sh]
-....
-$ uuid not-a-uuid-123 1>/dev/null
-uuid: str isn't of the correct length
-....
-
-When valid, validation emits nothing and exits with 0.
-
-
-=== INPUT FILES
-
-None.
-
-
-=== OUTPUT FILES
-
-None.
-
-
-
-== EXIT STATUS
-
-0:: Generating or validating a UUID was successfull.
-3:: UUID validation failed.
-
-
-
-== CONFORMING TO
-
-The versions 4 and 7 of the UUID defined in *RFC 9562*.
-
-
-
-== SEE ALSO
-
-
-
-== AUTHORS
-
-mailto:eu@euandre.org[EuAndreh] and contributors.
-
-
-
-== BUGS
-
-* Report bugs to the mailto:~euandreh/public-inbox@lists.sr.ht[mailing list]. Use the subject "[uuid] BUG or TASK: <description>".
-* Browse bugs https://euandre.org/git/uuid/TODOs.html[online].
-* https://euandre.org/git/uuid/[Homepage].
-* https://lists.sr.ht/~euandreh/public-inbox?search=%5Buuid%5D[Comments and discussions].
diff --git a/doc/uuid.es.3.adoc b/doc/uuid.es.3.adoc
deleted file mode 100644
index 24fcde5..0000000
--- a/doc/uuid.es.3.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(3)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.es.7CHANGELOG.adoc b/doc/uuid.es.7CHANGELOG.adoc
deleted file mode 100644
index e1b6975..0000000
--- a/doc/uuid.es.7CHANGELOG.adoc
+++ /dev/null
@@ -1,22 +0,0 @@
-= uuid(7CHANGELOG)
-
-== NAME
-
-uuid - .
-
-== DESCRIPTION
-
-////
-Entry template:
-== Unreleased
-=== Added
-=== Changed
-=== Deprecated
-=== Removed
-=== Fixed
-=== Security
-////
-
-Changelog for https://euandre.org/s/uuid/en/[uuid].
-
-== Unreleased
diff --git a/doc/uuid.es.7README.adoc b/doc/uuid.es.7README.adoc
deleted file mode 100644
index 3def718..0000000
--- a/doc/uuid.es.7README.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7README)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.es.7recipes.adoc b/doc/uuid.es.7recipes.adoc
deleted file mode 100644
index 2f20a16..0000000
--- a/doc/uuid.es.7recipes.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7recipes)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.es.7tutorial.adoc b/doc/uuid.es.7tutorial.adoc
deleted file mode 100644
index 1a77799..0000000
--- a/doc/uuid.es.7tutorial.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7tutorial)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.es.7why.adoc b/doc/uuid.es.7why.adoc
deleted file mode 100644
index 51096c1..0000000
--- a/doc/uuid.es.7why.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7why)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.fr.0.adoc b/doc/uuid.fr.0.adoc
deleted file mode 100644
index 1670ad5..0000000
--- a/doc/uuid.fr.0.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-= uuid(0)
-
-
-
-== NAME
-
-uuid - generate or parse UUID values.
-
-
-
-== DESCRIPTION
-
-*uuid* generates UUID of version 4 or version 7, or validate a given UUID.
diff --git a/doc/uuid.fr.1.adoc b/doc/uuid.fr.1.adoc
deleted file mode 100644
index e64c665..0000000
--- a/doc/uuid.fr.1.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-= uuid(1)
-
-
-
-== NAME
-
-uuid - generate a UUID version 4 or 7, or validate a UUID string.
-
-
-
-== SYNOPSYS
-
-*uuid* [-v (4|7)] *uuid* [_STRING_]
-
-
-
-== EXAMPLES
-
-
-=== Print a (version 4) UUID on the terminal
-
-[source, sh]
-....
-$ uuid
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Print a verson 7 UUID on the terminal
-
-[source, sh]
-....
-$ uuid -v 7
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Create a new UUID as part of a path
-
-[source, sh]
-....
-dir="$PWD"/"$(uuid)"/data
-....
-
-
-=== Validate a given UUID
-
-[source, sh]
-....
-ID="$(basename -- "$directory")"
-if ! uuid "$ID"; then
- echo "Bad UUID in directory: $ID" >&2
- exit 1
-fi
-....
-
-
-
-== DESCRIPTION
-
-The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output.
-
-The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default.
-
-
-
-== OPTIONS
-
-*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7.
-
-
-
-== OPERANDS
-
-_STRING_:: If it is
-
- *not given*::: generate a brand new random UUIDv4, print it to _stdout_ and exit normally;
- *given*::: test if it is a valid UUIDv4 and exit normally if so.
-
-
-
-== IO
-
-
-=== STDIN
-
-Not used.
-
-
-=== STDOUT
-
-The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator:
-
-[source, sh]
-....
-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-....
-
-An example output is:
-
-[source, sh]
-....
-cb46d0c0-b2aa-4a6c-a119-8deace2544a2
-....
-
-
-=== STDERR
-
-Errors on UUID validation are sent to the standard error. For instance:
-
-[source, sh]
-....
-$ uuid not-a-uuid-123 1>/dev/null
-uuid: str isn't of the correct length
-....
-
-When valid, validation emits nothing and exits with 0.
-
-
-=== INPUT FILES
-
-None.
-
-
-=== OUTPUT FILES
-
-None.
-
-
-
-== EXIT STATUS
-
-0:: Generating or validating a UUID was successfull.
-3:: UUID validation failed.
-
-
-
-== CONFORMING TO
-
-The versions 4 and 7 of the UUID defined in *RFC 9562*.
-
-
-
-== SEE ALSO
-
-
-
-== AUTHORS
-
-mailto:eu@euandre.org[EuAndreh] and contributors.
-
-
-
-== BUGS
-
-* Report bugs to the mailto:~euandreh/public-inbox@lists.sr.ht[mailing list]. Use the subject "[uuid] BUG or TASK: <description>".
-* Browse bugs https://euandre.org/git/uuid/TODOs.html[online].
-* https://euandre.org/git/uuid/[Homepage].
-* https://lists.sr.ht/~euandreh/public-inbox?search=%5Buuid%5D[Comments and discussions].
diff --git a/doc/uuid.fr.3.adoc b/doc/uuid.fr.3.adoc
deleted file mode 100644
index 24fcde5..0000000
--- a/doc/uuid.fr.3.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(3)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.fr.7CHANGELOG.adoc b/doc/uuid.fr.7CHANGELOG.adoc
deleted file mode 100644
index e1b6975..0000000
--- a/doc/uuid.fr.7CHANGELOG.adoc
+++ /dev/null
@@ -1,22 +0,0 @@
-= uuid(7CHANGELOG)
-
-== NAME
-
-uuid - .
-
-== DESCRIPTION
-
-////
-Entry template:
-== Unreleased
-=== Added
-=== Changed
-=== Deprecated
-=== Removed
-=== Fixed
-=== Security
-////
-
-Changelog for https://euandre.org/s/uuid/en/[uuid].
-
-== Unreleased
diff --git a/doc/uuid.fr.7README.adoc b/doc/uuid.fr.7README.adoc
deleted file mode 100644
index 3def718..0000000
--- a/doc/uuid.fr.7README.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7README)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.fr.7recipes.adoc b/doc/uuid.fr.7recipes.adoc
deleted file mode 100644
index 2f20a16..0000000
--- a/doc/uuid.fr.7recipes.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7recipes)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.fr.7tutorial.adoc b/doc/uuid.fr.7tutorial.adoc
deleted file mode 100644
index 1a77799..0000000
--- a/doc/uuid.fr.7tutorial.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7tutorial)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.fr.7why.adoc b/doc/uuid.fr.7why.adoc
deleted file mode 100644
index 51096c1..0000000
--- a/doc/uuid.fr.7why.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7why)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.pt.0.adoc b/doc/uuid.pt.0.adoc
deleted file mode 100644
index 1670ad5..0000000
--- a/doc/uuid.pt.0.adoc
+++ /dev/null
@@ -1,13 +0,0 @@
-= uuid(0)
-
-
-
-== NAME
-
-uuid - generate or parse UUID values.
-
-
-
-== DESCRIPTION
-
-*uuid* generates UUID of version 4 or version 7, or validate a given UUID.
diff --git a/doc/uuid.pt.1.adoc b/doc/uuid.pt.1.adoc
deleted file mode 100644
index e64c665..0000000
--- a/doc/uuid.pt.1.adoc
+++ /dev/null
@@ -1,159 +0,0 @@
-= uuid(1)
-
-
-
-== NAME
-
-uuid - generate a UUID version 4 or 7, or validate a UUID string.
-
-
-
-== SYNOPSYS
-
-*uuid* [-v (4|7)] *uuid* [_STRING_]
-
-
-
-== EXAMPLES
-
-
-=== Print a (version 4) UUID on the terminal
-
-[source, sh]
-....
-$ uuid
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Print a verson 7 UUID on the terminal
-
-[source, sh]
-....
-$ uuid -v 7
-d3891787-c952-af17-d697-0df3b85981e1
-....
-
-
-=== Create a new UUID as part of a path
-
-[source, sh]
-....
-dir="$PWD"/"$(uuid)"/data
-....
-
-
-=== Validate a given UUID
-
-[source, sh]
-....
-ID="$(basename -- "$directory")"
-if ! uuid "$ID"; then
- echo "Bad UUID in directory: $ID" >&2
- exit 1
-fi
-....
-
-
-
-== DESCRIPTION
-
-The *uuid* utility generates a new UUID when no _STRING_ is given and write it to _stdout_. If a _STRING_ is given, *uuid* validates it and exits, and produces no output.
-
-The *-v* option allows for choosing which type of UUID to be emitted, either version 4 ("the random one") or version 7 ("the sortable one"). When omitted, version 4 is chosen as default.
-
-
-
-== OPTIONS
-
-*-v NUMBER*:: Choose the UUID version *NUMBER* to be generated. Supported values are 4 (the default) and 7.
-
-
-
-== OPERANDS
-
-_STRING_:: If it is
-
- *not given*::: generate a brand new random UUIDv4, print it to _stdout_ and exit normally;
- *given*::: test if it is a valid UUIDv4 and exit normally if so.
-
-
-
-== IO
-
-
-=== STDIN
-
-Not used.
-
-
-=== STDOUT
-
-The UUIDv4 format is made of byte blocks encoded as hexadecimals, using a <hyphen-minus>('`-`') as the block separator:
-
-[source, sh]
-....
-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
-....
-
-An example output is:
-
-[source, sh]
-....
-cb46d0c0-b2aa-4a6c-a119-8deace2544a2
-....
-
-
-=== STDERR
-
-Errors on UUID validation are sent to the standard error. For instance:
-
-[source, sh]
-....
-$ uuid not-a-uuid-123 1>/dev/null
-uuid: str isn't of the correct length
-....
-
-When valid, validation emits nothing and exits with 0.
-
-
-=== INPUT FILES
-
-None.
-
-
-=== OUTPUT FILES
-
-None.
-
-
-
-== EXIT STATUS
-
-0:: Generating or validating a UUID was successfull.
-3:: UUID validation failed.
-
-
-
-== CONFORMING TO
-
-The versions 4 and 7 of the UUID defined in *RFC 9562*.
-
-
-
-== SEE ALSO
-
-
-
-== AUTHORS
-
-mailto:eu@euandre.org[EuAndreh] and contributors.
-
-
-
-== BUGS
-
-* Report bugs to the mailto:~euandreh/public-inbox@lists.sr.ht[mailing list]. Use the subject "[uuid] BUG or TASK: <description>".
-* Browse bugs https://euandre.org/git/uuid/TODOs.html[online].
-* https://euandre.org/git/uuid/[Homepage].
-* https://lists.sr.ht/~euandreh/public-inbox?search=%5Buuid%5D[Comments and discussions].
diff --git a/doc/uuid.pt.3.adoc b/doc/uuid.pt.3.adoc
deleted file mode 100644
index 24fcde5..0000000
--- a/doc/uuid.pt.3.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(3)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.pt.7CHANGELOG.adoc b/doc/uuid.pt.7CHANGELOG.adoc
deleted file mode 100644
index e1b6975..0000000
--- a/doc/uuid.pt.7CHANGELOG.adoc
+++ /dev/null
@@ -1,22 +0,0 @@
-= uuid(7CHANGELOG)
-
-== NAME
-
-uuid - .
-
-== DESCRIPTION
-
-////
-Entry template:
-== Unreleased
-=== Added
-=== Changed
-=== Deprecated
-=== Removed
-=== Fixed
-=== Security
-////
-
-Changelog for https://euandre.org/s/uuid/en/[uuid].
-
-== Unreleased
diff --git a/doc/uuid.pt.7README.adoc b/doc/uuid.pt.7README.adoc
deleted file mode 100644
index 3def718..0000000
--- a/doc/uuid.pt.7README.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7README)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.pt.7recipes.adoc b/doc/uuid.pt.7recipes.adoc
deleted file mode 100644
index 2f20a16..0000000
--- a/doc/uuid.pt.7recipes.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7recipes)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.pt.7tutorial.adoc b/doc/uuid.pt.7tutorial.adoc
deleted file mode 100644
index 1a77799..0000000
--- a/doc/uuid.pt.7tutorial.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7tutorial)
-
-== NAME
-
-uuid - .
diff --git a/doc/uuid.pt.7why.adoc b/doc/uuid.pt.7why.adoc
deleted file mode 100644
index 51096c1..0000000
--- a/doc/uuid.pt.7why.adoc
+++ /dev/null
@@ -1,5 +0,0 @@
-= uuid(7why)
-
-== NAME
-
-uuid - .
diff --git a/mkdeps.sh b/mkdeps.sh
index dc685ec..14e475c 100755
--- a/mkdeps.sh
+++ b/mkdeps.sh
@@ -6,7 +6,7 @@ export LANG=POSIX.UTF-8
libs() {
find src tests -name '*.go' | grep -v '/main\.go$' |
- grep -v '/version\.go$'
+ grep -v '/meta\.go$'
}
mains() {
@@ -14,12 +14,24 @@ mains() {
}
docs() {
- find doc/*.adoc
+ find doc/*.en.*.adoc
+}
+
+xdocs() {
+ for l in `find po/doc/*.po | xargs -I% basename % .po`; do
+ docs | sed 's|/\(.*\)\.en\.\(.*\)$|/\1.'"$l"'.\2|'
+ done
+}
+
+pos() {
+ find po/ -name '*.po' | grep -v '^po/doc/'
}
libs | varlist 'libs.go'
mains | varlist 'mains.go'
-docs | varlist 'manpages.N.adoc'
+docs | varlist 'manpages.en.N.adoc'
+xdocs | varlist 'manpages.xx.N.adoc'
+pos | varlist 'sources.po'
find tests/functional/*/*.go -not -name main.go | varlist 'functional-tests/lib.go'
find tests/functional/*/main.go | varlist 'functional-tests/main.go'
diff --git a/po/de.po b/po/doc/de.po
index 2583f7b..ac748dc 100644
--- a/po/de.po
+++ b/po/doc/de.po
@@ -1,15 +1,5 @@
-# German translations for PACKAGE package
-# Copyright (C) 2025 Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2025.
-#
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2025-05-09 10:10-0300\n"
-"PO-Revision-Date: 2025-05-04 09:15-0300\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po/uuid.pot b/po/doc/doc.pot
index 60e398b..a3f1a82 100644
--- a/po/uuid.pot
+++ b/po/doc/doc.pot
@@ -1,16 +1,5 @@
-# SOME DESCRIPTIVE TITLE
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2025-05-09 10:10-0300\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po/eo.po b/po/doc/eo.po
index c98fb92..a018721 100644
--- a/po/eo.po
+++ b/po/doc/eo.po
@@ -1,15 +1,5 @@
-# Esperanto translations for PACKAGE package
-# Copyright (C) 2025 Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2025.
-#
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2025-05-09 10:10-0300\n"
-"PO-Revision-Date: 2025-05-04 09:15-0300\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po/es.po b/po/doc/es.po
index 67f7bbf..7bfb01e 100644
--- a/po/es.po
+++ b/po/doc/es.po
@@ -1,15 +1,5 @@
-# Spanish translations for PACKAGE package
-# Copyright (C) 2025 Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2025.
-#
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2025-05-09 10:10-0300\n"
-"PO-Revision-Date: 2025-05-04 09:15-0300\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po/fr.po b/po/doc/fr.po
index 42f1e40..3871537 100644
--- a/po/fr.po
+++ b/po/doc/fr.po
@@ -1,15 +1,5 @@
-# French translations for PACKAGE package
-# Copyright (C) 2025 Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2025.
-#
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2025-05-09 10:10-0300\n"
-"PO-Revision-Date: 2025-05-04 09:15-0300\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po/note.txt b/po/doc/note.txt
index 45279a4..45279a4 100644
--- a/po/note.txt
+++ b/po/doc/note.txt
diff --git a/po/po4a.cfg b/po/doc/po4a.cfg
index 1a592c1..8c0808b 100644
--- a/po/po4a.cfg
+++ b/po/doc/po4a.cfg
@@ -1,12 +1,13 @@
[options] --keep 0 --master-charset UTF-8 --localized-charset UTF-8 --addendum-charset UTF-8
-[po_directory] po
+[po_directory] po/doc
[type: asciidoc] doc/uuid.en.0.adoc $lang:doc/uuid.$lang.0.adoc
[type: asciidoc] doc/uuid.en.1.adoc $lang:doc/uuid.$lang.1.adoc
[type: asciidoc] doc/uuid.en.3.adoc $lang:doc/uuid.$lang.3.adoc
[type: asciidoc] doc/uuid.en.7CHANGELOG.adoc $lang:doc/uuid.$lang.7CHANGELOG.adoc
[type: asciidoc] doc/uuid.en.7README.adoc $lang:doc/uuid.$lang.7README.adoc
+[type: asciidoc] doc/uuid.en.7TODOs.adoc $lang:doc/uuid.$lang.7TODOs.adoc
[type: asciidoc] doc/uuid.en.7recipes.adoc $lang:doc/uuid.$lang.7recipes.adoc
[type: asciidoc] doc/uuid.en.7tutorial.adoc $lang:doc/uuid.$lang.7tutorial.adoc
[type: asciidoc] doc/uuid.en.7why.adoc $lang:doc/uuid.$lang.7why.adoc
diff --git a/po/pt.po b/po/doc/pt.po
index 00fe790..b2897f6 100644
--- a/po/pt.po
+++ b/po/doc/pt.po
@@ -1,15 +1,5 @@
-# Portuguese translations for PACKAGE package
-# Copyright (C) 2025 Free Software Foundation, Inc.
-# This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2025.
-#
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2025-05-09 10:10-0300\n"
-"PO-Revision-Date: 2025-05-04 09:15-0300\n"
-"Last-Translator: Automatically generated\n"
-"Language-Team: none\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
diff --git a/po/uuid/de.po b/po/uuid/de.po
new file mode 100644
index 0000000..4fb7005
--- /dev/null
+++ b/po/uuid/de.po
@@ -0,0 +1,19 @@
+msgid ""
+msgstr ""
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/uuid.go:49
+msgid "uuid: Bad char in string"
+msgstr ""
+
+#: src/uuid.go:46
+msgid "uuid: Bad count of dashes in string"
+msgstr ""
+
+#: src/uuid.go:43
+msgid "uuid: str isn't of the correct length"
+msgstr ""
diff --git a/po/uuid/eo.po b/po/uuid/eo.po
new file mode 100644
index 0000000..9e20f59
--- /dev/null
+++ b/po/uuid/eo.po
@@ -0,0 +1,19 @@
+msgid ""
+msgstr ""
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/uuid.go:49
+msgid "uuid: Bad char in string"
+msgstr ""
+
+#: src/uuid.go:46
+msgid "uuid: Bad count of dashes in string"
+msgstr ""
+
+#: src/uuid.go:43
+msgid "uuid: str isn't of the correct length"
+msgstr ""
diff --git a/po/uuid/es.po b/po/uuid/es.po
new file mode 100644
index 0000000..6a39e8b
--- /dev/null
+++ b/po/uuid/es.po
@@ -0,0 +1,19 @@
+msgid ""
+msgstr ""
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/uuid.go:49
+msgid "uuid: Bad char in string"
+msgstr ""
+
+#: src/uuid.go:46
+msgid "uuid: Bad count of dashes in string"
+msgstr ""
+
+#: src/uuid.go:43
+msgid "uuid: str isn't of the correct length"
+msgstr ""
diff --git a/po/uuid/fr.po b/po/uuid/fr.po
new file mode 100644
index 0000000..24884f2
--- /dev/null
+++ b/po/uuid/fr.po
@@ -0,0 +1,19 @@
+msgid ""
+msgstr ""
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: src/uuid.go:49
+msgid "uuid: Bad char in string"
+msgstr ""
+
+#: src/uuid.go:46
+msgid "uuid: Bad count of dashes in string"
+msgstr ""
+
+#: src/uuid.go:43
+msgid "uuid: str isn't of the correct length"
+msgstr ""
diff --git a/po/uuid/po4a.cfg b/po/uuid/po4a.cfg
new file mode 100644
index 0000000..057799c
--- /dev/null
+++ b/po/uuid/po4a.cfg
@@ -0,0 +1,3 @@
+[options] --keep 0 --master-charset UTF-8 --localized-charset UTF-8 --addendum-charset UTF-8
+
+[po_directory] po/uuid
diff --git a/po/uuid/pt.po b/po/uuid/pt.po
new file mode 100644
index 0000000..6486f34
--- /dev/null
+++ b/po/uuid/pt.po
@@ -0,0 +1,19 @@
+msgid ""
+msgstr ""
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: src/uuid.go:49
+msgid "uuid: Bad char in string"
+msgstr ""
+
+#: src/uuid.go:46
+msgid "uuid: Bad count of dashes in string"
+msgstr ""
+
+#: src/uuid.go:43
+msgid "uuid: str isn't of the correct length"
+msgstr ""
diff --git a/po/uuid/uuid.pot b/po/uuid/uuid.pot
new file mode 100644
index 0000000..519412a
--- /dev/null
+++ b/po/uuid/uuid.pot
@@ -0,0 +1,19 @@
+msgid ""
+msgstr ""
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/uuid.go:49
+msgid "uuid: Bad char in string"
+msgstr ""
+
+#: src/uuid.go:46
+msgid "uuid: Bad count of dashes in string"
+msgstr ""
+
+#: src/uuid.go:43
+msgid "uuid: str isn't of the correct length"
+msgstr ""
+
diff --git a/src/uuid.go b/src/uuid.go
index fa1e958..c99f20b 100644
--- a/src/uuid.go
+++ b/src/uuid.go
@@ -4,13 +4,14 @@ import (
"crypto/rand"
"encoding/binary"
"encoding/hex"
- "errors"
"flag"
"fmt"
"io"
"os"
"strings"
"time"
+
+ gt "gotext"
)
@@ -39,11 +40,15 @@ var (
dashIndexes = []int{ 8, 13, 18, 23 }
randomReader = rand.Reader
- ErrBadLength = errors.New(
+ ErrBadLength = gt.Error(gt.Gettext(
"uuid: str isn't of the correct length",
- )
- ErrBadDashCount = errors.New("uuid: Bad count of dashes in string")
- ErrBadDashPosition = errors.New("uuid: Bad char in string")
+ ))
+ ErrBadDashCount = gt.Error(gt.Gettext(
+ "uuid: Bad count of dashes in string",
+ ))
+ ErrBadDashPosition = gt.Error(gt.Gettext(
+ "uuid: Bad char in string",
+ ))
DefaultVersion = 4