/translation-utility

A utility to make the localization of web apps easier by providing a UI.

Primary LanguageApacheConfMIT LicenseMIT

Translation Utility (this project is very much in Beta)

This utility is meant to make the localization of web apps easier by providing a easy-to-use interface for editing JSON localisation files. Firebase is used to store the files in the cloud and cant either be served from there or downloaded using Grunt.

demo

Installation

  1. Create a Firebase database
  2. Create a user in Firebase, because login is required to edit files
  3. Add database name to main.js file
  4. After login follow instructions to import your structured JSON file that will serve as the translation master
  5. In the url the object to translate is specified as a query (?nl_nl). A new translation will be created if it does not exist

Export

To export data from Firebase create a file auth.json in the config folder with you Firebase secret token {"token": "TOKEN_VALUE"}. In Gruntfile you specify the translation to export and then run the default grunt task. This will export your file to the locales folder.

Features

  • A masterfile with the JSON fields that need translation is used as a template for translation.
  • Fields that are present in the master file but not in the locale will be added when data a translation is added.
  • Fields that are present in the locale file but not in the master will not be removed so translated text is not lost when master changes.
  • Prefixing a key with two underscores renderes it uneditable.
  • Underscores in keys are converted to spaces.
  • Markdown can optionally be used to style text.
  • Html in the value fields is rendered as markdown.
  • After editing a value a preview is shown if markdown is used.

TODO

  • add offline support
  • provide way to add comments

This app was created for internal use so has not been x-browser tested.

Favicon designed by Berkay Sargın from the Noun Project