Weblate and i18next json files

There鈥檚 a bug report on github about JSON format breaks i18next files due to automatic restructuring. Actually it flattens your i18next JSON file and makes it unusable for further usage. So after starting with a JSON file like: { "navbar": { "reward": "Rewards", "about": "About" } } you end up with a committed file which was transformed into this: { "navbar.reward": "Rewards", "navbar.about": "About" } Use Weblate PRE_COMMIT_SCRIPTS Weblate offers script hooks before or after a repository action happens. I鈥檓 using one of those hooks to execute a short Python script which reformats JSON again to be usable in i18next translation tools again. The script below is also available on Github: ...

April 29, 2016 路 2 min 路 284 words 路 dw

GitLab as OAuth provider for Weblate

Weblate is built on Django and you can use a lot of authentication plugins. After my contribution to django-allauth and the backporting work of glensc and omab to django-social-auth it鈥檚 very easy to integrate [GitLab]鈥檚 authentication provider with Weblate GitLab All you have to do on GitLab is configuration through webinterface. Go to https://gitlab.com/profile/applications and register a new application. Name: Weblate Redirect URI: `https://weblate.yourdomain.tld/accounts/complete/GitLab/`` After registering your new application you鈥檒l get your Application Key and Secret. You鈥檒l need this later for configuration ...

April 28, 2016 路 2 min 路 340 words 路 dw