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: use open edx atlas for both superset and aspects for OEP-58 support #905

Closed
OmarIthawi opened this issue Jul 26, 2024 · 4 comments
Closed
Assignees

Comments

@OmarIthawi
Copy link
Member

OmarIthawi commented Jul 26, 2024

Translations are hardcoded in aspects:

---
ar:
'': ''
<div>Filter these results by selecting various options from the filters panel.</div>: <div
style=";text-align:right;direction:rtl">قم بتصفية هذه النتائج عن طريق تحديد خيارات
متنوعة من لوحة المرشحات.</div>
<div>Select a course from the Filters panel to populate these charts.</div>: <div
style=";text-align:right;direction:rtl">حدد دورة تدريبية من لوحة المرشحات لملء
هذه المخططات.</div>
<div>Select a problem from the Filters panel to populate the charts.</div>: <div
style=";text-align:right;direction:rtl">حدد مشكلة من لوحة المرشحات لملء المخططات.</div>
<div>Select a video from the Filters panel to populate these charts.</div>: <div
style=";text-align:right;direction:rtl">حدد مقطع فيديو من لوحة المرشحات لملء هذه
المخططات.</div>
? A count of the number of enrollments and un-enrollments per day. Learners can
enroll and unenroll multiple times, in this chart each individual enrollment and
unenrollment will be counted.
: حساب عدد المسجلين وغير المسجلين في اليوم الواحد. يمكن للمتعلمين التسجيل وإلغاء
التسجيل عدة مرات، وفي هذا المخطط سيتم حساب كل تسجيل وإلغاء تسجيل فردي.
Action: الإجراء
Action Cluster: مجموعة العمل
Action Count: عدد الإجراءات
Action Date: تاريخ الإجراء
Active: فعّال
Active Users Over Time v2: المستخدمون النشطون مع مرور الوقت v2
Active Users Per Organization: المستخدمون النشطون لكل مؤسسة

These translations should be pulled live from the Dockerfile:

COPY ./openedx-assets /app/openedx-assets
COPY ./localization/ /app/localization/

# Dockerfile#L35-L36
 ...
 +pip install openedx-atlas
 ...
+# Pull latest translations directly from superset `master`
+atlas pull --repository apache/superset --revision=master superset/translations:superset/translations
 COPY ./openedx-assets /app/openedx-assets
-COPY ./localization/ /app/localization/
+# Pull latest aspects translations from openedx-tranlsations repository
+atlas pull translations/tutor-contrib-aspects/tutoraspects/templates/aspects/apps/superset/conf/locale:/app/localization/
+# combine the /app/localization/ files into a single `localization/locale.yaml` file in a way Aspects can use

Edit 1: Existing support is partially there inside the Makefile, which should be moved into the Dockerfile instead:

pull_translations: translation-requirements
atlas pull -g $(OPENEDX_ATLAS_ARGS) translations/tutor-contrib-aspects/tutoraspects/*:tutoraspects/templates/
@echo "Translations have been pulled via Atlas."
python tutoraspects/translations/translate.py . compile

On the other hand, update for the superset translations support is completely missing:

$ atlas pull --repository apache/superset
@OmarIthawi
Copy link
Member Author

cc: @Ian2012 @bmtcril @brian-smith-tcril @ehuthmacher

This repository wasn't included in the original OEP-58 / FC-0012 scope. Some Dockerfile changes are needed.

@OmarIthawi OmarIthawi changed the title feat: use open edx atlas for both superset and aspects feat: use open edx atlas for both superset and aspects for OEP-58 support Jul 26, 2024
@bmtcril
Copy link
Contributor

bmtcril commented Jul 26, 2024

Thanks @OmarIthawi ! Just to clarify a few things:

  • Aspects translations are currently pushed to transifex daily using the usual "Extract Translation Source Files" action in openedx-translations and pulled from openedx-translations weekly using the "Pull Translations" action in this repo
  • I 100% agree that it would be better to pull them at image build time to get the freshest possible translations
  • There is some complexity around the localized Superset assets we'd have to confirm but off hand I don't see any reason why this wouldn't work
  • I'm less sure about Superset translations, we don't usually do custom translations for 3rd party systems, would it not be better to submit them upstream rather than effectively forking their translations? Or is the concern the turnaround time for getting the translations back into Aspects?

@OmarIthawi
Copy link
Member Author

Thanks @OmarIthawi ! Just to clarify a few things:

  • Aspects translations are currently pushed to transifex daily using the usual "Extract Translation Source Files" action in openedx-translations and pulled from openedx-translations weekly using the "Pull Translations" action in this repo

Thanks for the clarification. The push part is covered and well done indeed.

  • I 100% agree that it would be better to pull them at image build time to get the freshest possible translations

That's what's missing and it's fairly an achievable task. Understandably, it needs an engineer time.

  • There is some complexity around the localized Superset assets we'd have to confirm but off hand I don't see any reason why this wouldn't work

👍🏼

  • I'm less sure about Superset translations, we don't usually do custom translations for 3rd party systems. would it not be better to submit them upstream rather than effectively forking their translations?

Completely agree. That's the plan and we probably don't want to diverge from that.

Or is the concern the turnaround time for getting the translations back into Aspects?

Yes, that's the goal. Getting the most up to date translation would be very beneficial imo. OEP-58's main benefits is to get the engineers out of the Translations path.

@bmtcril bmtcril self-assigned this Aug 22, 2024
@bmtcril bmtcril moved this to Doing in Data Working Group Aug 22, 2024
@Ian2012
Copy link
Contributor

Ian2012 commented Aug 30, 2024

This has been applied here: #921

@Ian2012 Ian2012 closed this as completed Aug 30, 2024
@github-project-automation github-project-automation bot moved this from Doing to Done in Data Working Group Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants