Translator Module: v1.0
Helping developers build better, higher quality products, faster, is very important to us. On an international stage, working with a system in your own language is a large part of being productive and producing a complete product for clients.
Gone are the days of copying translation files and replacing keys one by one and looking for differences manually. The Translator module helps translators quickly view translation completeness for the Streams Platform and addons, translate missing keys / update existing ones, and generate clean translation files for submitting to GitHub!
Getting Started
To get started run composer update
. There are a couple small patches that this modules takes advantage of in the Streams Platform and Helper Plugin.
Next pull the addon in with composer require anomaly/translator-module
or clone it with [email protected]:anomalylabs/translator-module.git
.
Lastly, install the module via the Control Panel or php artisan module:install translator
.
Now you can access the module in the control panel like normal.
Translating
To get started you will need to visit Settings to enable the locale(s) that you would like to translate for.
Once you return to the Translator module you should be able to available addons and the translation completeness for each one. English is not included since it's the fallback locale for Pyro.
From here you can view translation differences and even translatable key differences for each translation you have enabled.
Click "translate" next to the addon you wish to translate. The translation form works the exactly same as any other translatable form in Pyro works.
When you are finished translating or wish to save your progress simply click "Save". The translated files will be automatically generated in the addon you're working on. All that's left is to commit your changes (and submit a pull request if you are working on a Pyro or any of it's addons).
Pull Requests
If not already familiar with submitting PRs this is a quickstart guide:
The easiest way to contribute to the Streams Platform (labeled System in the Translator module) or any of Pyro's addons is to fork, clone, commit, and submit.
Fork
First fork the addon you wish to work on. You will need your own fork in order to submit pull requests.
Clone
Chances are you installed Pyro with Composer which does not include branch / remote data like cloning does. So you will need to clone your fork manually after first deleting the composer installed version.
Commit
After you are done working - simply commit your changes back to your fork using git.
Submit
Lastly, submit a PR back to base addon using your fork as a comparison. This can be done via the GitHub.com.
Final Thoughts
This is an initial release - feel free to submit bug reports just like any other addon under the PyroCMS repository.
Happy translating!
- Ryan