-
-
Save OmarIthawi/3de2704804401a58c01aca1ef5ab3fb5 to your computer and use it in GitHub Desktop.
Testing the i18n-tools --no-segment option
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests for <https://github.com/openedx/i18n-tools/pull/134> | |
tmp $ bash ~/scratches/test-i18n/0-test-xblock-extract.sh | |
Cloning into '/tmp/dnd-test/xblock'... | |
created virtual environment CPython3.8.17.final.0-64 in 52ms | |
INFO:i18n.execute:Executing in . ... | |
INFO:i18n.execute:django-admin makemessages -l en -v0 --ignore="*/css/*" --ignore="public/js/translations/*" --ignore="public/js/vendor/*" -d django | |
INFO:i18n.execute:Executing in . ... | |
INFO:i18n.execute:django-admin makemessages -l en -v0 --ignore="*/css/*" --ignore="public/js/translations/*" --ignore="public/js/vendor/*" -d djangojs -e js,jsx | |
INFO:i18n.extract:Cleaning django-partial.po | |
INFO:i18n.extract:Cleaning djangojs-partial.po | |
INFO:i18n.execute:Executing in /tmp/dnd-test/xblock/drag_and_drop_v2/conf/locale/en/LC_MESSAGES ... | |
INFO:i18n.execute:msgcat django-partial.po djangojs-partial.po -o django-partial.po | |
INFO:i18n.execute:Deleting file conf/locale/en/LC_MESSAGES/djangojs-partial.po | |
INFO:i18n.execute:Deleting file conf/locale/en/LC_MESSAGES/django-saved.po | |
INFO:i18n.execute:Deleting file conf/locale/en/LC_MESSAGES/djangojs-saved.po | |
WARNING:i18n.execute:File does not exist: conf/locale/en/LC_MESSAGES/djangojs-saved.po | |
index cea97d53..00000000 100644 | |
--- a/drag_and_drop_v2/conf/locale/en/LC_MESSAGES/django.po | |
+++ b/drag_and_drop_v2/conf/locale/en/LC_MESSAGES/django.po | |
@@ -1,11 +1,9 @@ | |
msgid "" | |
-msgstr "Project-Id-Version: PACKAGE VERSION\n" | |
-"Report-Msgid-Bugs-To: \n" | |
-"POT-Creation-Date: 2023-05-22 18:16+0300\n" | |
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
-"Language-Team: LANGUAGE <LL@li.org>\n" | |
-"Language: \n" | |
+msgstr "Project-Id-Version: 0.1a\n" | |
+"Report-Msgid-Bugs-To: openedx-translation@googlegroups.com\n" | |
+"Last-Translator: \n" | |
+"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n" | |
+"Language: en\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=UTF-8\n" | |
"Content-Transfer-Encoding: 8bit\n" | |
LTI has some new strings, which is fine in my opinion: | |
index 002468b0..00000000 100644 | |
--- a/lti_consumer/conf/locale/en/LC_MESSAGES/django.po | |
+++ b/lti_consumer/conf/locale/en/LC_MESSAGES/django.po | |
@@ -1,11 +1,9 @@ | |
msgid "" | |
-msgstr "Project-Id-Version: PACKAGE VERSION\n" | |
-"Report-Msgid-Bugs-To: \n" | |
-"POT-Creation-Date: 2023-04-11 15:09-0400\n" | |
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
-"Language-Team: LANGUAGE <LL@li.org>\n" | |
-"Language: \n" | |
+msgstr "Project-Id-Version: 0.1a\n" | |
+"Report-Msgid-Bugs-To: openedx-translation@googlegroups.com\n" | |
+"Last-Translator: \n" | |
+"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n" | |
+"Language: en\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=UTF-8\n" | |
"Content-Transfer-Encoding: 8bit\n" | |
@@ -45,13 +43,28 @@ | |
msgid "Click OK to have your e-mail address sent to a 3rd party application." | |
msgstr "" | |
+msgid "Click OK to have your full name and e-mail address sent to a 3rd " | |
+"party application." | |
+msgstr "" | |
+ | |
+msgid "Click OK to have your full name sent to a 3rd party application." | |
+msgstr "" | |
+ | |
msgid "Click OK to have your username and e-mail address sent to a 3rd party " | |
"application." | |
msgstr "" | |
+msgid "Click OK to have your username and full name sent to a 3rd party " | |
+"application." | |
+msgstr "" | |
+ | |
msgid "Click OK to have your username sent to a 3rd party application." | |
msgstr "" | |
+msgid "Click OK to have your username, full name, and e-mail address sent to " | |
+"a 3rd party application." | |
+msgstr "" | |
+ | |
msgid "Client ID used by LTI tool" | |
msgstr "" | |
@@ -102,6 +115,9 @@ | |
msgid "Custom Parameters must be a list" | |
msgstr "" | |
+msgid "Custom Parameters should be strings in \"x=y\" format." | |
+msgstr "" | |
+ | |
msgid "DEPRECATED - This is now stored in the LtiConfiguration model." | |
msgstr "" | |
@@ -338,9 +354,15 @@ | |
msgid "Request user's email" | |
msgstr "" | |
+msgid "Request user's full name" | |
+msgstr "" | |
+ | |
msgid "Request user's username" | |
msgstr "" | |
+msgid "Return to exam." | |
+msgstr "" | |
+ | |
msgid "Reusable Configuration" | |
msgstr "" | |
@@ -379,6 +401,9 @@ | |
msgid "Select True to request the user's email address." | |
msgstr "" | |
+msgid "Select True to request the user's full name." | |
+msgstr "" | |
+ | |
msgid "Select True to request the user's username." | |
msgstr "" | |
@@ -397,6 +422,9 @@ | |
msgid "Send extra parameters" | |
msgstr "" | |
+msgid "Sending you back to your exam." | |
+msgstr "" | |
+ | |
msgid "Students don't have permissions to perform LTI Deep Linking " | |
"configuration launches." | |
msgstr "" | |
@@ -417,7 +445,11 @@ | |
msgid "The selected content type is not supported by Open edX." | |
msgstr "" | |
-msgid "There was an error while launching the LTI tool." | |
+msgid "The specified LTI ID is not configured in this course's Advanced " | |
+"Settings." | |
+msgstr "" | |
+ | |
+msgid "There was an error while launching the LTI tool: " | |
msgstr "" | |
msgid "There was an error while starting your LTI proctored assessment." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openedx/lms-dev:latest | |
WORKDIR /edx/app/edxapp/edx-platform | |
RUN git init \ | |
&& git remote add origin https://github.com/openedx/edx-platform.git \ | |
&& git fetch --depth=1 origin open-release/palm.master \ | |
&& git checkout --force open-release/palm.master \ | |
&& git add -A \ | |
&& git reset --hard HEAD | |
ADD https://download.gnu.org.ua/pub/releases/podiff/podiff-1.4.tar.gz /tmp/podiff-1.4.tar.gz | |
RUN tar -xzf /tmp/podiff-1.4.tar.gz -C /tmp \ | |
&& cd /tmp/podiff-1.4 \ | |
&& make \ | |
&& make install \ | |
&& chmod +x /usr/bin/podiff | |
RUN git config diff.podiff.command "/usr/bin/podiff -D-u -L" | |
RUN echo "*.po diff=podiff" >> .gitattributes | |
RUN pip install -e git+https://github.com/Zeit-Labs/i18n-tools.git@shadinaif/new-options-for-extract#egg=edx-i18n-tools | |
RUN i18n_tool extract --no-segment -v | |
RUN cd conf/locale/en/LC_MESSAGES/ \ | |
&& msgcat django.po mako.po wiki.po edx_proctoring_proctortrack.po -o django.po \ | |
&& msgcat djangojs.po underscore.po -o djangojs.po |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ei | |
docker build -t test-lms-dev-i18n-tools . | |
docker run -it test-lms-dev-i18n-tools bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ei | |
test-xblock() { | |
XBLOCK_DIR=$1 | |
REPO_NAME=$2 | |
rm -rf /tmp/$XBLOCK_DIR | |
mkdir -p /tmp/$XBLOCK_DIR | |
git clone https://github.com/openedx/$REPO_NAME.git /tmp/$XBLOCK_DIR/xblock | |
cd /tmp/$XBLOCK_DIR/xblock | |
virtualenv --python=python3.8 /tmp/$XBLOCK_DIR/venv | |
source /tmp/$XBLOCK_DIR/venv/bin/activate | |
pip install -r requirements/dev.txt | |
pip install -e git+https://github.com/Zeit-Labs/i18n-tools.git@shadinaif/new-options-for-extract#egg=edx-i18n-tools==1.1.0 | |
bash -e -c 'cd */conf && cd .. && i18n_tool extract --merge-po-files --no-segment' | |
git diff | |
} | |
test-xblock dnd-test xblock-drag-and-drop-v2 | |
test-xblock lti-test xblock-lti-consumer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment