@@ -475,20 +475,20 @@ $ python run_tests.py tests/integration/
475
475
i18n compatibility
476
476
==================
477
477
478
- According to [ edX docs on XBlock i18n] [ edx-docs-i18n ] , LMS runtime is capable of supporting XBlock i18n and l10n.
479
- To comply with l10n requirements, XBlock is supposed to provide translations in
478
+ According to [ edX docs on XBlock i18n] [ edx-docs-i18n ] , LMS runtime is capable of supporting XBlock i18n and l10n.
479
+ To comply with l10n requirements, XBlock is supposed to provide translations in
480
480
` xblock_package_root/translations/locale_code/LC_MESSAGES/text.po ` folder in GNU Gettext Portable Object file format.
481
481
482
482
[ edx-docs-i18n ] : http://edx.readthedocs.io/projects/xblock-tutorial/en/latest/edx_platform/edx_lms.html#internationalization-support
483
483
484
- Drag and Drop v2 XBlock aims to comply with i18n requirements for Open edX platform, including a stricter set of
484
+ Drag and Drop v2 XBlock aims to comply with i18n requirements for Open edX platform, including a stricter set of
485
485
requirements for ` edx.org ` itself, thus providing the required files. So far only two translations are available:
486
486
487
487
* Default English translation
488
488
* Fake "Esperanto" translation used to test i18n/l10n.
489
489
490
- Updates to translated strings are supposed to be propagated to ` text.po ` files. Unfortunately, the process is mostly
491
- manual. EdX [ i18n_tools] [ edx-i18n-tools ] might be helpful, but they are too tied to edx-platform, so as of Aug 2016
490
+ Updates to translated strings are supposed to be propagated to ` text.po ` files. Unfortunately, the process is mostly
491
+ manual. EdX [ i18n_tools] [ edx-i18n-tools ] might be helpful, but they are too tied to edx-platform, so as of Aug 2016
492
492
do not provide any benefits over manual approach.
493
493
494
494
[ edx-i18n-tools ] : https://github.com/edx/i18n-tools
@@ -510,18 +510,18 @@ Javascript command is a little bit more verbose:
510
510
```
511
511
512
512
Note that both commands generate partial ` messages.po ` file - JS or python only, while ` text.po ` is supposed to contain
513
- all translatable strings. Both commands can be modified to append to * existing* ` messages.po ` file by adding
513
+ all translatable strings. Both commands can be modified to append to * existing* ` messages.po ` file by adding
514
514
` --join-existing ` key.
515
515
516
516
To check if ` text.po ` is correct, one can run ` msgfmt ` to build a ` text.mo ` file:
517
517
518
518
```
519
- ~/xblock-drag-and-drop-v2/drag_and_drop_v2$ msgfmt translations/en/LC_MESSAGES/text.po -o translations/en/LC_MESSAGES/text.mo
519
+ ~/xblock-drag-and-drop-v2/drag_and_drop_v2$ msgfmt translations/en/LC_MESSAGES/text.po -o translations/en/LC_MESSAGES/text.mo
520
520
```
521
521
522
522
If everything is correct, it will silently exit and create ` translations/en/LC_MESSAGES/text.mo ` file.
523
523
524
- ** Note:** As of 2016-08-04, XBlock translation feature was (partially?) broken, so switching to other locale did not
524
+ ** Note:** As of 2016-08-04, XBlock translation feature was (partially?) broken, so switching to other locale did not
525
525
cause Drag and Drop v2 to be fully translated - only some strings that happen to exist in edx-platform translation
526
526
files are translated. There's an ongoing effort to fix this problem: https://openedx.atlassian.net/browse/WL-230 .
527
527
@@ -535,17 +535,17 @@ i18n-tools.
535
535
To do so, in any virtualenv, install i18n-tools, i.e.
536
536
537
537
(virtualenv)$ pip install -e git+https://github.com/edx/i18n-tools.git
538
-
538
+
539
539
Then start python interpreter, import ` Dummy ` translator and follow instructions on ` Dummy ` docstring:
540
-
540
+
541
541
(virtualenv)$ python
542
542
>>> from i18n.dummy import Dummy
543
543
>>> help(Dummy)
544
-
544
+
545
545
# or just do
546
546
>>> conv = Dummy()
547
547
>>> print conv.convert("String to translate")
548
-
548
+
549
549
Then copy output and paste it into ` translations/eo/LC_MESSAGES/text.po ` .
550
550
551
551
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
558
```
559
559
560
560
[ transifex-client ] : https://docs.transifex.com/client/installing-the-client
561
+
562
+ Releasing
563
+ -------------------------------------
564
+ 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.
0 commit comments