Welcome to the Web UI branch of the IPFS Translation Project 🌐✍️🖖
We use transifex.com to manage translations. Please don't edit the locale files directly.
For more info on our i18n process at IPFS, check out: https://github.com/ipfs/i18n
- Install and set up command-line client (
tx
) - To download new translations from Transifex:
tx pull -a
- this should create/update files in
public/locales/*
that need to be committed - if a new language is created, remember to add it to
src/i18n.js
- this should create/update files in
- If there are new locales, run
lol
to update ourlanguages.json
npx -q @olizilla/lol public/locales > src/lib/languages.json
We've split up our files by tab, so you can find the translations files at
- Files
->
public/locales/en/files.json
- Explore
->
public/locales/en/explore.json
..etc. The filename is the namespace that i18next
will look up to find the keys for the right section.
We define our source file to be the en
locale, in public/locales/en/*
. Developers should update those files directly. Changes to from master branch are fetched by Transifex automatically every day for our lovely team of translators to ruminate on.
All other locales are pull
ed from Transifex service via the tx
commandline tool.
If you want to add new keys or change existing values in the en
locale, you should make sure you have the latest from transifex first.
For example, before adding keys to public/locales/en/explore.json
, first check you've got the latest source file:
$ tx pull -r ipld-explorer.explore-json -s
tx INFO: Pulling translations for resource ipld-explorer.explore-json (source: public/locales/en/explore.json)
tx WARNING: -> ko_KR: public/locales/ko_KR/explore.json
tx WARNING: -> en: public/locales/en/explore.json
...
-s
means "include the source file when pulling", which in our case is theen
versions.-r ipld-explorer.explore-json
means justexplore.json
file. The mappings of resource name to files is in the.tx/config
file.
Now make your changes and add great keys and snappy en
default values for them. When you are done, commit your changes as per usual. Changes to from master branch are fetched by Transifex automatically.