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.
- Create a Firebase database
- Create a user in Firebase, because login is required to edit files
- Add database name to main.js file
- After login follow instructions to import your structured JSON file that will serve as the translation master
- 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
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.
- 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.
- 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