From d170997e48885d24ed7d15f8b57c9b74b65c522c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lionel=20Lask=C3=A9?= Date: Sat, 12 Aug 2023 11:11:59 +0200 Subject: [PATCH] Update i18next migration guide --- docs/i18nmigrationguide/guide_vanillajs.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/i18nmigrationguide/guide_vanillajs.md b/docs/i18nmigrationguide/guide_vanillajs.md index b10b766dd..c7bf564db 100644 --- a/docs/i18nmigrationguide/guide_vanillajs.md +++ b/docs/i18nmigrationguide/guide_vanillajs.md @@ -27,8 +27,11 @@ Brief explanation of methods: - `triggerLocalizedEvent()`: Triggers a custom event named "localized" by creating a new event object and dispatching it on the `window` object. This event can be used by other parts of the application to respond to localization changes. -## Step4: Modify the js/activity.js +## Step4: Modify reference to webl10n in the code Now you need to replace the webl10n code with i18next. + +You should update at least the file js/activity.js but references to webl10n in other js files in the activity should be updated as well. + You can refer to this [code](https://github.com/llaske/sugarizer/pull/1371/files#diff-b2447869bafe96b01d12ef5db78589d5a1aa490d31188e694300e3f674211d7fR3) and spin up a similar instance. ## Step5: Remove webl10n reference from sugarweb