Commit 51e01221 by Sanford Student

new release 2.0.17

parent 5c5dc427
...@@ -12,7 +12,7 @@ install: ...@@ -12,7 +12,7 @@ install:
- "pip install selenium==2.53.0" - "pip install selenium==2.53.0"
- "pip uninstall -y xblock-drag-and-drop-v2" - "pip uninstall -y xblock-drag-and-drop-v2"
- "python setup.py sdist" - "python setup.py sdist"
- "pip install dist/xblock-drag-and-drop-v2-2.0.16.tar.gz" - "pip install dist/xblock-drag-and-drop-v2-2.0.17.tar.gz"
script: script:
- pep8 drag_and_drop_v2 tests --max-line-length=120 - pep8 drag_and_drop_v2 tests --max-line-length=120
- pylint drag_and_drop_v2 - pylint drag_and_drop_v2
......
...@@ -475,20 +475,20 @@ $ python run_tests.py tests/integration/ ...@@ -475,20 +475,20 @@ $ python run_tests.py tests/integration/
i18n compatibility i18n compatibility
================== ==================
According to [edX docs on XBlock i18n][edx-docs-i18n], LMS runtime is capable of supporting XBlock i18n and l10n. According to [edX docs on XBlock i18n][edx-docs-i18n], LMS runtime is capable of supporting XBlock i18n and l10n.
To comply with l10n requirements, XBlock is supposed to provide translations in To comply with l10n requirements, XBlock is supposed to provide translations in
`xblock_package_root/translations/locale_code/LC_MESSAGES/text.po` folder in GNU Gettext Portable Object file format. `xblock_package_root/translations/locale_code/LC_MESSAGES/text.po` folder in GNU Gettext Portable Object file format.
[edx-docs-i18n]: http://edx.readthedocs.io/projects/xblock-tutorial/en/latest/edx_platform/edx_lms.html#internationalization-support [edx-docs-i18n]: http://edx.readthedocs.io/projects/xblock-tutorial/en/latest/edx_platform/edx_lms.html#internationalization-support
Drag and Drop v2 XBlock aims to comply with i18n requirements for Open edX platform, including a stricter set of Drag and Drop v2 XBlock aims to comply with i18n requirements for Open edX platform, including a stricter set of
requirements for `edx.org` itself, thus providing the required files. So far only two translations are available: requirements for `edx.org` itself, thus providing the required files. So far only two translations are available:
* Default English translation * Default English translation
* Fake "Esperanto" translation used to test i18n/l10n. * Fake "Esperanto" translation used to test i18n/l10n.
Updates to translated strings are supposed to be propagated to `text.po` files. Unfortunately, the process is mostly Updates to translated strings are supposed to be propagated to `text.po` files. Unfortunately, the process is mostly
manual. EdX [i18n_tools][edx-i18n-tools] might be helpful, but they are too tied to edx-platform, so as of Aug 2016 manual. EdX [i18n_tools][edx-i18n-tools] might be helpful, but they are too tied to edx-platform, so as of Aug 2016
do not provide any benefits over manual approach. do not provide any benefits over manual approach.
[edx-i18n-tools]: https://github.com/edx/i18n-tools [edx-i18n-tools]: https://github.com/edx/i18n-tools
...@@ -510,18 +510,18 @@ Javascript command is a little bit more verbose: ...@@ -510,18 +510,18 @@ Javascript command is a little bit more verbose:
``` ```
Note that both commands generate partial `messages.po` file - JS or python only, while `text.po` is supposed to contain Note that both commands generate partial `messages.po` file - JS or python only, while `text.po` is supposed to contain
all translatable strings. Both commands can be modified to append to *existing* `messages.po` file by adding all translatable strings. Both commands can be modified to append to *existing* `messages.po` file by adding
`--join-existing` key. `--join-existing` key.
To check if `text.po` is correct, one can run `msgfmt` to build a `text.mo` file: To check if `text.po` is correct, one can run `msgfmt` to build a `text.mo` file:
``` ```
~/xblock-drag-and-drop-v2/drag_and_drop_v2$ msgfmt translations/en/LC_MESSAGES/text.po -o translations/en/LC_MESSAGES/text.mo ~/xblock-drag-and-drop-v2/drag_and_drop_v2$ msgfmt translations/en/LC_MESSAGES/text.po -o translations/en/LC_MESSAGES/text.mo
``` ```
If everything is correct, it will silently exit and create `translations/en/LC_MESSAGES/text.mo` file. If everything is correct, it will silently exit and create `translations/en/LC_MESSAGES/text.mo` file.
**Note:** As of 2016-08-04, XBlock translation feature was (partially?) broken, so switching to other locale did not **Note:** As of 2016-08-04, XBlock translation feature was (partially?) broken, so switching to other locale did not
cause Drag and Drop v2 to be fully translated - only some strings that happen to exist in edx-platform translation cause Drag and Drop v2 to be fully translated - only some strings that happen to exist in edx-platform translation
files are translated. There's an ongoing effort to fix this problem: https://openedx.atlassian.net/browse/WL-230. files are translated. There's an ongoing effort to fix this problem: https://openedx.atlassian.net/browse/WL-230.
...@@ -535,17 +535,17 @@ i18n-tools. ...@@ -535,17 +535,17 @@ i18n-tools.
To do so, in any virtualenv, install i18n-tools, i.e. To do so, in any virtualenv, install i18n-tools, i.e.
(virtualenv)$ pip install -e git+https://github.com/edx/i18n-tools.git (virtualenv)$ pip install -e git+https://github.com/edx/i18n-tools.git
Then start python interpreter, import `Dummy` translator and follow instructions on `Dummy` docstring: Then start python interpreter, import `Dummy` translator and follow instructions on `Dummy` docstring:
(virtualenv)$ python (virtualenv)$ python
>>> from i18n.dummy import Dummy >>> from i18n.dummy import Dummy
>>> help(Dummy) >>> help(Dummy)
# or just do # or just do
>>> conv = Dummy() >>> conv = Dummy()
>>> print conv.convert("String to translate") >>> print conv.convert("String to translate")
Then copy output and paste it into `translations/eo/LC_MESSAGES/text.po`. Then copy output and paste it into `translations/eo/LC_MESSAGES/text.po`.
Downloading translations from Transifex Downloading translations from Transifex
...@@ -558,3 +558,7 @@ $ tx pull -f --mode=reviewed -l en,ar,es_419,fr,he,hi,ko_KR,pt_BR,ru,zh_CN ...@@ -558,3 +558,7 @@ $ tx pull -f --mode=reviewed -l en,ar,es_419,fr,he,hi,ko_KR,pt_BR,ru,zh_CN
``` ```
[transifex-client]: https://docs.transifex.com/client/installing-the-client [transifex-client]: https://docs.transifex.com/client/installing-the-client
Releasing
-------------------------------------
To release a new version, update .travis.yml and setup.py to point to your new intended version number and create a new release with that version tag via Github.
...@@ -23,7 +23,7 @@ def package_data(pkg, root_list): ...@@ -23,7 +23,7 @@ def package_data(pkg, root_list):
setup( setup(
name='xblock-drag-and-drop-v2', name='xblock-drag-and-drop-v2',
version='2.0.16', version='2.0.17',
description='XBlock - Drag-and-Drop v2', description='XBlock - Drag-and-Drop v2',
packages=['drag_and_drop_v2'], packages=['drag_and_drop_v2'],
install_requires=[ install_requires=[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment