Skip to content

Commit 04bd2f4

Browse files
chore: remove intl-imports, transifex-utils, and dead i18n placeholders
- Remove `intl-imports` and `transifex-utils` CLI scripts and their test fixtures — both are superseded by `translations:pull`/`translations:prepare` and the updated extraction pipeline in alpha.16+ - Remove dead per-app i18n placeholder directories (`shell/dev/devHome/i18n/`, `test-site/src/authenticated-page/i18n/`) now that `App.messages` is gone - Update `tools/cli/README.md` and `docs/how_tos/migrate-frontend-app.md` to reflect the new translation workflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 872686c commit 04bd2f4

15 files changed

Lines changed: 24 additions & 644 deletions

File tree

docs/how_tos/migrate-frontend-app.md

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -538,53 +538,32 @@ i18n
538538

539539
Description fields are now required on all i18n messages in the repository. This is because of a change to the ESLint config.
540540

541-
Also, replace the contents of `src/i18n/index.js` with:
541+
Translations are now pulled and prepared using the `openedx translations:pull` CLI command. Add an `atlasTranslations` field to your `package.json` so the command knows where to find your app's translations and which dependencies to resolve transitively:
542542

543+
```json
544+
"atlasTranslations": {
545+
"path": "translations/frontend-app-[YOUR_APP]/src/i18n/messages",
546+
"dependencies": ["@openedx/frontend-base"]
547+
}
543548
```
544-
// Placeholder be overridden by `make pull_translations`
545-
export default {
546-
ar: {},
547-
'zh-hk': {},
548-
'zh-cn': {},
549-
uk: {},
550-
'tr-tr': {},
551-
th: {},
552-
te: {},
553-
ru: {},
554-
'pt-pt': {},
555-
'pt-br': {},
556-
'it-it': {},
557-
id: {},
558-
hi: {},
559-
he: {},
560-
'fr-ca': {},
561-
fa: {},
562-
'es-es': {},
563-
'es-419': {},
564-
el: {},
565-
'de-de': {},
566-
da: {},
567-
bo: {},
568-
};
549+
550+
Also add a `translations:pull` script to your `package.json`:
551+
552+
```json
553+
"scripts": {
554+
"translations:pull": "openedx translations:pull"
555+
}
569556
```
570557

571-
Finally, edit the `Makefile` so that no strings are being pulled from `frontend-component-(header|footer)`, and rename `frontend-platform` to `frontend-base`. Such as:
558+
And update your `pull_translations` Makefile target to use it:
572559

573560
```Makefile
574-
# Pulls translations using atlas.
575-
pull_translations:
576-
mkdir src/i18n/messages
577-
cd src/i18n/messages \
578-
&& atlas pull $(ATLAS_OPTIONS) \
579-
translations/frontend-base/src/i18n/messages:frontend-base \
580-
translations/paragon/src/i18n/messages:paragon \
581-
translations/frontend-app-[YOUR_APP]/src/i18n/messages:frontend-app-[YOUR_APP]
582-
583-
$(intl_imports) frontend-base paragon frontend-app-[YOUR_APP]
584-
```
585-
```
561+
pull_translations: | requirements
562+
npm run translations:pull
586563
```
587564

565+
Running `npm run translations:pull` will pull translations from `openedx-translations` and generate `src/i18n/messages.ts`.
566+
588567
SVGR "ReactComponent" imports have been removed
589568
===============================================
590569

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
"/dist"
1717
],
1818
"bin": {
19-
"intl-imports.js": "./dist/tools/cli/intl-imports.js",
20-
"openedx": "./dist/tools/cli/openedx.js",
21-
"transifex-utils.js": "./dist/tools/cli/transifex-utils.js"
19+
"openedx": "./dist/tools/cli/openedx.js"
2220
},
2321
"atlasTranslations": {
2422
"path": "translations/frontend-base/src/i18n/messages",

shell/dev/devHome/i18n/index.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

test-site/src/authenticated-page/i18n/index.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

test-site/src/i18n/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

test-site/src/i18n/messages/frontend-app-sample/ar.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

test-site/src/i18n/messages/frontend-app-sample/eo.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test-site/src/i18n/messages/frontend-app-sample/es_419.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

test-site/src/i18n/messages/frontend-component-emptylangs/ar.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

test-site/src/i18n/messages/frontend-component-nolangs/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)