fix link & add SRI note

master
rugk 8 years ago
parent 2e31541b02
commit 2f2529e49e

@ -12,7 +12,8 @@ The translation concept follows similar concepts as GNU gettext:
3. Open the file in a text editor and change the messages after the english message ID.
4. Save the file in UTF-8 character encoding.
5. Add your new language code into the array called `supportedLanguages` in `js/privatebin.js` (around line 300).
6. Done. Now you can create a pull requests to get your translation merged into the official PrivateBin.
6. (optional) As you modified the JavaScript file you have to update [the SRI hashes too](Development#subresource-integrity-for-javascript-resources). If you do not manage this, you may also just leave this task to the maintainers, who can do this for you when merging the PR.
7. Done. Now you can create a pull requests to get your translation merged into the official PrivateBin.
## Technical Details
@ -43,7 +44,7 @@ Some languages can have more then one plural forms. Which form to use depending
Currently we do not inform the JS part about the available languages on the server, but instead these are statically encoded in the file `js/privatebin.js` in the property `i18n.supportedLanguages` (around line 300). If you add a new language, remember to add it there, too.
If your new language does use more complex plurals then English, you need to add the [formula](http://localization-guide.readthedocs.org/en/latest/l10n/pluralforms.html) for it in two places:
* [lib/i18n.php](https://github.com/PrivateBin/PrivateBin/blob/master/lib/i18n.php) in class i18n, method _getPluralForm()
* [lib/I18n.php](https://github.com/PrivateBin/PrivateBin/blob/master/lib/I18n.php) in class i18n, method _getPluralForm()
* [js/privatebin.js](https://github.com/PrivateBin/PrivateBin/blob/master/js/privatebin.js) in class i18n, method getPluralForm()
For the language labels displayed in the optional language selection drop down menu, a file called `i18n/languages.json` was created. Most languages should already be included with a translated language label and its English translation.

Loading…
Cancel
Save