From 78efeba3d08d74b05f112e0770b373b74040cd27 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Thu, 1 Feb 2024 18:03:08 +0300 Subject: [PATCH] fix: Apply suggestions from code review Co-authored-by: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> --- .../developers/how-tos/enable-translations-new-repo.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/developers/how-tos/enable-translations-new-repo.rst b/source/developers/how-tos/enable-translations-new-repo.rst index 992cf78bd..80d83e607 100644 --- a/source/developers/how-tos/enable-translations-new-repo.rst +++ b/source/developers/how-tos/enable-translations-new-repo.rst @@ -45,9 +45,7 @@ workflow: - Django plugins: ``django.po`` - If the repo uses ``gettext`` and has a ``static`` directory with JavaScript, it may include ``djangojs.po`` -#. If XBlock JavaScript translations is needed, use the ``XBlockI18NService.get_javascript_i18n_catalog_url`` method - similar to the `Drag and Drop XBlock XBlockI18NService js translations pull request`_. This method is available as - of `Open edX Redwood XBlock translations feature`_ and `XBlock==1.9.1 release`_. +#. If you need JavaScript translations in your XBlock, use ``XBlockI18NService.get_javascript_i18n_catalog_url``. You can find an example of this in ``_get_statici18n_js_url`` in ``xblock-drag-and-drop-v2/`` `here `_. Note: this requires `XBlock 1.9.1`_ or newer, and `edx-platform e7fc0c6`_ or newer. #. Add the repository to `extract-translation-source-files.yml`_ in the `openedx-translations repo`_. @@ -264,9 +262,8 @@ After adding a repository to the `openedx-translations repo`_ verify the followi .. _frontend-lib-special-exams testing pull request: https://github.com/Zeit-Labs/openedx-translations/pull/1/files .. _transifex.yml: https://github.com/openedx/openedx-translations/blob/main/transifex.yml .. _Drag and Drop XBlock transifex.yml entry: https://github.com/openedx/openedx-translations/blob/19c0fcbbc334c56022df355fa5b529e5853d30f9/transifex.yml#L253-L259 -.. _Drag and Drop XBlock XBlockI18NService js translations pull request: https://github.com/openedx/xblock-drag-and-drop-v2/pull/365/files#diff-fe829a32b6885a4d3c06b0710a0f38ed86a773e090e269356fcc5c934b42b50fR343-R349 -.. _Open edX Redwood XBlock translations feature: https://github.com/openedx/edx-platform/pull/33698 -.. _XBlock==1.9.1 release: https://github.com/openedx/XBlock/pull/702 +.. _edx-platform e7fc0c6: https://github.com/openedx/edx-platform/commit/e7fc0c6b6f8b44fa4bcc71d00ae2931f91cc664c +.. _XBlock 1.9.1: https://github.com/openedx/XBlock/releases/tag/xblock-1.9.1 .. _edx-platform: https://github.com/openedx/edx-platform .. _credentials: https://github.com/openedx/credentials