Skip to content

Commit 1e9d1de

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 999448f commit 1e9d1de

15 files changed

Lines changed: 26 additions & 646 deletions

File tree

docs/how_tos/migrate-frontend-app.md

Lines changed: 20 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -523,53 +523,32 @@ i18n
523523

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

526-
Also, replace the contents of `src/i18n/index.js` with:
527-
528-
```
529-
// Placeholder be overridden by `make pull_translations`
530-
export default {
531-
ar: {},
532-
'zh-hk': {},
533-
'zh-cn': {},
534-
uk: {},
535-
'tr-tr': {},
536-
th: {},
537-
te: {},
538-
ru: {},
539-
'pt-pt': {},
540-
'pt-br': {},
541-
'it-it': {},
542-
id: {},
543-
hi: {},
544-
he: {},
545-
'fr-ca': {},
546-
fa: {},
547-
'es-es': {},
548-
'es-419': {},
549-
el: {},
550-
'de-de': {},
551-
da: {},
552-
bo: {},
553-
};
554-
```
526+
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:
555527

556-
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:
528+
```json
529+
"atlasTranslations": {
530+
"path": "translations/frontend-app-[YOUR_APP]/src/i18n/messages",
531+
"dependencies": ["@openedx/frontend-base"]
532+
}
533+
```
557534

558-
```Makefile
559-
# Pulls translations using atlas.
560-
pull_translations:
561-
mkdir src/i18n/messages
562-
cd src/i18n/messages \
563-
&& atlas pull $(ATLAS_OPTIONS) \
564-
translations/frontend-base/src/i18n/messages:frontend-base \
565-
translations/paragon/src/i18n/messages:paragon \
566-
translations/frontend-app-[YOUR_APP]/src/i18n/messages:frontend-app-[YOUR_APP]
535+
Also add a `translations:pull` script to your `package.json`:
567536

568-
$(intl_imports) frontend-base paragon frontend-app-[YOUR_APP]
569-
```
537+
```json
538+
"scripts": {
539+
"translations:pull": "openedx translations:pull"
540+
}
570541
```
542+
543+
And update your `pull_translations` Makefile target to use it:
544+
545+
```Makefile
546+
pull_translations: | requirements
547+
npm run translations:pull
571548
```
572549

550+
Running `npm run translations:pull` will pull translations from `openedx-translations` and generate `src/i18n/messages.ts`.
551+
573552
SVGR "ReactComponent" imports have been removed
574553
===============================================
575554

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)