-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add translations: CLI commands and update runtime i18n integration
#205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4b93d10
1da5b12
60d2953
465820f
a54f366
9951ee5
a9016b1
2e18489
d065386
95099bc
7a661f7
c94ad50
77b7e27
7e398db
3e4b719
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,17 +16,23 @@ | |
| "/dist" | ||
| ], | ||
| "bin": { | ||
| "intl-imports.js": "./dist/tools/cli/intl-imports.js", | ||
| "openedx": "./dist/tools/cli/openedx.js", | ||
| "transifex-utils.js": "./dist/tools/cli/transifex-utils.js" | ||
| "openedx": "./dist/tools/cli/openedx.js" | ||
| }, | ||
| "atlasTranslations": { | ||
| "path": "translations/frontend-base/src/i18n/messages", | ||
| "dependencies": [ | ||
| "@openedx/paragon" | ||
| ] | ||
| }, | ||
| "scripts": { | ||
| "build": "make build", | ||
| "clean": "make clean", | ||
| "dev": "npm run build && node ./dist/tools/cli/openedx.js dev:shell", | ||
| "docs": "jsdoc -c jsdoc.json", | ||
| "lint": "eslint .; npm run lint:tools; npm --prefix ./test-site run lint", | ||
| "lint:fix": "eslint . --fix; npm run lint:fix:tools", | ||
| "lint:tools": "cd ./tools && eslint . && cd ..", | ||
| "lint:fix:tools": "cd ./tools && eslint . --fix && cd ..", | ||
| "pack": "mkdir -p pack && npm pack --silent --pack-destination pack >/dev/null && mv \"$(ls -t pack/*.tgz | head -n 1)\" pack/openedx-frontend-base.tgz", | ||
| "prepack": "npm run build", | ||
| "test": "jest", | ||
|
|
@@ -143,12 +149,12 @@ | |
| "@testing-library/jest-dom": "^6.6.3", | ||
| "@testing-library/react": "^16.3.0", | ||
| "@testing-library/user-event": "^14.6.1", | ||
| "@tsconfig/node20": "^20.1.5", | ||
| "@tsconfig/node24": "^24.0.4", | ||
| "@types/compression": "^1.7.5", | ||
| "@types/jest": "^29.5.14", | ||
| "@types/lodash.camelcase": "^4.3.9", | ||
| "@types/lodash.merge": "^4.6.9", | ||
| "@types/node": "^18.19.43", | ||
| "@types/node": "^24.12.0", | ||
| "@types/react": "^18.3.20", | ||
| "@types/react-dom": "^18.3.6", | ||
| "axios-mock-adapter": "^1.22.0", | ||
|
|
@@ -157,7 +163,7 @@ | |
| "nodemon": "^3.1.4" | ||
| }, | ||
| "peerDependencies": { | ||
| "@openedx/paragon": "^23.4.5", | ||
| "@openedx/paragon": "^23.20.0", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the first version with an |
||
| "@tanstack/react-query": "^5.81.2", | ||
| "react": "^18.3.1", | ||
| "react-dom": "^18.3.1", | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,16 +10,14 @@ import { | |
| subscribe | ||
| } from '../runtime'; | ||
| import { addAppConfigs } from '../runtime/config'; | ||
| import { addAppMessages } from '../runtime/i18n'; | ||
| import messages from './i18n'; | ||
| import messages from 'site.i18n'; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see |
||
| import createRouter from './router/createRouter'; | ||
|
|
||
| subscribe(SITE_READY, async () => { | ||
| const queryClient = new QueryClient(); | ||
| const router = createRouter(); | ||
|
|
||
| addAppConfigs(); | ||
| addAppMessages(); | ||
|
|
||
| const root = createRoot(document.getElementById('root') as HTMLElement); | ||
| root.render( | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export default []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like having
lint:fixaround as a script (especially whenlintis multi-part so appending-- --fixdoesn't "just work"), but I can remove it if we don't want it.