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

Support localized language collections #11

Closed
ikreymer opened this issue Feb 21, 2018 · 1 comment
Closed

Support localized language collections #11

ikreymer opened this issue Feb 21, 2018 · 1 comment

Comments

@ikreymer
Copy link
Contributor

Support localized UI text for collections to support multiple language deployment.

ikreymer added a commit that referenced this issue Feb 25, 2018
…d via error template to help with localization #11

tests: fix single-lock unit tests, rename
integration-tests: update lock test to new template-based error message
ikreymer added a commit to ukwa/pywb that referenced this issue Feb 27, 2018
…or localization ukwa/ukwa-pywb#11

split init_routes() into init_coll_routes() and make_coll_routes() which retrieves a list of per-collection routes only
ikreymer added a commit that referenced this issue Feb 27, 2018
- add babel to requirements.txt, install in Dockerfile
- wrap text in templates with { % trans %}/{% endtrans %} blocks
- language routes: enable /en/<coll> and /cy/<coll> prefixes which set current locale
- i18n dir: babel.cfg, auto-extracted translations added for cy and en
- loc-clear.sh - resets translations for en and cy
- loc-update.sh - extracts, updates and compiles translations for use
- banner: inject locale as window.banner_info.locale to use as locale for toLocaleString()
- home page: add placeholder language selector
ikreymer added a commit that referenced this issue Feb 27, 2018
setup & babel configimprovements: integrate babel commands into setup.py
- clear-loc.sh clears existing localizations
- update-loc.sh extracts, updates and recompiles localizations
tests: move unit tests to ukwa_pywb/test package
locale tests: #11
- add sample localized strings to CY (home page and banner)
- add test_locales.py for locale testing
- add locale integration tests in locale.robot
README: fix typo
README: fix typo
README: fix typo
README: fix typo
ikreymer added a commit that referenced this issue Feb 27, 2018
setup & babel configimprovements: integrate babel commands into setup.py
- clear-loc.sh clears existing localizations
- update-loc.sh extracts, updates and recompiles localizations
tests: move unit tests to ukwa_pywb/test package
locale tests: #11
- add sample localized strings to CY (home page and banner)
- add test_locales.py for locale testing
- add locale integration tests in locale.robot
README: fix typo
@ikreymer
Copy link
Contributor Author

ikreymer commented Feb 28, 2018

Enabled locale prefixes for collection access. Collections are automatically available under the /en/ and /cy prefixes, configured in the locales block in config.yaml

This results in the following additional collection routes:

  • /en/open-access/
  • /en/reading-room/
  • /en/qa-access/
  • /cy/open-access/
  • /cy/reading-room/
  • /cy/qa-access/

Using Babel to extract the text in a GNU gettext compatible messages files:

The locale.robot integration script tests a sample CY localization.

The i18n/update-loc.sh script can be used to extract/update/compile translations, and i18n/clear-loc.sh can be used to clear translations and regenerated.

More info will be added to the docs #15

N0taN3rd pushed a commit to webrecorder/pywb that referenced this issue Sep 3, 2019
…or localization ukwa/ukwa-pywb#11

split init_routes() into init_coll_routes() and make_coll_routes() which retrieves a list of per-collection routes only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant