a90895e167
**1. Shared Lingui factory in `twenty-shared`**
- Extracted `createI18nInstanceFactory` into
`packages/twenty-shared/src/i18n/create-i18n-instance-factory.ts` so
every package gets the same per-render Lingui bootstrap with a
per-locale singleton cache and a `SOURCE_LOCALE` fallback.
- `twenty-emails/src/utils/i18n.utils.ts` now consumes the shared
factory.
**2. `twenty-website-new` Lingui bootstrap + Crowdin wiring**
- `lingui.config.ts`, `src/lib/i18n/*`, `nx run
twenty-website-new:lingui:{extract,compile}`.
- 31 locale PO files generated; minified compiled output kept out of
Prettier and Oxlint.
- `i18n-{push,pull}.yaml` workflows updated to include
`twenty-website-new` in Crowdin sync.
**3. `app/[locale]/...` segment routing with English at the root**
- All marketing routes moved under `src/app/[locale]/`; static
generation preserved (15 routes × 31 locales = 465 prerendered URLs).
- Middleware behavior:
- `/{en}/...` → 301 redirect to unprefixed canonical.
- `/{non-en}/...` → pass through, set `NEXT_LOCALE` cookie.
### What this PR explicitly does not do (deferred)
- Lingui-wrapping the actual marketing copy. Keys, build pipeline, and
runtime are wired; copy migration is a separate, reviewer-friendlier
PR.
139 lines
3.4 KiB
JSON
139 lines
3.4 KiB
JSON
{
|
|
"name": "twenty-website-new",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "packages/twenty-website-new/src",
|
|
"projectType": "application",
|
|
"tags": ["scope:website"],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": ["production", "^production"],
|
|
"outputs": ["{projectRoot}/.next"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx next build"
|
|
},
|
|
"dependsOn": ["^build"]
|
|
},
|
|
"dev": {
|
|
"executor": "nx:run-commands",
|
|
"cache": false,
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx next dev"
|
|
}
|
|
},
|
|
"start": {
|
|
"executor": "nx:run-commands",
|
|
"cache": false,
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx next start"
|
|
}
|
|
},
|
|
"check-boundaries": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/src/**/*",
|
|
"{projectRoot}/scripts/check-boundaries.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "node scripts/check-boundaries.mjs"
|
|
}
|
|
},
|
|
"check-section-shape": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/src/sections/**/*",
|
|
"{projectRoot}/scripts/check-section-shape.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "node scripts/check-section-shape.mjs"
|
|
}
|
|
},
|
|
"check-lottie-frames": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/public/lottie/stepper/stepper.lottie",
|
|
"{projectRoot}/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.ts",
|
|
"{projectRoot}/scripts/check-lottie-frames.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "node scripts/check-lottie-frames.mjs"
|
|
}
|
|
},
|
|
"lint": {
|
|
"dependsOn": [
|
|
"check-boundaries",
|
|
"check-section-shape",
|
|
"check-lottie-frames",
|
|
"^build",
|
|
"twenty-oxlint-rules:build"
|
|
]
|
|
},
|
|
"lint:diff-with-main": {
|
|
"dependsOn": [
|
|
"check-boundaries",
|
|
"check-section-shape",
|
|
"check-lottie-frames"
|
|
]
|
|
},
|
|
"typecheck": {},
|
|
"test": {
|
|
"executor": "@nx/jest:jest",
|
|
"outputs": ["{projectRoot}/coverage"],
|
|
"options": {
|
|
"jestConfig": "{projectRoot}/jest.config.mjs",
|
|
"silent": true,
|
|
"coverage": true,
|
|
"coverageReporters": ["text-summary"],
|
|
"cacheDirectory": "../../.cache/jest/{projectRoot}"
|
|
},
|
|
"configurations": {
|
|
"ci": {
|
|
"ci": true,
|
|
"maxWorkers": 1
|
|
},
|
|
"coverage": {
|
|
"coverageReporters": ["lcov", "text"]
|
|
},
|
|
"watch": {
|
|
"watch": true
|
|
}
|
|
}
|
|
},
|
|
"fmt": {
|
|
"options": {
|
|
"files": "."
|
|
},
|
|
"configurations": {
|
|
"fix": {}
|
|
}
|
|
},
|
|
"lingui:extract": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "lingui extract --overwrite --clean"
|
|
}
|
|
},
|
|
"lingui:compile": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "lingui compile --typescript"
|
|
}
|
|
}
|
|
}
|
|
}
|