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 XBlockI18NService js translations | FC-0012 #441

Closed
wants to merge 1 commit into from

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Jan 22, 2024

Implement OEP-58 JavaScript translations

Testing

  • Test and share results

Reference

This pull request is part of the FC-0012 project which implements the Translation Infrastructure update OEP-58.

@openedx-webhooks
Copy link

openedx-webhooks commented Jan 22, 2024

Thanks for the pull request, @OmarIthawi! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 22, 2024
@OmarIthawi OmarIthawi changed the title feat: use XBlockI18NService js translations feat: use XBlockI18NService js translations | FC-0012 Jan 22, 2024
@ahmadabuwardeh ahmadabuwardeh force-pushed the feature/delete_transfix branch 2 times, most recently from 16bf96a to 202cff1 Compare January 24, 2024 14:16
@OmarIthawi OmarIthawi marked this pull request as ready for review January 25, 2024 14:32
@OmarIthawi OmarIthawi marked this pull request as draft January 25, 2024 14:34
@ahmadabuwardeh ahmadabuwardeh force-pushed the feature/delete_transfix branch 2 times, most recently from 2c8da86 to b9afb1e Compare January 27, 2024 12:57
@OmarIthawi
Copy link
Member Author

@shadinaif fyi.

@itsjeyd itsjeyd added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Feb 23, 2024
@e0d
Copy link
Contributor

e0d commented Feb 26, 2024

@itsjeyd all the tests have passed, so removing the label.

@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Feb 26, 2024
@itsjeyd
Copy link

itsjeyd commented Feb 27, 2024

Thanks @e0d!

Copy link
Contributor

@shadinaif shadinaif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Omar, please only fix the i18n_js_namespace name

I've tested it with the name fixed and it's working fine. (local tutor 17.0.2). I didn't connect to a real LTI, I just added a console log, and the translation was pulled successfully console.log(gettext('LTI Consumer'))

Screenshot from 2024-02-28 11-58-10

def validate_field_data(self, validation, data):
# Validate custom parameters is a list.
if not isinstance(data.custom_parameters, list):
_ = self.runtime.service(self, "i18n").ugettext
_ = self.runtime.service(self, 'i18n').ugettext
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need

Suggested change
_ = self.runtime.service(self, 'i18n').ugettext
_ = self.runtime.service(self, "i18n").ugettext

@@ -257,6 +258,7 @@ class LtiConsumerXBlock(StudioEditableXBlockMixin, XBlock):
"""

block_settings_key = 'lti_consumer'
i18n_js_namespace = 'LtiI18N'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the make file already uses a name, please change this one

Suggested change
i18n_js_namespace = 'LtiI18N'
i18n_js_namespace = 'XBlockLtiConsumerI18N'

@OmarIthawi OmarIthawi closed this Feb 28, 2024
@openedx-webhooks
Copy link

@OmarIthawi Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

@OmarIthawi
Copy link
Member Author

Thanks @shadinaif. I've closed it. You're right about the minor notes, Ahmed was being onboarded and I just opened the PR for him.

Please re-create the PR with your notes resolved.

@shadinaif
Copy link
Contributor

thank you @OmarIthawi , replaced by this PR #452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants