Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

inventaire-i18n

i18n files for Inventaire:

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

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/server with the previously fetched resources

npm run build-client
npm run build-server

Built values are tailored to work with Polyglot

push

To make the translations available to the server and the client:

  • Commit on the master branch
  • Run npm run update-dist to update the dist branch and make the built files available to the server and client
  • In the server or client repo, run npm run update-i18n to fetch the latest dist files

About

repository hosting inventaire i18n strings and scripts

Resources

Releases

No releases published

Packages

No packages published