diff --git a/README.md b/README.md index bd25277..1418eb7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,22 @@ # translations-test +## Install and run + ```shell go get go run main.go LC_MESSAGES=es_ES go run main.go ``` + +## Update template + +``` +xgotext -in . -out locales/ +``` + +## Update translations from template +```shell +msgmerge --update locales/es_ES/LC_MESSAGES/default.po locales/default.pot +``` + + diff --git a/locales/es_ES/LC_MESSAGES/default.po b/locales/es_ES/LC_MESSAGES/default.po index b1dfeeb..39f415a 100644 --- a/locales/es_ES/LC_MESSAGES/default.po +++ b/locales/es_ES/LC_MESSAGES/default.po @@ -4,5 +4,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: main.go:21 +msgid "Goodbye World" +msgstr "" + +#: main.go:19 msgid "Hello World" msgstr "Hola Mundo" diff --git a/locales/pt/LC_MESSAGES/default.po b/locales/pt/LC_MESSAGES/default.po index a06f121..d5eb9a4 100644 --- a/locales/pt/LC_MESSAGES/default.po +++ b/locales/pt/LC_MESSAGES/default.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "PO-Revision-Date: 2025-08-04 13:18+0000\n" "Last-Translator: 3wordchant <3wc.coopcloud@doesthisthing.work>\n" -"Language-Team: Portuguese \n" +"Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -11,6 +11,10 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 5.12.2\n" +#: main.go:21 +msgid "Goodbye World" +msgstr "" + #: main.go:19 msgid "Hello World" msgstr "Hola mundo"