Skip to content

Latest commit

 

History

History
57 lines (48 loc) · 1.77 KB

README.md

File metadata and controls

57 lines (48 loc) · 1.77 KB

inventaire-i18n

i18n files for Inventaire:

  • client: dist/client
  • server: dist/emails

install

development

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

production

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

fetch

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

build

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