Skip to content

Commit

Permalink
feat: standardize make extract_translations (#316)
Browse files Browse the repository at this point in the history
Refs: FC-0012 OEP-58
  • Loading branch information
shadinaif committed Apr 18, 2023
1 parent c0c601f commit a95a9b5
Show file tree
Hide file tree
Showing 52 changed files with 19 additions and 6 deletions.
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Drag and Drop XBlock changelog
==============================

Version 3.1.3 (2023-04-15)
--------------------------

* Prepare repository for upcoming changes related to [openedx-translations](https://github.com/openedx/openedx-translations).
* `conf/locale` directory is now the source of truth for translations.
* `translations` directory is now a symbolic link for backwards compatibility.
* `locale` symbolic link is deleted to avoid too many symbolic links.
* `en` translations are now extracted into `django.po` instead of `text.po`.
* `en` `text.po` is now a symbolic link to `django.po` for backwards compatibility.

Version 3.1.0 (2023-01-31)
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

WORKING_DIR := drag_and_drop_v2
JS_TARGET := $(WORKING_DIR)/public/js/translations
EXTRACT_DIR := $(WORKING_DIR)/translations/en/LC_MESSAGES
EXTRACT_DIR := $(WORKING_DIR)/conf/locale/en/LC_MESSAGES
EXTRACTED_DJANGO := $(EXTRACT_DIR)/django-partial.po
EXTRACTED_DJANGOJS := $(EXTRACT_DIR)/djangojs-partial.po
EXTRACTED_TEXT := $(EXTRACT_DIR)/text.po
EXTRACTED_TEXT := $(EXTRACT_DIR)/django.po

FIREFOX_VERSION := "43.0"

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ Updates to translated strings are supposed to be propagated to `text.po` files.

[edx-i18n-tools]: https://github.com/openedx/i18n-tools

Note: currently `translations` directory is a symbolic link to `conf/locale` directory. Also, 'text.po' file for locale code `en` is a symbolic link to `conf/locale/en/LC_MESSAGES/django.po` file. Both links works as a transition step to fully moving translation files to [openedx-translations](https://github.com/openedx/openedx-translations) repository

Translatable strings
--------------------
```bash
Expand Down
2 changes: 1 addition & 1 deletion drag_and_drop_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Drag and Drop v2 XBlock """
from .drag_and_drop_v2 import DragAndDropBlock

__version__ = "3.1.2"
__version__ = "3.1.3"
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions drag_and_drop_v2/conf/locale/en/LC_MESSAGES/text.po
File renamed without changes.
1 change: 0 additions & 1 deletion drag_and_drop_v2/locale

This file was deleted.

1 change: 1 addition & 0 deletions drag_and_drop_v2/translations
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if __name__ == "__main__":
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
"drag_and_drop_v2.locale.settings"
"drag_and_drop_v2.conf.locale.settings"
)

execute_from_command_line(sys.argv)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ def package_data(pkg, root_list):
'xblock.v1': 'drag-and-drop-v2 = drag_and_drop_v2:DragAndDropBlock',
},
packages=['drag_and_drop_v2'],
package_data=package_data("drag_and_drop_v2", ["static", "templates", "public", "translations", "locale"]),
package_data=package_data("drag_and_drop_v2", ["static", "templates", "public", "translations"]),
python_requires=">=3.8",
)

0 comments on commit a95a9b5

Please sign in to comment.