Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n Documentation #3637

Merged
merged 6 commits into from Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -66,6 +66,7 @@ Thinking about contributing to RES? Awesome! We just ask that you follow a few s
- `lib/templates/`: RES templates
- `lib/utils/`: RES utilities
- `lib/vendor/`: RES vendor libraries
- `locales`: RES i18n translations
- `node/`: Node files
- `safari/`: Safari-specific RES files
- `tests/`: integration tests
Expand Down Expand Up @@ -181,6 +182,8 @@ See [`examples/module.js`](https://github.com/honestbleeps/Reddit-Enhancement-Su
Create a new `.js` file in `lib/modules`.
It will automatically be loaded when the build script is restarted.

All modules must now have i18n implementations. Please see [here](https://github.com/honestbleeps/Reddit-Enhancement-Suite/blob/master/locales/locales/README.md) for details.

##### Inline image viewer hosts

Please be sure that they support [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) so the sites do not need to be added as additional permissions, which has caused [headaches in the past](https://www.reddit.com/r/Enhancement/comments/1jskcm/announcement_chrome_users_did_your_res_turn_off/).
Expand Down
8 changes: 8 additions & 0 deletions locales/locales/README.md
Expand Up @@ -7,3 +7,11 @@
## New strings

New strings should be added to `en.json` and only that file.

## Translating Modules

Currently only module names, categories and descriptions are translatable. Please see [this](https://github.com/honestbleeps/Reddit-Enhancement-Suite/blob/master/lib/modules/commentHidePersistor.js) module for an example of how its implemented.

These strings can be found in `en.json` which then translate to the English string. A list of categories can also be found near the top of `en.json`.

Modules will be reviewed for i18n before merge.