i18n files for Inventaire:
- client:
dist/client
- server:
dist/emails
git clone https://github.com/inventaire/inventaire-i18n
cd inventaire-i18n
npm install
# Customize ./config/local.coffee Transifex username and password to be able to fetch
# translated strings
npm run fetch-translations
npm run build
If you dont want to fetch translations, you can use the dist
branch locally : simply copy paste the translated files into the public
folder :
git checkout dist
cd client
mkdir public/i18n
cp inventaire-i18n/dist/client/* ./public/i18n
Building requires to
- set a username and password in
./config/local.coffee
to be authentified on Transifex - make a SPARQL request per translated languages to get the list of properties
To prevent having to pass by those in production, the dist
branch provides builds ready for production
# Use dist files updated
git clone https://github.com/inventaire/inventaire-i18n --branch dist
Refresh ./translations
by fetching the latest translations from Inventaire Transifex project and Wikidata
npm run fetch-translations
Wikidata properties aren't refreshed if a file already exist as it can take a while to fetch, but a refresh can be forced by deleting the current files:
rm ./translations/wikidata/*.json
npm run fetch-translations
Populates ./dist/client
and ./dist/emails
with the previously fetched resources
npm run build-client
npm run build-emails
Built values are tailored to work with Polyglot