Skip to content

Latest commit

 

History

History

locales

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Locales

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

Add new locale

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.

Troubleshooting

See: https://pkg.go.dev/golang.org/x/text/message#hdr-Translation_Pipeline