You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,13 @@ instructions, because git commits are used to generate release notes:
19
19
20
20
<!-- scriv-insert-here -->
21
21
22
+
<aid='changelog-18.0.0'></a>
23
+
## v18.0.0 (2024-06-19)
24
+
25
+
- 💥[Feature] Upgrade to Redwood (by @hinakhadim)
26
+
-[Feature] Enable `atlas pull` on all Micro-frontends. (by @omarithawi)
27
+
- 💥[Feature] Use `ATLAS_OPTIONS` for `atlas pull`. This breaks the `i18n-merge.js` custom locale Tutor MFE feature in favor of [OEP-58](https://docs.openedx.org/en/latest/developers/concepts/oep58.html)`atlas pull` options. (by @omarithawi)
Copy file name to clipboardExpand all lines: README.rst
+15-20Lines changed: 15 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,7 @@ Adding new MFEs
130
130
131
131
- As of Tutor v16 (Palm release) it is no longer possible to add new MFEs by creating ``*_MFE_APP`` settings. Instead, users must implement the approach described below.
132
132
- As of Tutor v17 (Quince release) you must make sure that the git URL of your MFE repository ends with ``.git``. Otherwise the plugin build will fail.
133
+
- As of Tutor v18 (Redwood release) all MFEs must provide a ``make pull_translations`` command. Otherwise the plugin build will fail. Providing an empty command is enough to bypass this requirement. See the `Custom translations section <#mfe-custom-translations>`_ for more information.
133
134
134
135
Other MFE developers can take advantage of this plugin to deploy their own MFEs. To declare a new MFE, create a Tutor plugin and add your MFE configuration to the ``tutormfe.hooks.MFE_APPS`` filter. This configuration should include the name, git repository (and optionally: git branch or tag) and development port. For example:
135
136
@@ -163,32 +164,26 @@ To disable an existing MFE, remove the corresponding entry from the ``MFE_APPS``
163
164
mfes.pop("profile")
164
165
return mfes
165
166
166
-
Adding custom translations to your MFEs
167
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168
-
169
-
This plugin makes it possible to change existing and add new translation strings to MFEs. Here is how to do it:
170
-
171
-
1. Identify the ID of the string you would like to translate. For instance, the ID of the "Account Information" string in the account MFE is "account.settings.section.account.information" (see `source <https://github.com/edx/frontend-app-account/blob/1444831833cad4746b9ed14618a499b425ccc907/src/account-settings/AccountSettingsPage.messages.jsx#L34>`__).
172
-
2. Create a folder and i18n file corresponding to your MFE app and language in the Tutor root. This location of this file should be ``/path/to/tutor/env/plugins/mfe/build/mfe/i18n/<app name>/<language code>.json``. For instance, to add French ("fr") translation strings to the account MFE, run::
173
-
174
-
cd "$(tutor config printroot)/env/plugins/mfe/build/mfe/i18n/"
175
-
mkdir account
176
-
touch account/fr.json
167
+
Using custom translations to your MFEs
168
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
177
169
178
-
3. Add your entries to this file in JSON format, where the key is the string ID and the value is the actual string. For instance:
170
+
.. _mfe-custom-translations:
179
171
180
-
.. code-block::json
172
+
During docker image build, this plugin runs ``make pull_translations`` for each Micro-frontend. This
173
+
program is used in the ``Dockerfile`` to pull translations from the `openedx/openedx-translations repository <https://github.com/openedx/openedx-translations>`_ via `openedx-atlas <https://github.com/openedx/openedx-atlas>`_.
181
174
182
-
{
183
-
"account.settings.section.account.information": "Information du compte"
184
-
}
175
+
The ``make pull_translations`` command passes the ``ATLAS_OPTIONS`` environment variable to the ``atlas pull`` command. This allows specifying a custom repository or branch to pull translations from.
185
176
186
-
4. Rebuild the MFE image and restart the MFE with::
177
+
Translations in the MFE plugin as well as other Tutor plugins can be customized with the following configuration
178
+
variables:
187
179
188
-
tutor images build mfe
189
-
tutor local start -d
180
+
- ``ATLAS_REVISION`` (default: ``"main"`` on nightly and ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used)
- ``ATLAS_OPTIONS`` (default: ``""``) Pass additional arguments to ``atlas pull``. Refer to the `atlas documentations <https://github.com/openedx/openedx-atlas>`_ for more information.
190
183
191
-
Your custom translation strings should now appear in your app.
184
+
The
185
+
`Getting and customizing Translations <https://docs.tutor.edly.io/configuration.html#getting-and-customizing-translations>`_
186
+
section in the Tutor configuration documentation explains how to do this.
0 commit comments