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

feat: standardize make extract_translations #316

Merged
merged 3 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Agrendalath marked this conversation as resolved.
Show resolved Hide resolved
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
Agrendalath marked this conversation as resolved.
Show resolved Hide resolved

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"
1 change: 1 addition & 0 deletions drag_and_drop_v2/conf/locale/en/LC_MESSAGES/text.po
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",
)