This directory contains source translations to different languages.
messages.gotext.json
contains the actual translations which will be generated by gotext
.
Install gotext
:
go get -u golang.org/x/text/cmd/gotext
Update locales with:
make updatelocales
For example add Finnish:
cp -r en-US fi-FI
Change both messages.gotext.json
and out.gotext.json
language
JSON key to locale name:
{
"language": "fi-FI",
"messages": ["............"]
}
- Translate
messages.gotext.json
- Add language code to
cmd/kallu/main.go
//go:generate
line - Run update locales (see Makefile).
Make a pull request for your new translation when your translation is finished.
See: https://pkg.go.dev/golang.org/x/text/message#hdr-Translation_Pipeline