feat(desktop): add i18n infrastructure with react-intl (#8105)
This commit is contained in:
+11
-6
@@ -11,12 +11,12 @@
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit",
|
||||
"generate-api": "openapi-ts",
|
||||
"start-gui": "pnpm run generate-api && electron-forge start",
|
||||
"start-gui-debug": "pnpm run generate-api && electron-forge start -- --inspect=9229",
|
||||
"start-gui": "pnpm run generate-api && pnpm run i18n:compile && electron-forge start",
|
||||
"start-gui-debug": "pnpm run generate-api && pnpm run i18n:compile && electron-forge start -- --inspect=9229",
|
||||
"start": "cd ../.. && just run-ui",
|
||||
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
|
||||
"package": "electron-forge package",
|
||||
"make": "electron-forge make",
|
||||
"package": "pnpm run i18n:compile && electron-forge package",
|
||||
"make": "pnpm run i18n:compile && electron-forge make",
|
||||
"bundle:default": "node scripts/prepare-platform-binaries.js && pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
|
||||
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_alpha.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
|
||||
"bundle:intel": "node scripts/prepare-platform-binaries.js && pnpm run make --arch=x64 && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-x64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_intel_mac.zip\")",
|
||||
@@ -28,7 +28,7 @@
|
||||
"test-e2e:report": "playwright show-report",
|
||||
"test-e2e:single": "pnpm run generate-api && playwright test -g",
|
||||
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix --no-warn-ignored",
|
||||
"lint:check": "pnpm run typecheck && eslint \"src/**/*.{ts,tsx}\" --max-warnings 0 --no-warn-ignored",
|
||||
"lint:check": "pnpm run typecheck && eslint \"src/**/*.{ts,tsx}\" --max-warnings 0 --no-warn-ignored && pnpm run i18n:check",
|
||||
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
|
||||
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
|
||||
"test": "vitest",
|
||||
@@ -38,7 +38,10 @@
|
||||
"test:integration": "vitest run --config vitest.integration.config.ts",
|
||||
"test:integration:watch": "vitest --config vitest.integration.config.ts",
|
||||
"test:integration:debug": "DEBUG=1 vitest run --config vitest.integration.config.ts",
|
||||
"start-alpha-gui": "ALPHA=true pnpm run start-gui"
|
||||
"start-alpha-gui": "ALPHA=true pnpm run start-gui",
|
||||
"i18n:extract": "formatjs extract 'src/**/*.{ts,tsx}' --out-file src/i18n/messages/en.json --flatten && pnpm run i18n:compile",
|
||||
"i18n:check": "node scripts/i18n-check.js",
|
||||
"i18n:compile": "node scripts/i18n-compile.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aaif/goose-acp": "workspace:*",
|
||||
@@ -77,6 +80,7 @@
|
||||
"react": "^19.2.4",
|
||||
"react-dom": "^19.2.4",
|
||||
"react-icons": "^5.5.0",
|
||||
"react-intl": "^10.1.0",
|
||||
"react-markdown": "^10.1.0",
|
||||
"react-router-dom": "^7.13.1",
|
||||
"react-select": "^5.10.2",
|
||||
@@ -108,6 +112,7 @@
|
||||
"@electron-forge/plugin-vite": "^7.11.1",
|
||||
"@electron/fuses": "^1.8.0",
|
||||
"@eslint/js": "^9.39.2",
|
||||
"@formatjs/cli": "^6.14.0",
|
||||
"@hey-api/openapi-ts": "^0.93.0",
|
||||
"@modelcontextprotocol/sdk": "^1.27.0",
|
||||
"@playwright/test": "^1.58.2",
|
||||
|
||||
Reference in New Issue
Block a user