The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
[Website] locale-segment routing and shared Lingui factory (#20079)
Abdullah.a90895e167f1
diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yamlindex 6d3cdbf179f..d88ff9e1cae 100644--- a/.github/workflows/i18n-pull.yaml+++ b/.github/workflows/i18n-pull.yaml@@ -58,6 +58,7 @@ jobs:npx nx run twenty-server:lingui:compile --strictnpx nx run twenty-emails:lingui:compile --strictnpx nx run twenty-front:lingui:compile --strict+ npx nx run twenty-website-new:lingui:compile --strictcontinue-on-error: true- name: Stash any changes before pulling translations@@ -115,6 +116,7 @@ jobs:npx nx run twenty-server:lingui:compilenpx nx run twenty-emails:lingui:compilenpx nx run twenty-front:lingui:compile+ npx nx run twenty-website-new:lingui:compilegit statusgit add .if ! git diff --staged --quiet --exit-code; thendiff --git a/.github/workflows/i18n-push.yaml b/.github/workflows/i18n-push.yamlindex 2f7229674de..73d402acbc3 100644--- a/.github/workflows/i18n-push.yaml+++ b/.github/workflows/i18n-push.yaml@@ -41,6 +41,7 @@ jobs:npx nx run twenty-server:lingui:extractnpx nx run twenty-emails:lingui:extractnpx nx run twenty-front:lingui:extract+ npx nx run twenty-website-new:lingui:extract- name: Check and commit extracted filesid: check_extract_changes@@ -60,6 +61,7 @@ jobs:npx nx run twenty-server:lingui:compilenpx nx run twenty-emails:lingui:compilenpx nx run twenty-front:lingui:compile+ npx nx run twenty-website-new:lingui:compile- name: Check and commit compiled filesid: check_compile_changesdiff --git a/packages/twenty-emails/src/utils/i18n.utils.ts b/packages/twenty-emails/src/utils/i18n.utils.tsindex 975652bd533..ccd8d67ded6 100644--- a/packages/twenty-emails/src/utils/i18n.utils.ts+++ b/packages/twenty-emails/src/utils/i18n.utils.ts@@ -1,6 +1,6 @@-import { setupI18n, type I18n, type Messages } from '@lingui/core';+import { type Messages } from '@lingui/core';+import { createI18nInstanceFactory } from 'twenty-shared/i18n';import { type APP_LOCALES } from 'twenty-shared/translations';-import { isDefined } from 'twenty-shared/utils';import { messages as afMessages } from '@/locales/generated/af-ZA';import { messages as arMessages } from '@/locales/generated/ar-SA';import { messages as caMessages } from '@/locales/generated/ca-ES';@@ -67,20 +67,4 @@ const messages: Record<keyof typeof APP_LOCALES, Messages> = {'zh-TW': zhHantMessages,};-const i18nInstancesMap: Partial<Record<keyof typeof APP_LOCALES, I18n>> = {};--export const createI18nInstance = (locale: keyof typeof APP_LOCALES): I18n => {- if (isDefined(i18nInstancesMap[locale])) {- return i18nInstancesMap[locale];- }-- const i18nInstance = setupI18n();- const localeMessages = messages[locale] ?? messages.en;-- i18nInstance.load(locale, localeMessages);- i18nInstance.activate(locale);-- i18nInstancesMap[locale] = i18nInstance;-- return i18nInstance;-};+export const createI18nInstance = createI18nInstanceFactory(messages);diff --git a/packages/twenty-shared/package.json b/packages/twenty-shared/package.jsonindex 9ffa195e1a0..18c8f80c723 100644--- a/packages/twenty-shared/package.json+++ b/packages/twenty-shared/package.json@@ -66,6 +66,11 @@"import": "./dist/database-events.mjs","require": "./dist/database-events.cjs"},+ "./i18n": {+ "types": "./dist/i18n/index.d.ts",+ "import": "./dist/i18n.mjs",+ "require": "./dist/i18n.cjs"+ },"./logic-function": {"types": "./dist/logic-function/index.d.ts","import": "./dist/logic-function.mjs",@@ -118,6 +123,7 @@"application","constants","database-events",+ "i18n","logic-function","metadata","testing",@@ -142,6 +148,9 @@"database-events": ["dist/database-events/index.d.ts"],+ "i18n": [+ "dist/i18n/index.d.ts"+ ],"logic-function": ["dist/logic-function/index.d.ts"],diff --git a/packages/twenty-shared/project.json b/packages/twenty-shared/project.jsonindex 8d7cbf53bfe..9d42cea4dfe 100644--- a/packages/twenty-shared/project.json+++ b/packages/twenty-shared/project.json@@ -20,6 +20,8 @@"{projectRoot}/constants/dist","{projectRoot}/database-events/package.json","{projectRoot}/database-events/dist",+ "{projectRoot}/i18n/package.json",+ "{projectRoot}/i18n/dist","{projectRoot}/logic-function/package.json","{projectRoot}/logic-function/dist","{projectRoot}/metadata/package.json",diff --git a/packages/twenty-shared/src/i18n/create-i18n-instance-factory.ts b/packages/twenty-shared/src/i18n/create-i18n-instance-factory.tsnew file mode 100644index 00000000000..560c9cea193--- /dev/null+++ b/packages/twenty-shared/src/i18n/create-i18n-instance-factory.ts@@ -0,0 +1,29 @@+import { setupI18n, type I18n, type Messages } from '@lingui/core';++import { type AppLocale } from '@/translations/constants/AppLocales';+import { SOURCE_LOCALE } from '@/translations/constants/SourceLocale';++export type LocaleMessagesMap = Partial<Record<AppLocale, Messages>>;++export const createI18nInstanceFactory = (+ messagesByLocale: LocaleMessagesMap,+) => {+ const cache: Partial<Record<AppLocale, I18n>> = {};++ return (locale: AppLocale): I18n => {+ const cached = cache[locale];+ if (cached !== undefined) {+ return cached;+ }++ const fallbackMessages = messagesByLocale[SOURCE_LOCALE] ?? {};+ const localeMessages = messagesByLocale[locale] ?? fallbackMessages;++ const i18n = setupI18n();+ i18n.load(locale, localeMessages);+ i18n.activate(locale);++ cache[locale] = i18n;+ return i18n;+ };+};diff --git a/packages/twenty-shared/src/i18n/index.ts b/packages/twenty-shared/src/i18n/index.tsnew file mode 100644index 00000000000..dba39688367--- /dev/null+++ b/packages/twenty-shared/src/i18n/index.ts@@ -0,0 +1,11 @@+/*+ * _____ _+ *|_ _|_ _____ _ __ | |_ _ _+ * | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file+ * | | \ V V / __/ | | | |_| |_| | Any edits to this will be overridden+ * |_| \_/\_/ \___|_| |_|\__|\__, |+ * |___/+ */++export type { LocaleMessagesMap } from './create-i18n-instance-factory';+export { createI18nInstanceFactory } from './create-i18n-instance-factory';diff --git a/packages/twenty-website-new/.oxlintrc.json b/packages/twenty-website-new/.oxlintrc.jsonindex f366c9222fe..b5af6b99853 100644--- a/packages/twenty-website-new/.oxlintrc.json+++ b/packages/twenty-website-new/.oxlintrc.json@@ -4,7 +4,7 @@"categories": {"correctness": "error"},- "ignorePatterns": ["node_modules"],+ "ignorePatterns": ["node_modules", "src/locales/generated"],"rules": {"func-style": ["error", "declaration", { "allowArrowFunctions": true }],"no-console": "off",diff --git a/packages/twenty-website-new/.prettierignore b/packages/twenty-website-new/.prettierignorenew file mode 100644index 00000000000..23c4124138d--- /dev/null+++ b/packages/twenty-website-new/.prettierignore@@ -0,0 +1 @@+src/locales/generateddiff --git a/packages/twenty-website-new/lingui.config.ts b/packages/twenty-website-new/lingui.config.tsnew file mode 100644index 00000000000..debcc9c7ac9--- /dev/null+++ b/packages/twenty-website-new/lingui.config.ts@@ -0,0 +1,22 @@+import { defineConfig } from '@lingui/conf';+import { formatter } from '@lingui/format-po';+import { APP_LOCALES, SOURCE_LOCALE } from 'twenty-shared/translations';++export default defineConfig({+ sourceLocale: SOURCE_LOCALE,+ locales: Object.values(APP_LOCALES),+ pseudoLocale: 'pseudo-en',+ fallbackLocales: {+ 'pseudo-en': 'en',+ default: SOURCE_LOCALE,+ },+ catalogs: [+ {+ path: '<rootDir>/src/locales/{locale}',+ include: ['src'],+ },+ ],+ catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',+ compileNamespace: 'ts',+ format: formatter({ lineNumbers: false, printLinguiId: true }),+});diff --git a/packages/twenty-website-new/next.config.ts b/packages/twenty-website-new/next.config.tsindex a1fed9ad44a..1ab5ac8f15b 100644--- a/packages/twenty-website-new/next.config.ts+++ b/packages/twenty-website-new/next.config.ts@@ -36,6 +36,19 @@ const nextConfig: LinariaConfig = {configFile: path.resolve(__dirname, 'wyw-in-js.config.cjs'),},reactCompiler: true,+ experimental: {+ swcPlugins: [+ [+ '@lingui/swc-plugin',+ {+ runtimeModules: {+ i18n: ['@lingui/core', 'i18n'],+ trans: ['@lingui/react', 'Trans'],+ },+ },+ ],+ ],+ },async headers() {return [{diff --git a/packages/twenty-website-new/package.json b/packages/twenty-website-new/package.jsonindex 42478f69dd8..af9040eb91e 100644--- a/packages/twenty-website-new/package.json+++ b/packages/twenty-website-new/package.json@@ -15,6 +15,8 @@"@gsap/react": "2.1.2","@linaria/core": "^7.0.0","@linaria/react": "^7.0.1",+ "@lingui/core": "^5.1.2",+ "@lingui/react": "^5.1.2","@lottiefiles/dotlottie-react": "^0.18.10","@react-three/drei": "^10.7.7","@react-three/fiber": "^9.5.0",@@ -31,9 +33,14 @@"sharp": "^0.33.5","stripe": "^20.3.1","three": "^0.183.2",+ "twenty-shared": "workspace:*","zod": "^4.1.11"},"devDependencies": {+ "@lingui/cli": "^5.1.2",+ "@lingui/conf": "5.1.2",+ "@lingui/format-po": "5.1.2",+ "@lingui/swc-plugin": "^5.11.0","@types/node": "^20","@types/react": "^19","@types/react-dom": "^19",diff --git a/packages/twenty-website-new/project.json b/packages/twenty-website-new/project.jsonindex 1b73738b73e..d34b1d76651 100644--- a/packages/twenty-website-new/project.json+++ b/packages/twenty-website-new/project.json@@ -117,6 +117,22 @@"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"+ }}}}diff --git a/packages/twenty-website-new/src/app/(home)/helped.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/helped.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/helped.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/helped.data.tsdiff --git a/packages/twenty-website-new/src/app/(home)/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/hero.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/hero.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/hero.data.tsdiff --git a/packages/twenty-website-new/src/app/(home)/home-stepper.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/home-stepper.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/home-stepper.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/home-stepper.data.tsdiff --git a/packages/twenty-website-new/src/app/(home)/page.tsx b/packages/twenty-website-new/src/app/[locale]/(home)/page.tsxsimilarity index 91%rename from packages/twenty-website-new/src/app/(home)/page.tsxrename to packages/twenty-website-new/src/app/[locale]/(home)/page.tsxindex 7814a5c74fc..38bcdb6b3ef 100644--- a/packages/twenty-website-new/src/app/(home)/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/(home)/page.tsx@@ -1,10 +1,10 @@-import { HELPED_DATA } from '@/app/(home)/helped.data';-import { HERO_DATA } from '@/app/(home)/hero.data';-import { HOME_STEPPER_DATA } from '@/app/(home)/home-stepper.data';-import { PROBLEM_DATA } from '@/app/(home)/problem.data';-import { TESTIMONIALS_DATA } from '@/app/(home)/testimonials.data';-import { THREE_CARDS_FEATURE_DATA } from '@/app/(home)/three-cards-feature.data';-import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/(home)/three-cards-illustration.data';+import { HELPED_DATA } from '@/app/[locale]/(home)/helped.data';+import { HERO_DATA } from '@/app/[locale]/(home)/hero.data';+import { HOME_STEPPER_DATA } from '@/app/[locale]/(home)/home-stepper.data';+import { PROBLEM_DATA } from '@/app/[locale]/(home)/problem.data';+import { TESTIMONIALS_DATA } from '@/app/[locale]/(home)/testimonials.data';+import { THREE_CARDS_FEATURE_DATA } from '@/app/[locale]/(home)/three-cards-feature.data';+import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/[locale]/(home)/three-cards-illustration.data';import { TalkToUsButton } from '@/lib/contact-cal';import { FAQ_DATA } from '@/sections/Faq/data';import { MENU_DATA } from '@/sections/Menu/data';@@ -22,15 +22,18 @@ import { Menu } from '@/sections/Menu/components';import { Problem } from '@/sections/Problem/components';import { Testimonials } from '@/sections/Testimonials/components';import { ThreeCards } from '@/sections/ThreeCards/components';+import { buildLocalizedMetadata } from '@/lib/seo';import { TrustedBy } from '@/sections/TrustedBy/components';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';-import type { Metadata } from 'next';-export const metadata: Metadata = {- alternates: { canonical: '/' },-};+export const generateMetadata = buildLocalizedMetadata({+ path: '/',+ title: 'Twenty | #1 open source CRM',+ description:+ 'The #1 open source CRM for modern teams. Modular, scalable, and built to fit your business.',+});const HOME_TOP_BACKGROUND_COLOR = '#F4F4F4';const PRODUCT_HUNT_LAUNCH_URL =diff --git a/packages/twenty-website-new/src/app/(home)/problem.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/problem.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/problem.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/problem.data.tsdiff --git a/packages/twenty-website-new/src/app/(home)/testimonials.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/testimonials.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/testimonials.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/testimonials.data.tsdiff --git a/packages/twenty-website-new/src/app/(home)/three-cards-feature.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-feature.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/three-cards-feature.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/three-cards-feature.data.tsdiff --git a/packages/twenty-website-new/src/app/(home)/three-cards-illustration.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-illustration.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/(home)/three-cards-illustration.data.tsrename to packages/twenty-website-new/src/app/[locale]/(home)/three-cards-illustration.data.tsdiff --git a/packages/twenty-website-new/src/app/customers/9dots/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsxsimilarity index 96%rename from packages/twenty-website-new/src/app/customers/9dots/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsxindex 93732df179e..55ed77a0d84 100644--- a/packages/twenty-website-new/src/app/customers/9dots/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsx@@ -1,13 +1,12 @@import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/customers/_components/CustomersCaseStudySignoff';+import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { CaseStudy } from '@/sections/CaseStudy/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1733244766159-f58f4184fd38?w=1600&q=80';@@ -99,7 +98,7 @@ const CASE_STUDY: CaseStudyData = {},};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers/9dots',title: CASE_STUDY.meta.title,description: CASE_STUDY.meta.description,diff --git a/packages/twenty-website-new/src/app/customers/_components/CustomersCaseStudySignoff.tsx b/packages/twenty-website-new/src/app/[locale]/customers/_components/CustomersCaseStudySignoff.tsxsimilarity index 100%rename from packages/twenty-website-new/src/app/customers/_components/CustomersCaseStudySignoff.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/_components/CustomersCaseStudySignoff.tsxdiff --git a/packages/twenty-website-new/src/app/customers/act-education/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsxsimilarity index 96%rename from packages/twenty-website-new/src/app/customers/act-education/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsxindex 3e020a6fe63..f97eee69389 100644--- a/packages/twenty-website-new/src/app/customers/act-education/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsx@@ -1,13 +1,12 @@import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/customers/_components/CustomersCaseStudySignoff';+import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { CaseStudy } from '@/sections/CaseStudy/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1687600154329-150952c73169?w=1600&q=80';@@ -99,7 +98,7 @@ const CASE_STUDY: CaseStudyData = {},};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers/act-education',title: CASE_STUDY.meta.title,description: CASE_STUDY.meta.description,diff --git a/packages/twenty-website-new/src/app/customers/alternative-partners/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsxsimilarity index 95%rename from packages/twenty-website-new/src/app/customers/alternative-partners/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsxindex f79c0b87e40..dbc185cb731 100644--- a/packages/twenty-website-new/src/app/customers/alternative-partners/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsx@@ -1,13 +1,12 @@import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/customers/_components/CustomersCaseStudySignoff';+import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { CaseStudy } from '@/sections/CaseStudy/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1702047149248-a6049168d2a8?w=1600&q=80';@@ -73,7 +72,7 @@ const CASE_STUDY: CaseStudyData = {},};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers/alternative-partners',title: CASE_STUDY.meta.title,description: CASE_STUDY.meta.description,diff --git a/packages/twenty-website-new/src/app/customers/elevate-consulting/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsxsimilarity index 97%rename from packages/twenty-website-new/src/app/customers/elevate-consulting/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsxindex b3fd65cd9a3..6b5499cdc11 100644--- a/packages/twenty-website-new/src/app/customers/elevate-consulting/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsx@@ -1,13 +1,12 @@import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/customers/_components/CustomersCaseStudySignoff';+import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { CaseStudy } from '@/sections/CaseStudy/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1758873269035-aae0e1fd3422?w=1600&q=80';@@ -113,7 +112,7 @@ const CASE_STUDY: CaseStudyData = {},};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers/elevate-consulting',title: CASE_STUDY.meta.title,description: CASE_STUDY.meta.description,diff --git a/packages/twenty-website-new/src/app/customers/netzero/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsxsimilarity index 96%rename from packages/twenty-website-new/src/app/customers/netzero/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsxindex 0bd7aafad4b..f25f3903ac4 100644--- a/packages/twenty-website-new/src/app/customers/netzero/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsx@@ -1,13 +1,12 @@import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/customers/_components/CustomersCaseStudySignoff';+import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { CaseStudy } from '@/sections/CaseStudy/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1744830343976-ce690ba2a67c?w=1600&q=80';@@ -103,7 +102,7 @@ const CASE_STUDY: CaseStudyData = {},};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers/netzero',title: CASE_STUDY.meta.title,description: CASE_STUDY.meta.description,diff --git a/packages/twenty-website-new/src/app/customers/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/page.tsxsimilarity index 97%rename from packages/twenty-website-new/src/app/customers/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/page.tsxindex 0a176f1340c..98ee905a50b 100644--- a/packages/twenty-website-new/src/app/customers/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/page.tsx@@ -14,11 +14,10 @@ import { Menu } from '@/sections/Menu/components';import { Signoff } from '@/sections/Signoff/components';import { TrustedBy } from '@/sections/TrustedBy/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';+import { buildLocalizedMetadata } from '@/lib/seo';import { css } from '@linaria/core';-import type { Metadata } from 'next';-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers',title: 'Customers | Twenty',description:diff --git a/packages/twenty-website-new/src/app/customers/w3villa/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsxsimilarity index 96%rename from packages/twenty-website-new/src/app/customers/w3villa/page.tsxrename to packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsxindex 90ac376afa0..eff21a97ba0 100644--- a/packages/twenty-website-new/src/app/customers/w3villa/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsx@@ -1,13 +1,12 @@import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/customers/_components/CustomersCaseStudySignoff';+import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { CaseStudy } from '@/sections/CaseStudy/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1756830231350-3b501f63c5c1?w=1600&q=80';@@ -100,7 +99,7 @@ const CASE_STUDY: CaseStudyData = {},};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/customers/w3villa',title: CASE_STUDY.meta.title,description: CASE_STUDY.meta.description,diff --git a/packages/twenty-website-new/src/app/enterprise/activate/EnterpriseActivateClient.tsx b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/EnterpriseActivateClient.tsxsimilarity index 100%rename from packages/twenty-website-new/src/app/enterprise/activate/EnterpriseActivateClient.tsxrename to packages/twenty-website-new/src/app/[locale]/enterprise/activate/EnterpriseActivateClient.tsxdiff --git a/packages/twenty-website-new/src/app/enterprise/activate/page.tsx b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsxsimilarity index 92%rename from packages/twenty-website-new/src/app/enterprise/activate/page.tsxrename to packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsxindex 7c2f5e031e7..299932ff165 100644--- a/packages/twenty-website-new/src/app/enterprise/activate/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsx@@ -1,5 +1,5 @@import { MENU_DATA } from '@/sections/Menu/data';-import { EnterpriseActivateClient } from '@/app/enterprise/activate/EnterpriseActivateClient';+import { EnterpriseActivateClient } from '@/app/[locale]/enterprise/activate/EnterpriseActivateClient';import { Body, Container, Eyebrow } from '@/design-system/components';import type { HeadingType } from '@/design-system/components/Heading';import { Pages } from '@/lib/pages';@@ -8,12 +8,11 @@ import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels'import { Hero } from '@/sections/Hero/components';import { Menu } from '@/sections/Menu/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';import { Suspense } from 'react';import { styled } from '@linaria/react';-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/enterprise/activate',title: 'Enterprise activation | Twenty',description:diff --git a/packages/twenty-website-new/src/app/halftone/_components/ControlsPanel.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsxsimilarity index 98%rename from packages/twenty-website-new/src/app/halftone/_components/ControlsPanel.tsxrename to packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsxindex c3d3d9230fd..223715f7175 100644--- a/packages/twenty-website-new/src/app/halftone/_components/ControlsPanel.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsx@@ -1,6 +1,6 @@'use client';-import type { ReactExportSettings } from '@/app/halftone/_lib/exporters';+import type { ReactExportSettings } from '@/app/[locale]/halftone/_lib/exporters';import { IconLayoutSidebarRightCollapse, IconShare } from '@tabler/icons-react';import { styled } from '@linaria/react';import type {diff --git a/packages/twenty-website-new/src/app/halftone/_components/HalftoneStudio.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsxsimilarity index 99%rename from packages/twenty-website-new/src/app/halftone/_components/HalftoneStudio.tsxrename to packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsxindex 4a93ba086c0..fe4b9433b0c 100644--- a/packages/twenty-website-new/src/app/halftone/_components/HalftoneStudio.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsx@@ -1,6 +1,6 @@'use client';-import { ControlsPanel } from '@/app/halftone/_components/ControlsPanel';+import { ControlsPanel } from '@/app/[locale]/halftone/_components/ControlsPanel';import {DEFAULT_REACT_EXPORT_SETTINGS,deriveExportComponentName,@@ -9,14 +9,14 @@ import {getExportedModelFile,parseExportedPreset,type ReactExportSettings,-} from '@/app/halftone/_lib/exporters';-import { resolveExportArtifactNames } from '@/app/halftone/_lib/exportNames';-import { generateImageHalftoneSvg } from '@/app/halftone/_lib/imageSvgExport';+} from '@/app/[locale]/halftone/_lib/exporters';+import { resolveExportArtifactNames } from '@/app/[locale]/halftone/_lib/exportNames';+import { generateImageHalftoneSvg } from '@/app/[locale]/halftone/_lib/imageSvgExport';import {buildShareUrl,decodeShareState,encodeShareState,-} from '@/app/halftone/_lib/share';+} from '@/app/[locale]/halftone/_lib/share';import {HalftoneCanvas,type HalftoneSnapshotFn,@@ -39,9 +39,9 @@ import {normalizeHalftoneStudioSettings,} from '@/lib/halftone/state';import { Logo as LogoIcon } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';import { theme } from '@/theme';import { styled } from '@linaria/react';-import Link from 'next/link';import {useCallback,useEffect,@@ -89,7 +89,7 @@ const CanvasLayer = styled.div`width: 100%;`;-const LogoLink = styled(Link)`+const LogoLink = styled(LocalizedLink)`display: grid;left: 24px;position: absolute;diff --git a/packages/twenty-website-new/src/app/halftone/_components/controls/AnimationsTab.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsxsimilarity index 99%rename from packages/twenty-website-new/src/app/halftone/_components/controls/AnimationsTab.tsxrename to packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsxindex e158cda298f..e1e281122ad 100644--- a/packages/twenty-website-new/src/app/halftone/_components/controls/AnimationsTab.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsx@@ -4,7 +4,7 @@ import {formatAngle,formatDecimal,formatPercent,-} from '@/app/halftone/_lib/formatters';+} from '@/app/[locale]/halftone/_lib/formatters';import type { HalftoneStudioSettings } from '@/lib/halftone/state';import {ColorControlLabel,diff --git a/packages/twenty-website-new/src/app/halftone/_components/controls/DesignTab.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsxsimilarity index 99%rename from packages/twenty-website-new/src/app/halftone/_components/controls/DesignTab.tsxrename to packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsxindex 7b873370cda..cd11a060ec0 100644--- a/packages/twenty-website-new/src/app/halftone/_components/controls/DesignTab.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsx@@ -1,6 +1,9 @@'use client';-import { formatAngle, formatDecimal } from '@/app/halftone/_lib/formatters';+import {+ formatAngle,+ formatDecimal,+} from '@/app/[locale]/halftone/_lib/formatters';import {DEFAULT_GLASS_ANIMATION_SETTINGS,DEFAULT_GLASS_LIGHTING_SETTINGS,diff --git a/packages/twenty-website-new/src/app/halftone/_components/controls/ExportTab.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsxsimilarity index 98%rename from packages/twenty-website-new/src/app/halftone/_components/controls/ExportTab.tsxrename to packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsxindex 43074066a89..d35b66ffa8a 100644--- a/packages/twenty-website-new/src/app/halftone/_components/controls/ExportTab.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsx@@ -1,8 +1,8 @@'use client';-import type { ReactExportSettings } from '@/app/halftone/_lib/exporters';-import { resolveExportArtifactNames } from '@/app/halftone/_lib/exportNames';-import { formatAnimationName } from '@/app/halftone/_lib/formatters';+import type { ReactExportSettings } from '@/app/[locale]/halftone/_lib/exporters';+import { resolveExportArtifactNames } from '@/app/[locale]/halftone/_lib/exportNames';+import { formatAnimationName } from '@/app/[locale]/halftone/_lib/formatters';import type {HalftoneGeometrySpec,HalftoneStudioSettings,diff --git a/packages/twenty-website-new/src/app/halftone/_components/controls/controls-ui.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.tsxsimilarity index 100%rename from packages/twenty-website-new/src/app/halftone/_components/controls/controls-ui.tsxrename to packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.tsxdiff --git a/packages/twenty-website-new/src/app/halftone/_lib/exportNames.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exportNames.tssimilarity index 100%rename from packages/twenty-website-new/src/app/halftone/_lib/exportNames.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/exportNames.tsdiff --git a/packages/twenty-website-new/src/app/halftone/_lib/exporters.test.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.test.tssimilarity index 98%rename from packages/twenty-website-new/src/app/halftone/_lib/exporters.test.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.test.tsindex 32f97f61f1e..0003e1e3dba 100644--- a/packages/twenty-website-new/src/app/halftone/_lib/exporters.test.ts+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.test.ts@@ -3,8 +3,8 @@ import {generateStandaloneHtml,parseExportedPreset,type ReactExportSettings,-} from '@/app/halftone/_lib/exporters';-import { resolveExportArtifactNames } from '@/app/halftone/_lib/exportNames';+} from '@/app/[locale]/halftone/_lib/exporters';+import { resolveExportArtifactNames } from '@/app/[locale]/halftone/_lib/exportNames';import { REFERENCE_PREVIEW_DISTANCE } from '@/lib/halftone/footprint';import {DEFAULT_HALFTONE_SETTINGS,diff --git a/packages/twenty-website-new/src/app/halftone/_lib/exporters.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.tssimilarity index 99%rename from packages/twenty-website-new/src/app/halftone/_lib/exporters.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.tsindex 3419084c552..1dd512a2529 100644--- a/packages/twenty-website-new/src/app/halftone/_lib/exporters.ts+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.ts@@ -1,5 +1,5 @@-import { normalizeExportComponentName } from '@/app/halftone/_lib/exportNames';-import { GLASS_ENVIRONMENT_DATA_URL } from '@/app/halftone/_lib/glassEnvironmentData';+import { normalizeExportComponentName } from '@/app/[locale]/halftone/_lib/exportNames';+import { GLASS_ENVIRONMENT_DATA_URL } from '@/app/[locale]/halftone/_lib/glassEnvironmentData';import {HALFTONE_FOOTPRINT_RUNTIME_SOURCE,REFERENCE_PREVIEW_DISTANCE,diff --git a/packages/twenty-website-new/src/app/halftone/_lib/formatters.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/formatters.tssimilarity index 100%rename from packages/twenty-website-new/src/app/halftone/_lib/formatters.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/formatters.tsdiff --git a/packages/twenty-website-new/src/app/halftone/_lib/glassEnvironmentData.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/glassEnvironmentData.tssimilarity index 100%rename from packages/twenty-website-new/src/app/halftone/_lib/glassEnvironmentData.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/glassEnvironmentData.tsdiff --git a/packages/twenty-website-new/src/app/halftone/_lib/imageSvgExport.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/imageSvgExport.tssimilarity index 100%rename from packages/twenty-website-new/src/app/halftone/_lib/imageSvgExport.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/imageSvgExport.tsdiff --git a/packages/twenty-website-new/src/app/halftone/_lib/share.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/share.tssimilarity index 100%rename from packages/twenty-website-new/src/app/halftone/_lib/share.tsrename to packages/twenty-website-new/src/app/[locale]/halftone/_lib/share.tsdiff --git a/packages/twenty-website-new/src/app/[locale]/halftone/page.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/page.tsxnew file mode 100644index 00000000000..efdcf19690c--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/page.tsx@@ -0,0 +1,12 @@+import { HalftoneStudio } from '@/app/[locale]/halftone/_components/HalftoneStudio';+import { buildLocalizedMetadata } from '@/lib/seo';++export const generateMetadata = buildLocalizedMetadata({+ path: '/halftone',+ title: 'Halftone Generator | Twenty',+ description: 'Interactive halftone generator exported from Twenty.',+});++export default function HalftonePage() {+ return <HalftoneStudio />;+}diff --git a/packages/twenty-website-new/src/app/layout.tsx b/packages/twenty-website-new/src/app/[locale]/layout.tsxsimilarity index 67%rename from packages/twenty-website-new/src/app/layout.tsxrename to packages/twenty-website-new/src/app/[locale]/layout.tsxindex 9a6bf9c1573..5fddedb5759 100644--- a/packages/twenty-website-new/src/app/layout.tsx+++ b/packages/twenty-website-new/src/app/[locale]/layout.tsx@@ -1,17 +1,25 @@-import { FooterVisibilityGate } from '@/app/_components/FooterVisibilityGate';-import { ScrollToTopOnRouteChange } from '@/app/_components/ScrollToTopOnRouteChange';-import { FOOTER_DATA } from '@/sections/Footer/data';-import { ContactCalModalRoot } from '@/lib/contact-cal';-import { PartnerApplicationModalRoot } from '@/lib/partner-application';import { getSiteUrl } from '@/lib/seo';import { DRACO_DECODER_ORIGIN } from '@/lib/visual-runtime/draco-decoder-path';-import { Footer } from '@/sections/Footer/components';import { theme } from '@/theme';import { cssVariables } from '@/theme/css-variables';import { css } from '@linaria/core';import { styled } from '@linaria/react';import type { Metadata } from 'next';import { Aleo, Azeret_Mono, Host_Grotesk, VT323 } from 'next/font/google';+import { type ReactNode } from 'react';++import { FooterVisibilityGate } from '@/app/_components/FooterVisibilityGate';+import { ScrollToTopOnRouteChange } from '@/app/_components/ScrollToTopOnRouteChange';+import { ContactCalModalRoot } from '@/lib/contact-cal';+import {+ I18nProvider,+ PUBLIC_APP_LOCALE_LIST,+ getLocaleMessages,+ resolveLocaleParam,+} from '@/lib/i18n';+import { PartnerApplicationModalRoot } from '@/lib/partner-application';+import { Footer } from '@/sections/Footer/components';+import { FOOTER_DATA } from '@/sections/Footer/data';const hostGrotesk = Host_Grotesk({subsets: ['latin'],@@ -59,9 +67,6 @@ const _globalStyles = css`display: flex;font-family: ${theme.font.family.sans};flex-direction: column;- /* dvh keeps the footer pinned to the visible viewport bottom on mobile- * Safari (where 100vh = large viewport with chrome hidden, leaving a- * gap when the URL bar is showing). vh fallback for older browsers. */min-height: 100vh;min-height: 100dvh;-webkit-font-smoothing: antialiased;@@ -70,6 +75,8 @@ const _globalStyles = css``;const StyledMain = styled.main`+ display: flex;+ flex-direction: column;flex-grow: 1;`;@@ -101,17 +108,27 @@ export const metadata: Metadata = {},};-export default function RootLayout({+type LocaleLayoutParams = { locale: string };++export const dynamicParams = false;++export const generateStaticParams = (): LocaleLayoutParams[] =>+ PUBLIC_APP_LOCALE_LIST.map((locale) => ({ locale }));++const LocaleLayout = async ({children,-}: Readonly<{ children: React.ReactNode }>) {+ params,+}: {+ children: ReactNode;+ params: Promise<LocaleLayoutParams>;+}) => {+ const { locale: rawLocale } = await params;+ const locale = resolveLocaleParam(rawLocale);+ const messages = getLocaleMessages(locale);+return (- <html lang="en">+ <html lang={locale}><head>- {/*- * Warm up the connection to the DRACO decoder host so the first 3D- * model on the page does not pay the full TLS handshake cost the- * moment it starts decoding.- */}<linkcrossOrigin="anonymous"href={DRACO_DECODER_ORIGIN}@@ -122,23 +139,27 @@ export default function RootLayout({className={`${cssVariables} ${hostGrotesk.variable} ${aleo.variable} ${azeretMono.variable} ${vt323.variable}`}suppressHydrationWarning>- <ContactCalModalRoot>- <PartnerApplicationModalRoot>- <ScrollToTopOnRouteChange />- <StyledMain>{children}</StyledMain>- <FooterVisibilityGate>- <Footer.Root>- <Footer.Logo />- <Footer.Nav groups={FOOTER_DATA.navGroups} />- <Footer.Bottom- copyright={FOOTER_DATA.bottom.copyright}- links={FOOTER_DATA.socialLinks}- />- </Footer.Root>- </FooterVisibilityGate>- </PartnerApplicationModalRoot>- </ContactCalModalRoot>+ <I18nProvider locale={locale} messages={messages}>+ <ContactCalModalRoot>+ <PartnerApplicationModalRoot>+ <ScrollToTopOnRouteChange />+ <StyledMain>{children}</StyledMain>+ <FooterVisibilityGate>+ <Footer.Root>+ <Footer.Logo />+ <Footer.Nav groups={FOOTER_DATA.navGroups} />+ <Footer.Bottom+ copyright={FOOTER_DATA.bottom.copyright}+ links={FOOTER_DATA.socialLinks}+ />+ </Footer.Root>+ </FooterVisibilityGate>+ </PartnerApplicationModalRoot>+ </ContactCalModalRoot>+ </I18nProvider></body></html>);-}+};++export default LocaleLayout;diff --git a/packages/twenty-website-new/src/app/partners/components/PartnerApplication/BecomePartnerButton.tsx b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/BecomePartnerButton.tsxsimilarity index 100%rename from packages/twenty-website-new/src/app/partners/components/PartnerApplication/BecomePartnerButton.tsxrename to packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/BecomePartnerButton.tsxdiff --git a/packages/twenty-website-new/src/app/partners/components/PartnerApplication/PartnerHeroCtas.tsx b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerHeroCtas.tsxsimilarity index 100%rename from packages/twenty-website-new/src/app/partners/components/PartnerApplication/PartnerHeroCtas.tsxrename to packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerHeroCtas.tsxdiff --git a/packages/twenty-website-new/src/app/partners/components/PartnerApplication/PartnerSignoffCtas.tsx b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerSignoffCtas.tsxsimilarity index 100%rename from packages/twenty-website-new/src/app/partners/components/PartnerApplication/PartnerSignoffCtas.tsxrename to packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerSignoffCtas.tsxdiff --git a/packages/twenty-website-new/src/app/partners/components/PartnerApplication/index.ts b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/index.tssimilarity index 100%rename from packages/twenty-website-new/src/app/partners/components/PartnerApplication/index.tsrename to packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/index.tsdiff --git a/packages/twenty-website-new/src/app/partners/engagement-band.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/engagement-band.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/partners/engagement-band.data.tsrename to packages/twenty-website-new/src/app/[locale]/partners/engagement-band.data.tsdiff --git a/packages/twenty-website-new/src/app/partners/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/hero.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/partners/hero.data.tsrename to packages/twenty-website-new/src/app/[locale]/partners/hero.data.tsdiff --git a/packages/twenty-website-new/src/app/partners/page.tsx b/packages/twenty-website-new/src/app/[locale]/partners/page.tsxsimilarity index 92%rename from packages/twenty-website-new/src/app/partners/page.tsxrename to packages/twenty-website-new/src/app/[locale]/partners/page.tsxindex a1e6a484a74..b4dd6590d5d 100644--- a/packages/twenty-website-new/src/app/partners/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/partners/page.tsx@@ -3,14 +3,14 @@ import { MENU_DATA } from '@/sections/Menu/data';import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';import { TalkToUsButton } from '@/lib/contact-cal';import { CASE_STUDY_CATALOG_ENTRIES } from '@/lib/customers';-import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/partners/three-cards-illustration.data';-import { HERO_DATA } from '@/app/partners/hero.data';-import { SIGNOFF_DATA } from '@/app/partners/signoff.data';-import { TESTIMONIALS_DATA } from '@/app/partners/testimonials.data';+import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/[locale]/partners/three-cards-illustration.data';+import { HERO_DATA } from '@/app/[locale]/partners/hero.data';+import { SIGNOFF_DATA } from '@/app/[locale]/partners/signoff.data';+import { TESTIMONIALS_DATA } from '@/app/[locale]/partners/testimonials.data';import {PartnerHeroCtas,PartnerSignoffCtas,-} from '@/app/partners/components/PartnerApplication';+} from '@/app/[locale]/partners/components/PartnerApplication';import { Body, Eyebrow, Heading, LinkButton } from '@/design-system/components';import { Pages } from '@/lib/pages';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';@@ -25,9 +25,8 @@ import { ThreeCards } from '@/sections/ThreeCards/components';import { TrustedBy } from '@/sections/TrustedBy/components';import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';+import { buildLocalizedMetadata } from '@/lib/seo';import { styled } from '@linaria/react';-import type { Metadata } from 'next';const PARTNER_ILLUSTRATION_CARDS_SCROLL_LAYOUT_OPTIONS: ThreeCardsScrollLayoutOptions ={@@ -46,7 +45,7 @@ const PromoSpacing = styled.div`}`;-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/partners',title: 'Partners | Twenty',description:diff --git a/packages/twenty-website-new/src/app/partners/signoff.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/signoff.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/partners/signoff.data.tsrename to packages/twenty-website-new/src/app/[locale]/partners/signoff.data.tsdiff --git a/packages/twenty-website-new/src/app/partners/testimonials.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/testimonials.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/partners/testimonials.data.tsrename to packages/twenty-website-new/src/app/[locale]/partners/testimonials.data.tsdiff --git a/packages/twenty-website-new/src/app/partners/three-cards-illustration.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/three-cards-illustration.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/partners/three-cards-illustration.data.tsrename to packages/twenty-website-new/src/app/[locale]/partners/three-cards-illustration.data.tsdiff --git a/packages/twenty-website-new/src/app/pricing/engagement-band.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/engagement-band.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/pricing/engagement-band.data.tsrename to packages/twenty-website-new/src/app/[locale]/pricing/engagement-band.data.tsdiff --git a/packages/twenty-website-new/src/app/pricing/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/hero.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/pricing/hero.data.tsrename to packages/twenty-website-new/src/app/[locale]/pricing/hero.data.tsdiff --git a/packages/twenty-website-new/src/app/pricing/page.tsx b/packages/twenty-website-new/src/app/[locale]/pricing/page.tsxsimilarity index 90%rename from packages/twenty-website-new/src/app/pricing/page.tsxrename to packages/twenty-website-new/src/app/[locale]/pricing/page.tsxindex 868337e1a0a..6b53568fbdc 100644--- a/packages/twenty-website-new/src/app/pricing/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/pricing/page.tsx@@ -1,11 +1,11 @@import { FAQ_DATA } from '@/sections/Faq/data';import { MENU_DATA } from '@/sections/Menu/data';import { TalkToUsButton } from '@/lib/contact-cal';-import { BecomePartnerButton } from '@/app/partners/components/PartnerApplication';-import { ENGAGEMENT_BAND_DATA } from '@/app/pricing/engagement-band.data';-import { HERO_DATA } from '@/app/pricing/hero.data';-import { PLAN_TABLE_DATA } from '@/app/pricing/plan-table.data';-import { SALESFORCE_DATA } from '@/app/pricing/salesforce.data';+import { BecomePartnerButton } from '@/app/[locale]/partners/components/PartnerApplication';+import { ENGAGEMENT_BAND_DATA } from '@/app/[locale]/pricing/engagement-band.data';+import { HERO_DATA } from '@/app/[locale]/pricing/hero.data';+import { PLAN_TABLE_DATA } from '@/app/[locale]/pricing/plan-table.data';+import { SALESFORCE_DATA } from '@/app/[locale]/pricing/salesforce.data';import { Eyebrow, LinkButton } from '@/design-system/components';import { Pages } from '@/lib/pages';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';@@ -19,9 +19,8 @@ import { PricingStateProvider } from '@/sections/Plans/context/PricingStateConteimport { PlanTable } from '@/sections/PlanTable/components';import { Salesforce } from '@/sections/Salesforce/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';+import { buildLocalizedMetadata } from '@/lib/seo';import { styled } from '@linaria/react';-import type { Metadata } from 'next';const PricingPlansContainer = styled.div`display: grid;@@ -35,7 +34,7 @@ const PricingBannerContainer = styled.div`width: 100%;`;-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/pricing',title: 'Pricing | Twenty',description:diff --git a/packages/twenty-website-new/src/app/pricing/plan-table.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/plan-table.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/pricing/plan-table.data.tsrename to packages/twenty-website-new/src/app/[locale]/pricing/plan-table.data.tsdiff --git a/packages/twenty-website-new/src/app/pricing/salesforce.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/salesforce.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/pricing/salesforce.data.tsrename to packages/twenty-website-new/src/app/[locale]/pricing/salesforce.data.tsdiff --git a/packages/twenty-website-new/src/app/privacy-policy/_components/PrivacyPolicyDocument.tsx b/packages/twenty-website-new/src/app/[locale]/privacy-policy/_components/PrivacyPolicyDocument.tsxsimilarity index 99%rename from packages/twenty-website-new/src/app/privacy-policy/_components/PrivacyPolicyDocument.tsxrename to packages/twenty-website-new/src/app/[locale]/privacy-policy/_components/PrivacyPolicyDocument.tsxindex 3ee3b042fb4..010fb2a4ab2 100644--- a/packages/twenty-website-new/src/app/privacy-policy/_components/PrivacyPolicyDocument.tsx+++ b/packages/twenty-website-new/src/app/[locale]/privacy-policy/_components/PrivacyPolicyDocument.tsx@@ -1,4 +1,4 @@-import Link from 'next/link';+import { LocalizedLink } from '@/lib/i18n';export function PrivacyPolicyDocument() {return (@@ -56,7 +56,7 @@ export function PrivacyPolicyDocument() {{'By using the Service, you agree to the collection and use of information in accordance with this Privacy Policy and our '}- <Link href={'/terms'}>{'Terms of Service'}</Link>+ <LocalizedLink href={'/terms'}>{'Terms of Service'}</LocalizedLink>{'.'}</p>diff --git a/packages/twenty-website-new/src/app/privacy-policy/_components/index.ts b/packages/twenty-website-new/src/app/[locale]/privacy-policy/_components/index.tssimilarity index 100%rename from packages/twenty-website-new/src/app/privacy-policy/_components/index.tsrename to packages/twenty-website-new/src/app/[locale]/privacy-policy/_components/index.tsdiff --git a/packages/twenty-website-new/src/app/privacy-policy/page.tsx b/packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsxsimilarity index 86%rename from packages/twenty-website-new/src/app/privacy-policy/page.tsxrename to packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsxindex 5d79252f7e9..c165a7ae5d5 100644--- a/packages/twenty-website-new/src/app/privacy-policy/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsx@@ -1,14 +1,12 @@-import type { Metadata } from 'next';-import { MENU_DATA } from '@/sections/Menu/data';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { LegalDocument } from '@/sections/LegalDocument/components';-import { buildPageMetadata } from '@/lib/seo';+import { buildLocalizedMetadata } from '@/lib/seo';import { PrivacyPolicyDocument } from './_components';-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/privacy-policy',title: 'Privacy Policy | Twenty',description:diff --git a/packages/twenty-website-new/src/app/product/feature.data.ts b/packages/twenty-website-new/src/app/[locale]/product/feature.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/product/feature.data.tsrename to packages/twenty-website-new/src/app/[locale]/product/feature.data.tsdiff --git a/packages/twenty-website-new/src/app/product/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/product/hero.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/product/hero.data.tsrename to packages/twenty-website-new/src/app/[locale]/product/hero.data.tsdiff --git a/packages/twenty-website-new/src/app/product/page.tsx b/packages/twenty-website-new/src/app/[locale]/product/page.tsxsimilarity index 92%rename from packages/twenty-website-new/src/app/product/page.tsxrename to packages/twenty-website-new/src/app/[locale]/product/page.tsxindex 5b1a6f43490..0aada93b710 100644--- a/packages/twenty-website-new/src/app/product/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/product/page.tsx@@ -2,11 +2,11 @@ import { FAQ_DATA } from '@/sections/Faq/data';import { MENU_DATA } from '@/sections/Menu/data';import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';import { TalkToUsButton } from '@/lib/contact-cal';-import { FEATURE_DATA } from '@/app/product/feature.data';-import { HERO_DATA } from '@/app/product/hero.data';-import { SIGNOFF_DATA } from '@/app/product/signoff.data';-import { STEPPER_DATA } from '@/app/product/stepper.data';-import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/product/three-cards.data';+import { FEATURE_DATA } from '@/app/[locale]/product/feature.data';+import { HERO_DATA } from '@/app/[locale]/product/hero.data';+import { SIGNOFF_DATA } from '@/app/[locale]/product/signoff.data';+import { STEPPER_DATA } from '@/app/[locale]/product/stepper.data';+import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/[locale]/product/three-cards.data';import { Body, Eyebrow, Heading, LinkButton } from '@/design-system/components';import { Pages } from '@/lib/pages';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';@@ -20,10 +20,9 @@ import { Signoff } from '@/sections/Signoff/components';import { ThreeCards } from '@/sections/ThreeCards/components';import { TrustedBy } from '@/sections/TrustedBy/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/product',title: 'Product | Twenty',description:diff --git a/packages/twenty-website-new/src/app/product/signoff.data.ts b/packages/twenty-website-new/src/app/[locale]/product/signoff.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/product/signoff.data.tsrename to packages/twenty-website-new/src/app/[locale]/product/signoff.data.tsdiff --git a/packages/twenty-website-new/src/app/product/stepper.data.ts b/packages/twenty-website-new/src/app/[locale]/product/stepper.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/product/stepper.data.tsrename to packages/twenty-website-new/src/app/[locale]/product/stepper.data.tsdiff --git a/packages/twenty-website-new/src/app/product/three-cards.data.ts b/packages/twenty-website-new/src/app/[locale]/product/three-cards.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/product/three-cards.data.tsrename to packages/twenty-website-new/src/app/[locale]/product/three-cards.data.tsdiff --git a/packages/twenty-website-new/src/app/releases/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/releases/hero.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/releases/hero.data.tsrename to packages/twenty-website-new/src/app/[locale]/releases/hero.data.tsdiff --git a/packages/twenty-website-new/src/app/releases/page.tsx b/packages/twenty-website-new/src/app/[locale]/releases/page.tsxsimilarity index 95%rename from packages/twenty-website-new/src/app/releases/page.tsxrename to packages/twenty-website-new/src/app/[locale]/releases/page.tsxindex 4030c8d1249..59434698a13 100644--- a/packages/twenty-website-new/src/app/releases/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/releases/page.tsx@@ -2,7 +2,7 @@ import { MENU_DATA } from '@/sections/Menu/data';import {RELEASE_NOTES_HERO_BODY,RELEASE_NOTES_HERO_HEADING,-} from '@/app/releases/hero.data';+} from '@/app/[locale]/releases/hero.data';import { LinkButton } from '@/design-system/components';import { Pages } from '@/lib/pages';import { GitHubIcon } from '@/icons';@@ -15,11 +15,10 @@ import { Hero } from '@/sections/Hero/components';import { Menu } from '@/sections/Menu/components';import { ReleaseNotes } from '@/sections/ReleaseNotes/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';+import { buildLocalizedMetadata } from '@/lib/seo';import { Fragment } from 'react';-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/releases',title: 'Releases | Twenty',description:diff --git a/packages/twenty-website-new/src/app/terms/_components/TermsDocument.tsx b/packages/twenty-website-new/src/app/[locale]/terms/_components/TermsDocument.tsxsimilarity index 99%rename from packages/twenty-website-new/src/app/terms/_components/TermsDocument.tsxrename to packages/twenty-website-new/src/app/[locale]/terms/_components/TermsDocument.tsxindex 727a848754e..c624de4920b 100644--- a/packages/twenty-website-new/src/app/terms/_components/TermsDocument.tsx+++ b/packages/twenty-website-new/src/app/[locale]/terms/_components/TermsDocument.tsx@@ -1,4 +1,4 @@-import Link from 'next/link';+import { LocalizedLink } from '@/lib/i18n';export function TermsDocument() {return (@@ -20,7 +20,7 @@ export function TermsDocument() {Our Privacy Policy also governs your use of our Service and explains howwe collect, safeguard and disclose information that results from youruse of our web pages. Please read it here:{' '}- <Link href="/privacy-policy">Privacy Policy</Link>.+ <LocalizedLink href="/privacy-policy">Privacy Policy</LocalizedLink>.</p><p>Your agreement with us includes these Terms and our Privacy Policydiff --git a/packages/twenty-website-new/src/app/terms/_components/index.ts b/packages/twenty-website-new/src/app/[locale]/terms/_components/index.tssimilarity index 100%rename from packages/twenty-website-new/src/app/terms/_components/index.tsrename to packages/twenty-website-new/src/app/[locale]/terms/_components/index.tsdiff --git a/packages/twenty-website-new/src/app/terms/page.tsx b/packages/twenty-website-new/src/app/[locale]/terms/page.tsxsimilarity index 86%rename from packages/twenty-website-new/src/app/terms/page.tsxrename to packages/twenty-website-new/src/app/[locale]/terms/page.tsxindex 5d8c8c7d616..16c1d024e63 100644--- a/packages/twenty-website-new/src/app/terms/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/terms/page.tsx@@ -1,14 +1,12 @@-import type { Metadata } from 'next';-import { MENU_DATA } from '@/sections/Menu/data';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { LegalDocument } from '@/sections/LegalDocument/components';-import { buildPageMetadata } from '@/lib/seo';+import { buildLocalizedMetadata } from '@/lib/seo';import { TermsDocument } from './_components';-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/terms',title: 'Terms of Service | Twenty',description:diff --git a/packages/twenty-website-new/src/app/why-twenty/editorial-four.data.ts b/packages/twenty-website-new/src/app/[locale]/why-twenty/editorial-four.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/why-twenty/editorial-four.data.tsrename to packages/twenty-website-new/src/app/[locale]/why-twenty/editorial-four.data.tsdiff --git a/packages/twenty-website-new/src/app/why-twenty/editorial-one.data.ts b/packages/twenty-website-new/src/app/[locale]/why-twenty/editorial-one.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/why-twenty/editorial-one.data.tsrename to packages/twenty-website-new/src/app/[locale]/why-twenty/editorial-one.data.tsdiff --git a/packages/twenty-website-new/src/app/why-twenty/editorial-three.data.ts b/packages/twenty-website-new/src/app/[locale]/why-twenty/editorial-three.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/why-twenty/editorial-three.data.tsrename to packages/twenty-website-new/src/app/[locale]/why-twenty/editorial-three.data.tsdiff --git a/packages/twenty-website-new/src/app/why-twenty/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/why-twenty/hero.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/why-twenty/hero.data.tsrename to packages/twenty-website-new/src/app/[locale]/why-twenty/hero.data.tsdiff --git a/packages/twenty-website-new/src/app/why-twenty/marquee.data.ts b/packages/twenty-website-new/src/app/[locale]/why-twenty/marquee.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/why-twenty/marquee.data.tsrename to packages/twenty-website-new/src/app/[locale]/why-twenty/marquee.data.tsdiff --git a/packages/twenty-website-new/src/app/why-twenty/page.tsx b/packages/twenty-website-new/src/app/[locale]/why-twenty/page.tsxsimilarity index 92%rename from packages/twenty-website-new/src/app/why-twenty/page.tsxrename to packages/twenty-website-new/src/app/[locale]/why-twenty/page.tsxindex 3c3d6703d28..80b82d27e1b 100644--- a/packages/twenty-website-new/src/app/why-twenty/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/why-twenty/page.tsx@@ -1,10 +1,10 @@import { MENU_DATA } from '@/sections/Menu/data';-import { EDITORIAL_FOUR } from '@/app/why-twenty/editorial-four.data';-import { EDITORIAL_ONE } from '@/app/why-twenty/editorial-one.data';-import { EDITORIAL_THREE } from '@/app/why-twenty/editorial-three.data';-import { HERO_DATA } from '@/app/why-twenty/hero.data';-import { MARQUEE_DATA } from '@/app/why-twenty/marquee.data';-import { SIGNOFF_DATA } from '@/app/why-twenty/signoff.data';+import { EDITORIAL_FOUR } from '@/app/[locale]/why-twenty/editorial-four.data';+import { EDITORIAL_ONE } from '@/app/[locale]/why-twenty/editorial-one.data';+import { EDITORIAL_THREE } from '@/app/[locale]/why-twenty/editorial-three.data';+import { HERO_DATA } from '@/app/[locale]/why-twenty/hero.data';+import { MARQUEE_DATA } from '@/app/[locale]/why-twenty/marquee.data';+import { SIGNOFF_DATA } from '@/app/[locale]/why-twenty/signoff.data';import { LinkButton } from '@/design-system/components';import { Pages } from '@/lib/pages';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';@@ -15,9 +15,8 @@ import { Marquee } from '@/sections/Marquee/components';import { Menu } from '@/sections/Menu/components';import { Signoff } from '@/sections/Signoff/components';import { theme } from '@/theme';-import { buildPageMetadata } from '@/lib/seo';+import { buildLocalizedMetadata } from '@/lib/seo';import { css } from '@linaria/core';-import type { Metadata } from 'next';const editorialOneIntroClass = css`margin-bottom: ${theme.spacing(4)};@@ -58,7 +57,7 @@ const sectionCrosshairRight = {lineColor: crosshairLineColor,};-export const metadata: Metadata = buildPageMetadata({+export const generateMetadata = buildLocalizedMetadata({path: '/why-twenty',title: 'Why Twenty | Twenty',description:diff --git a/packages/twenty-website-new/src/app/why-twenty/signoff.data.ts b/packages/twenty-website-new/src/app/[locale]/why-twenty/signoff.data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/why-twenty/signoff.data.tsrename to packages/twenty-website-new/src/app/[locale]/why-twenty/signoff.data.tsdiff --git a/packages/twenty-website-new/src/app/_components/FooterVisibilityGate.tsx b/packages/twenty-website-new/src/app/_components/FooterVisibilityGate.tsxindex fe1f37df532..c53661f48c9 100644--- a/packages/twenty-website-new/src/app/_components/FooterVisibilityGate.tsx+++ b/packages/twenty-website-new/src/app/_components/FooterVisibilityGate.tsx@@ -1,16 +1,17 @@'use client';-import { usePathname } from 'next/navigation';import type { ReactNode } from 'react';+import { useUnlocalizedPathname } from '@/lib/i18n';+type FooterVisibilityGateProps = {children: ReactNode;};export function FooterVisibilityGate({ children }: FooterVisibilityGateProps) {- const pathname = usePathname();+ const route = useUnlocalizedPathname();- if (pathname === '/halftone') {+ if (route === '/halftone') {return null;}diff --git a/packages/twenty-website-new/src/app/halftone/page.tsx b/packages/twenty-website-new/src/app/halftone/page.tsxdeleted file mode 100644index 19809ce3d11..00000000000--- a/packages/twenty-website-new/src/app/halftone/page.tsx+++ /dev/null@@ -1,13 +0,0 @@-import { HalftoneStudio } from '@/app/halftone/_components/HalftoneStudio';-import { buildPageMetadata } from '@/lib/seo';-import type { Metadata } from 'next';--export const metadata: Metadata = buildPageMetadata({- path: '/halftone',- title: 'Halftone Generator | Twenty',- description: 'Interactive halftone generator exported from Twenty.',-});--export default function HalftonePage() {- return <HalftoneStudio />;-}diff --git a/packages/twenty-website-new/src/app/robots.ts b/packages/twenty-website-new/src/app/robots.tsindex 9519a8f8e41..5e33a5ffa01 100644--- a/packages/twenty-website-new/src/app/robots.ts+++ b/packages/twenty-website-new/src/app/robots.ts@@ -10,7 +10,13 @@ export default function robots(): MetadataRoute.Robots {{userAgent: '*',allow: '/',- disallow: ['/halftone', '/enterprise/activate', '/api/'],+ disallow: [+ '/api/',+ '/halftone',+ '/*/halftone',+ '/enterprise/activate',+ '/*/enterprise/activate',+ ],},],sitemap: `${SITE_URL}/sitemap.xml`,diff --git a/packages/twenty-website-new/src/app/sitemap.ts b/packages/twenty-website-new/src/app/sitemap.tsindex 7a05f6d620a..0641da580d8 100644--- a/packages/twenty-website-new/src/app/sitemap.ts+++ b/packages/twenty-website-new/src/app/sitemap.ts@@ -1,15 +1,19 @@import type { MetadataRoute } from 'next';+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';import { CASE_STUDY_CATALOG_ENTRIES } from '@/lib/customers';+import { PUBLIC_APP_LOCALE_LIST } from '@/lib/i18n';import { getSiteUrl } from '@/lib/seo';const SITE_URL = getSiteUrl();-const STATIC_ROUTES: ReadonlyArray<{+type StaticRoute = {path: string;changeFrequency: MetadataRoute.Sitemap[number]['changeFrequency'];priority: number;-}> = [+};++const STATIC_ROUTES: readonly StaticRoute[] = [{ path: '/', changeFrequency: 'weekly', priority: 1.0 },{ path: '/why-twenty', changeFrequency: 'monthly', priority: 0.8 },{ path: '/product', changeFrequency: 'monthly', priority: 0.8 },@@ -21,20 +25,42 @@ const STATIC_ROUTES: ReadonlyArray<{{ path: '/terms', changeFrequency: 'yearly', priority: 0.3 },];+const buildLocalizedUrl = (locale: AppLocale, path: string): string => {+ const prefix = locale === SOURCE_LOCALE ? '' : `/${locale}`;+ const tail = path === '/' ? '' : path;+ return `${SITE_URL}${prefix}${tail}`;+};++const buildLanguageAlternates = (path: string): Record<string, string> => {+ const alternates: Record<string, string> = {};+ for (const locale of PUBLIC_APP_LOCALE_LIST) {+ alternates[locale] = buildLocalizedUrl(locale, path);+ }+ alternates['x-default'] = buildLocalizedUrl(SOURCE_LOCALE, path);+ return alternates;+};++const localize = (+ path: string,+ changeFrequency: MetadataRoute.Sitemap[number]['changeFrequency'],+ priority: number,+): MetadataRoute.Sitemap =>+ PUBLIC_APP_LOCALE_LIST.map((locale) => ({+ url: buildLocalizedUrl(locale, path),+ changeFrequency,+ priority,+ alternates: { languages: buildLanguageAlternates(path) },+ }));+export default function sitemap(): MetadataRoute.Sitemap {- const staticEntries = STATIC_ROUTES.map(- ({ path, changeFrequency, priority }) => ({- url: `${SITE_URL}${path}`,- changeFrequency,- priority,- }),+ const staticEntries = STATIC_ROUTES.flatMap(+ ({ path, changeFrequency, priority }) =>+ localize(path, changeFrequency, priority),);- const caseStudyEntries = CASE_STUDY_CATALOG_ENTRIES.map((entry) => ({- url: `${SITE_URL}${entry.href}`,- changeFrequency: 'yearly' as const,- priority: 0.5,- }));+ const caseStudyEntries = CASE_STUDY_CATALOG_ENTRIES.flatMap((entry) =>+ localize(entry.href, 'yearly', 0.5),+ );return [...staticEntries, ...caseStudyEntries];}diff --git a/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsx b/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsxindex c5b6007882e..66690cc0352 100644--- a/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsx+++ b/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsx@@ -1,6 +1,6 @@import type { LinkButtonType } from '@/design-system/components/Button/types/LinkButtonType';+import { LocalizedLink } from '@/lib/i18n';import { styled } from '@linaria/react';-import Link from 'next/link';import {BaseButton,type BaseButtonProps,@@ -11,7 +11,7 @@ const StyledButtonAnchor = styled.a`${buttonBaseStyles}`;-const StyledButtonLink = styled(Link)`+const StyledButtonLink = styled(LocalizedLink)`${buttonBaseStyles}`;diff --git a/packages/twenty-website-new/src/design-system/components/IconButton.tsx b/packages/twenty-website-new/src/design-system/components/IconButton.tsxindex 8d1956ec185..38590db7abd 100644--- a/packages/twenty-website-new/src/design-system/components/IconButton.tsx+++ b/packages/twenty-website-new/src/design-system/components/IconButton.tsx@@ -1,6 +1,6 @@+import { LocalizedLink } from '@/lib/i18n';import { theme } from '@/theme';import { styled } from '@linaria/react';-import Link from 'next/link';import type { ComponentType } from 'react';type IconComponent =@@ -59,7 +59,7 @@ const StyledButton = styled.button<SurfaceProps>`width: ${({ $size }) => `${$size}px`};`;-const StyledIconLink = styled(Link)<SurfaceProps>`+const StyledIconLink = styled(LocalizedLink)<SurfaceProps>`${iconButtonSurfaceStyles}border: 1px solid ${({ $borderColor }) => $borderColor};color: inherit;diff --git a/packages/twenty-website-new/src/lib/i18n/I18nProvider.tsx b/packages/twenty-website-new/src/lib/i18n/I18nProvider.tsxnew file mode 100644index 00000000000..c36e89754f9--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/I18nProvider.tsx@@ -0,0 +1,33 @@+'use client';++import { setupI18n, type Messages } from '@lingui/core';+import { I18nProvider as LinguiI18nProvider } from '@lingui/react';+import { useMemo, type ReactNode } from 'react';+import { type AppLocale } from 'twenty-shared/translations';++import { LocaleContext } from './LocaleContext';++type I18nProviderProps = {+ locale: AppLocale;+ messages: Messages;+ children: ReactNode;+};++export const I18nProvider = ({+ locale,+ messages,+ children,+}: I18nProviderProps) => {+ const i18n = useMemo(() => {+ const instance = setupI18n();+ instance.load(locale, messages);+ instance.activate(locale);+ return instance;+ }, [locale, messages]);++ return (+ <LocaleContext.Provider value={locale}>+ <LinguiI18nProvider i18n={i18n}>{children}</LinguiI18nProvider>+ </LocaleContext.Provider>+ );+};diff --git a/packages/twenty-website-new/src/lib/i18n/LocaleContext.tsx b/packages/twenty-website-new/src/lib/i18n/LocaleContext.tsxnew file mode 100644index 00000000000..ecb53d808a8--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/LocaleContext.tsx@@ -0,0 +1,6 @@+'use client';++import { createContext } from 'react';+import { type AppLocale } from 'twenty-shared/translations';++export const LocaleContext = createContext<AppLocale | null>(null);diff --git a/packages/twenty-website-new/src/lib/i18n/LocalizedLink.tsx b/packages/twenty-website-new/src/lib/i18n/LocalizedLink.tsxnew file mode 100644index 00000000000..8d52b46a7e4--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/LocalizedLink.tsx@@ -0,0 +1,17 @@+'use client';++import Link from 'next/link';+import { type ComponentProps } from 'react';++import { localizeHref } from './localize-href';+import { useLocale } from './use-locale';++type LocalizedLinkProps = Omit<ComponentProps<typeof Link>, 'href'> & {+ href: string;+};++export const LocalizedLink = ({ href, ...rest }: LocalizedLinkProps) => {+ const locale = useLocale();+ // oxlint-disable-next-line eslint-plugin-react(jsx-props-no-spreading)+ return <Link href={localizeHref(locale, href)} {...rest} />;+};diff --git a/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.ts b/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.tsnew file mode 100644index 00000000000..a44b1e9394d--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.ts@@ -0,0 +1,73 @@+import { detectLocale } from '../detect-locale';++describe('detectLocale', () => {+ it('returns the cookie value when it is a supported locale', () => {+ expect(+ detectLocale({+ cookieValue: 'fr-FR',+ acceptLanguageHeader: 'de-DE,de;q=0.9',+ }),+ ).toBe('fr-FR');+ });++ it('ignores an unsupported cookie value and falls back to Accept-Language', () => {+ expect(+ detectLocale({+ cookieValue: 'xx-YY',+ acceptLanguageHeader: 'de-DE,de;q=0.9',+ }),+ ).toBe('de-DE');+ });++ it('matches the highest-quality Accept-Language entry first', () => {+ expect(+ detectLocale({+ acceptLanguageHeader: 'en;q=0.5,fr-FR;q=0.9,de;q=0.7',+ }),+ ).toBe('fr-FR');+ });++ it('falls back from a regional tag to the language family', () => {+ expect(+ detectLocale({+ acceptLanguageHeader: 'fr-CA',+ }),+ ).toBe('fr-FR');+ });++ it('falls back from a bare language tag to the first matching regional locale', () => {+ expect(+ detectLocale({+ acceptLanguageHeader: 'pt;q=1.0,en;q=0.5',+ }),+ ).toBe('pt-BR');+ });++ it('returns the source locale when no input is provided', () => {+ expect(detectLocale({})).toBe('en');+ });++ it('returns the source locale when nothing in Accept-Language is supported', () => {+ expect(+ detectLocale({+ acceptLanguageHeader: 'xx-YY,zz-ZZ;q=0.5',+ }),+ ).toBe('en');+ });++ it('treats a malformed quality value as zero (deprioritized)', () => {+ expect(+ detectLocale({+ acceptLanguageHeader: 'fr-FR;q=not-a-number,de-DE;q=0.5',+ }),+ ).toBe('de-DE');+ });++ it('parses quality values when parameters carry leading whitespace around the semicolon', () => {+ expect(+ detectLocale({+ acceptLanguageHeader: 'en;q=0.1, fr-FR ; q=0.9, de-DE ; q=0.5',+ }),+ ).toBe('fr-FR');+ });+});diff --git a/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.ts b/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.tsnew file mode 100644index 00000000000..c11453a0625--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.ts@@ -0,0 +1,109 @@+import { localizeHref, stripLocale } from '../localize-href';++describe('localizeHref', () => {+ it('prefixes a non-default locale onto an internal absolute path', () => {+ expect(localizeHref('fr-FR', '/pricing')).toBe('/fr-FR/pricing');+ });++ it('returns paths unprefixed for the default locale (English at root)', () => {+ expect(localizeHref('en', '/pricing')).toBe('/pricing');+ expect(localizeHref('en', '/')).toBe('/');+ });++ it('prefixes a non-default locale onto the root path', () => {+ expect(localizeHref('fr-FR', '/')).toBe('/fr-FR/');+ });++ it('preserves query strings and hash fragments', () => {+ expect(localizeHref('de-DE', '/customers?ref=hero#top')).toBe(+ '/de-DE/customers?ref=hero#top',+ );+ expect(localizeHref('en', '/customers?ref=hero#top')).toBe(+ '/customers?ref=hero#top',+ );+ });++ it('does not double-prefix paths that already start with a non-default locale', () => {+ expect(localizeHref('fr-FR', '/de-DE/why-twenty')).toBe(+ '/de-DE/why-twenty',+ );+ expect(localizeHref('fr-FR', '/fr-FR/pricing')).toBe('/fr-FR/pricing');+ });++ it('strips a redundant /en prefix when targeting the default locale', () => {+ expect(localizeHref('en', '/en/why-twenty')).toBe('/why-twenty');+ expect(localizeHref('en', '/en')).toBe('/');+ });++ it('rewrites an /en-prefixed path onto the active non-default locale', () => {+ expect(localizeHref('fr-FR', '/en/why-twenty')).toBe('/fr-FR/why-twenty');+ expect(localizeHref('fr-FR', '/en')).toBe('/fr-FR/');+ });++ it('passes external https URLs through unchanged', () => {+ expect(localizeHref('en', 'https://docs.twenty.com')).toBe(+ 'https://docs.twenty.com',+ );+ });++ it('passes protocol-relative URLs through unchanged', () => {+ expect(localizeHref('en', '//cdn.twenty.com/asset.png')).toBe(+ '//cdn.twenty.com/asset.png',+ );+ });++ it('passes mailto and tel links through unchanged', () => {+ expect(localizeHref('en', 'mailto:[email protected]')).toBe(+ 'mailto:[email protected]',+ );+ expect(localizeHref('en', 'tel:+1234567890')).toBe('tel:+1234567890');+ });++ it('passes hash-only and relative hrefs through unchanged', () => {+ expect(localizeHref('en', '#top')).toBe('#top');+ expect(localizeHref('en', './sibling')).toBe('./sibling');+ expect(localizeHref('en', '../parent')).toBe('../parent');+ });++ it('handles a locale segment immediately followed by a query string', () => {+ expect(localizeHref('en', '/en?ref=hero')).toBe('/?ref=hero');+ expect(localizeHref('fr-FR', '/en?ref=hero')).toBe('/fr-FR/?ref=hero');+ expect(localizeHref('fr-FR', '/de-DE?ref=hero')).toBe('/de-DE?ref=hero');+ });++ it('handles a locale segment immediately followed by a hash fragment', () => {+ expect(localizeHref('en', '/en#anchor')).toBe('/#anchor');+ expect(localizeHref('fr-FR', '/en#anchor')).toBe('/fr-FR/#anchor');+ expect(localizeHref('fr-FR', '/de-DE#anchor')).toBe('/de-DE#anchor');+ });+});++describe('stripLocale', () => {+ it('removes a known locale prefix from the pathname', () => {+ expect(stripLocale('/en/why-twenty')).toBe('/why-twenty');+ expect(stripLocale('/fr-FR/customers/9dots')).toBe('/customers/9dots');+ });++ it('returns the root path when the pathname is just the locale segment', () => {+ expect(stripLocale('/en')).toBe('/');+ expect(stripLocale('/zh-CN')).toBe('/');+ });++ it('returns the pathname unchanged when no known locale prefix is present', () => {+ expect(stripLocale('/why-twenty')).toBe('/why-twenty');+ expect(stripLocale('/')).toBe('/');+ });++ it('returns the pathname unchanged when the input does not start with a slash', () => {+ expect(stripLocale('not-a-path')).toBe('not-a-path');+ expect(stripLocale('')).toBe('');+ });++ it('preserves query and hash when the locale segment is immediately followed by them', () => {+ expect(stripLocale('/en?ref=hero')).toBe('/?ref=hero');+ expect(stripLocale('/fr-FR#anchor')).toBe('/#anchor');+ expect(stripLocale('/fr-FR/customers?ref=hero#top')).toBe(+ '/customers?ref=hero#top',+ );+ });+});diff --git a/packages/twenty-website-new/src/lib/i18n/app-locale-set.ts b/packages/twenty-website-new/src/lib/i18n/app-locale-set.tsnew file mode 100644index 00000000000..c7c089b5899--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/app-locale-set.ts@@ -0,0 +1,28 @@+import { APP_LOCALES, type AppLocale } from 'twenty-shared/translations';++const APP_LOCALE_VALUES: readonly AppLocale[] = Object.values(APP_LOCALES);++export const isPublicAppLocale = (locale: AppLocale): boolean =>+ !locale.startsWith('pseudo-');++export const APP_LOCALE_LIST: readonly AppLocale[] = APP_LOCALE_VALUES;++export const PUBLIC_APP_LOCALE_LIST: readonly AppLocale[] =+ APP_LOCALE_VALUES.filter(isPublicAppLocale);++export const APP_LOCALE_BY_RAW: ReadonlyMap<string, AppLocale> = new Map(+ PUBLIC_APP_LOCALE_LIST.map((locale) => [locale, locale]),+);++export const APP_LOCALE_BY_LANGUAGE: ReadonlyMap<string, AppLocale> = (() => {+ const byLanguage = new Map<string, AppLocale>();+ for (const locale of PUBLIC_APP_LOCALE_LIST) {+ const [languageSubtag] = locale.split('-');+ if (languageSubtag === undefined) continue;+ const key = languageSubtag.toLowerCase();+ if (!byLanguage.has(key)) {+ byLanguage.set(key, locale);+ }+ }+ return byLanguage;+})();diff --git a/packages/twenty-website-new/src/lib/i18n/create-i18n-instance.ts b/packages/twenty-website-new/src/lib/i18n/create-i18n-instance.tsnew file mode 100644index 00000000000..a47f937c1a9--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/create-i18n-instance.ts@@ -0,0 +1,5 @@+import { createI18nInstanceFactory } from 'twenty-shared/i18n';++import { MESSAGES_BY_LOCALE } from './messages-by-locale';++export const createI18nInstance = createI18nInstanceFactory(MESSAGES_BY_LOCALE);diff --git a/packages/twenty-website-new/src/lib/i18n/detect-locale.ts b/packages/twenty-website-new/src/lib/i18n/detect-locale.tsnew file mode 100644index 00000000000..df20fb13228--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/detect-locale.ts@@ -0,0 +1,58 @@+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';++import { APP_LOCALE_BY_LANGUAGE, APP_LOCALE_BY_RAW } from './app-locale-set';++export const LOCALE_COOKIE_NAME = 'NEXT_LOCALE';++type AcceptLanguageEntry = { tag: string; quality: number };++const parseAcceptLanguage = (header: string): AcceptLanguageEntry[] =>+ header+ .split(',')+ .flatMap((part): AcceptLanguageEntry[] => {+ const [rawTag, ...params] = part.trim().split(';');+ if (rawTag === undefined || rawTag.length === 0) return [];+ const qParam = params.find((p) => p.trim().startsWith('q='))?.trim();+ const parsedQuality =+ qParam !== undefined ? Number.parseFloat(qParam.slice(2)) : 1;+ return [+ {+ tag: rawTag.trim(),+ quality: Number.isFinite(parsedQuality) ? parsedQuality : 0,+ },+ ];+ })+ .sort((a, b) => b.quality - a.quality);++const matchTag = (tag: string): AppLocale | undefined => {+ const exact = APP_LOCALE_BY_RAW.get(tag);+ if (exact !== undefined) return exact;++ const [languageSubtag] = tag.split('-');+ if (languageSubtag === undefined) return undefined;+ return APP_LOCALE_BY_LANGUAGE.get(languageSubtag.toLowerCase());+};++type DetectLocaleInput = {+ cookieValue?: string;+ acceptLanguageHeader?: string;+};++export const detectLocale = ({+ cookieValue,+ acceptLanguageHeader,+}: DetectLocaleInput): AppLocale => {+ if (cookieValue !== undefined) {+ const fromCookie = APP_LOCALE_BY_RAW.get(cookieValue);+ if (fromCookie !== undefined) return fromCookie;+ }++ if (acceptLanguageHeader !== undefined && acceptLanguageHeader.length > 0) {+ for (const { tag } of parseAcceptLanguage(acceptLanguageHeader)) {+ const match = matchTag(tag);+ if (match !== undefined) return match;+ }+ }++ return SOURCE_LOCALE;+};diff --git a/packages/twenty-website-new/src/lib/i18n/index.ts b/packages/twenty-website-new/src/lib/i18n/index.tsnew file mode 100644index 00000000000..7bd9dbf54a6--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/index.ts@@ -0,0 +1,17 @@+export {+ APP_LOCALE_BY_LANGUAGE,+ APP_LOCALE_BY_RAW,+ APP_LOCALE_LIST,+ PUBLIC_APP_LOCALE_LIST,+ isPublicAppLocale,+} from './app-locale-set';+export { createI18nInstance } from './create-i18n-instance';+export { detectLocale, LOCALE_COOKIE_NAME } from './detect-locale';+export { I18nProvider } from './I18nProvider';+export { LocaleContext } from './LocaleContext';+export { LocalizedLink } from './LocalizedLink';+export { localizeHref, stripLocale } from './localize-href';+export { getLocaleMessages } from './messages-by-locale';+export { resolveLocaleParam } from './resolve-locale-param';+export { useLocale } from './use-locale';+export { useUnlocalizedPathname } from './use-unlocalized-pathname';diff --git a/packages/twenty-website-new/src/lib/i18n/localize-href.ts b/packages/twenty-website-new/src/lib/i18n/localize-href.tsnew file mode 100644index 00000000000..6a0d999143c--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/localize-href.ts@@ -0,0 +1,47 @@+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';++import { APP_LOCALE_BY_RAW } from './app-locale-set';++const findFirstSegmentEnd = (path: string): number => {+ for (let i = 1; i < path.length; i += 1) {+ const ch = path[i];+ if (ch === '/' || ch === '?' || ch === '#') return i;+ }+ return path.length;+};++const buildTailFromSegmentEnd = (path: string, segmentEnd: number): string => {+ const tail = path.slice(segmentEnd);+ if (tail.length === 0) return '/';+ if (tail.startsWith('?') || tail.startsWith('#')) return `/${tail}`;+ return tail;+};++export const localizeHref = (locale: AppLocale, href: string): string => {+ if (!href.startsWith('/') || href.startsWith('//')) return href;++ const segmentEnd = findFirstSegmentEnd(href);+ const firstSegment = href.slice(1, segmentEnd);+ const existingLocale = APP_LOCALE_BY_RAW.get(firstSegment);++ if (existingLocale !== undefined && existingLocale !== SOURCE_LOCALE) {+ return href;+ }++ const unprefixed =+ existingLocale === SOURCE_LOCALE+ ? buildTailFromSegmentEnd(href, segmentEnd)+ : href;++ return locale === SOURCE_LOCALE ? unprefixed : `/${locale}${unprefixed}`;+};++export const stripLocale = (pathname: string): string => {+ if (!pathname.startsWith('/')) return pathname;++ const segmentEnd = findFirstSegmentEnd(pathname);+ const firstSegment = pathname.slice(1, segmentEnd);+ if (!APP_LOCALE_BY_RAW.has(firstSegment)) return pathname;++ return buildTailFromSegmentEnd(pathname, segmentEnd);+};diff --git a/packages/twenty-website-new/src/lib/i18n/messages-by-locale.ts b/packages/twenty-website-new/src/lib/i18n/messages-by-locale.tsnew file mode 100644index 00000000000..fcd445babe1--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/messages-by-locale.ts@@ -0,0 +1,13 @@+import { type Messages } from '@lingui/core';+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';++import { messages as enMessages } from '@/locales/generated/en';++const MESSAGES_BY_LOCALE: Partial<Record<AppLocale, Messages>> = {+ en: enMessages,+};++export const getLocaleMessages = (locale: AppLocale): Messages =>+ MESSAGES_BY_LOCALE[locale] ?? MESSAGES_BY_LOCALE[SOURCE_LOCALE] ?? {};++export { MESSAGES_BY_LOCALE };diff --git a/packages/twenty-website-new/src/lib/i18n/resolve-locale-param.ts b/packages/twenty-website-new/src/lib/i18n/resolve-locale-param.tsnew file mode 100644index 00000000000..b348fa4f043--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/resolve-locale-param.ts@@ -0,0 +1,10 @@+import { notFound } from 'next/navigation';+import { type AppLocale } from 'twenty-shared/translations';++import { APP_LOCALE_BY_RAW } from './app-locale-set';++export const resolveLocaleParam = (raw: string): AppLocale => {+ const locale = APP_LOCALE_BY_RAW.get(raw);+ if (locale === undefined) notFound();+ return locale;+};diff --git a/packages/twenty-website-new/src/lib/i18n/use-locale.ts b/packages/twenty-website-new/src/lib/i18n/use-locale.tsnew file mode 100644index 00000000000..81d16034a7c--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/use-locale.ts@@ -0,0 +1,16 @@+'use client';++import { useContext } from 'react';+import { type AppLocale } from 'twenty-shared/translations';++import { LocaleContext } from './LocaleContext';++export const useLocale = (): AppLocale => {+ const locale = useContext(LocaleContext);+ if (locale === null) {+ throw new Error(+ 'useLocale must be used inside a LocaleContext.Provider (mounted by [locale]/layout.tsx)',+ );+ }+ return locale;+};diff --git a/packages/twenty-website-new/src/lib/i18n/use-unlocalized-pathname.ts b/packages/twenty-website-new/src/lib/i18n/use-unlocalized-pathname.tsnew file mode 100644index 00000000000..a1a27d3afb4--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/use-unlocalized-pathname.ts@@ -0,0 +1,10 @@+'use client';++import { usePathname } from 'next/navigation';++import { stripLocale } from './localize-href';++export const useUnlocalizedPathname = (): string => {+ const pathname = usePathname();+ return stripLocale(pathname ?? '');+};diff --git a/packages/twenty-website-new/src/lib/seo/__tests__/build-page-metadata.test.ts b/packages/twenty-website-new/src/lib/seo/__tests__/build-page-metadata.test.tsindex cc4ee01b9c4..704a133e5bf 100644--- a/packages/twenty-website-new/src/lib/seo/__tests__/build-page-metadata.test.ts+++ b/packages/twenty-website-new/src/lib/seo/__tests__/build-page-metadata.test.ts@@ -11,19 +11,21 @@ afterAll(() => {});describe('buildPageMetadata', () => {- it('produces a baseline with canonical, openGraph, and twitter populated', () => {+ it('emits an unprefixed canonical for the default locale (English at root)', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/product',title: 'Product | Twenty',description: 'Product page description.',});- expect(metadata.alternates).toEqual({ canonical: '/product' });+ expect(metadata.alternates).toMatchObject({ canonical: '/product' });expect(metadata.openGraph).toMatchObject({title: 'Product | Twenty',description: 'Product page description.',url: '/product',siteName: 'Twenty',+ locale: 'en',type: 'website',});expect(metadata.twitter).toMatchObject({@@ -33,8 +35,68 @@ describe('buildPageMetadata', () => {});});+ it('emits a prefixed canonical for non-default locales', () => {+ const metadata = buildPageMetadata({+ locale: 'fr-FR',+ path: '/product',+ title: 't',+ description: 'd',+ });++ expect(metadata.alternates).toMatchObject({ canonical: '/fr-FR/product' });+ });++ it('emits hreflang language alternates: English unprefixed, others prefixed, x-default unprefixed', () => {+ const metadata = buildPageMetadata({+ locale: 'fr-FR',+ path: '/pricing',+ title: 't',+ description: 'd',+ });++ const languages = metadata.alternates?.languages as+ | Record<string, string>+ | undefined;+ expect(languages?.en).toBe('/pricing');+ expect(languages?.['fr-FR']).toBe('/fr-FR/pricing');+ expect(languages?.['zh-CN']).toBe('/zh-CN/pricing');+ expect(languages?.['x-default']).toBe('/pricing');+ });++ it('omits pseudo locales from hreflang language alternates', () => {+ const metadata = buildPageMetadata({+ locale: 'en',+ path: '/pricing',+ title: 't',+ description: 'd',+ });++ const languages = metadata.alternates?.languages as+ | Record<string, string>+ | undefined;+ expect(languages?.['pseudo-en']).toBeUndefined();+ });++ it('localizes the root path correctly (no trailing slash duplication)', () => {+ const metadata = buildPageMetadata({+ locale: 'de-DE',+ path: '/',+ title: 't',+ description: 'd',+ });++ expect(metadata.alternates).toMatchObject({ canonical: '/de-DE' });+ const languages = metadata.alternates?.languages as+ | Record<string, string>+ | undefined;+ expect(languages?.['de-DE']).toBe('/de-DE');+ expect(languages?.en).toBe('/');+ expect(languages?.['x-default']).toBe('/');+ });+it('absolutises a root-relative ogImage against the configured site URL', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/x',title: 't',description: 'd',@@ -49,6 +111,7 @@ describe('buildPageMetadata', () => {it('passes through an absolute ogImage unchanged', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/x',title: 't',description: 'd',@@ -62,6 +125,7 @@ describe('buildPageMetadata', () => {it('deep-merges openGraph: extending title preserves description, url, and images', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/x',title: 'Default title',description: 'Default description',@@ -82,6 +146,7 @@ describe('buildPageMetadata', () => {it('deep-merges twitter: extending card preserves handle, title, images', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/x',title: 't',description: 'd',@@ -100,24 +165,29 @@ describe('buildPageMetadata', () => {});});- it('deep-merges alternates so canonical survives a languages override', () => {+ it('deep-merges alternates so canonical and languages survive an override of one field', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/x',title: 't',description: 'd',extend: {- alternates: { languages: { fr: '/fr/x' } },+ alternates: { canonical: '/custom-canonical' },},});- expect(metadata.alternates).toEqual({- canonical: '/x',- languages: { fr: '/fr/x' },+ expect(metadata.alternates).toMatchObject({+ canonical: '/custom-canonical',});+ const languages = metadata.alternates?.languages as+ | Record<string, string>+ | undefined;+ expect(languages?.en).toBe('/x');});it('shallow-merges unrelated top-level keys (e.g. robots)', () => {const metadata = buildPageMetadata({+ locale: 'en',path: '/x',title: 't',description: 'd',@@ -127,6 +197,6 @@ describe('buildPageMetadata', () => {});expect(metadata.robots).toEqual({ index: false, follow: false });- expect(metadata.alternates).toEqual({ canonical: '/x' });+ expect(metadata.alternates).toMatchObject({ canonical: '/x' });});});diff --git a/packages/twenty-website-new/src/lib/seo/build-localized-metadata.ts b/packages/twenty-website-new/src/lib/seo/build-localized-metadata.tsnew file mode 100644index 00000000000..2753ec437d7--- /dev/null+++ b/packages/twenty-website-new/src/lib/seo/build-localized-metadata.ts@@ -0,0 +1,20 @@+import type { Metadata } from 'next';++import { resolveLocaleParam } from '@/lib/i18n/resolve-locale-param';++import {+ buildPageMetadata,+ type BuildPageMetadataInput,+} from './build-page-metadata';++type LocalizedMetadataArgs = {+ params: Promise<{ locale: string }>;+};++export const buildLocalizedMetadata =+ (input: Omit<BuildPageMetadataInput, 'locale'>) =>+ async ({ params }: LocalizedMetadataArgs): Promise<Metadata> => {+ const { locale: rawLocale } = await params;+ const locale = resolveLocaleParam(rawLocale);+ return buildPageMetadata({ ...input, locale });+ };diff --git a/packages/twenty-website-new/src/lib/seo/build-page-metadata.ts b/packages/twenty-website-new/src/lib/seo/build-page-metadata.tsindex a63d519501d..10180e4e392 100644--- a/packages/twenty-website-new/src/lib/seo/build-page-metadata.ts+++ b/packages/twenty-website-new/src/lib/seo/build-page-metadata.ts@@ -1,4 +1,7 @@import type { Metadata } from 'next';+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';++import { PUBLIC_APP_LOCALE_LIST } from '@/lib/i18n/app-locale-set';import { getSiteUrl } from './site-url';@@ -6,6 +9,7 @@ const SITE_NAME = 'Twenty';const TWITTER_HANDLE = '@twentycrm';export type BuildPageMetadataInput = {+ locale: AppLocale;path: string;title: string;description: string;@@ -14,7 +18,29 @@ export type BuildPageMetadataInput = {extend?: Metadata;};+const normalizePath = (path: string): string =>+ path.startsWith('/') ? path : `/${path}`;++const localizePath = (locale: AppLocale, normalizedPath: string): string => {+ if (locale === SOURCE_LOCALE) {+ return normalizedPath;+ }+ return normalizedPath === '/' ? `/${locale}` : `/${locale}${normalizedPath}`;+};++const buildLanguageAlternates = (+ normalizedPath: string,+): Record<string, string> => {+ const languages: Record<string, string> = {};+ for (const locale of PUBLIC_APP_LOCALE_LIST) {+ languages[locale] = localizePath(locale, normalizedPath);+ }+ languages['x-default'] = localizePath(SOURCE_LOCALE, normalizedPath);+ return languages;+};+export function buildPageMetadata({+ locale,path,title,description,@@ -23,7 +49,8 @@ export function buildPageMetadata({extend,}: BuildPageMetadataInput): Metadata {const siteUrl = getSiteUrl();- const canonical = path.startsWith('/') ? path : `/${path}`;+ const normalizedPath = normalizePath(path);+ const canonical = localizePath(locale, normalizedPath);const ogImages =ogImage === undefined@@ -39,12 +66,16 @@ export function buildPageMetadata({const baseMetadata: Metadata = {title,description,- alternates: { canonical },+ alternates: {+ canonical,+ languages: buildLanguageAlternates(normalizedPath),+ },openGraph: {title,description,url: canonical,siteName: SITE_NAME,+ locale,type,...(ogImages && { images: ogImages }),},diff --git a/packages/twenty-website-new/src/lib/seo/index.ts b/packages/twenty-website-new/src/lib/seo/index.tsindex 2391cc6ba31..067bf5b00e8 100644--- a/packages/twenty-website-new/src/lib/seo/index.ts+++ b/packages/twenty-website-new/src/lib/seo/index.ts@@ -1,5 +1,6 @@-export { getSiteUrl, getAbsoluteUrl } from './site-url';+export { buildLocalizedMetadata } from './build-localized-metadata';export {buildPageMetadata,type BuildPageMetadataInput,} from './build-page-metadata';+export { getAbsoluteUrl, getSiteUrl } from './site-url';diff --git a/packages/twenty-website-new/src/locales/af-ZA.po b/packages/twenty-website-new/src/locales/af-ZA.ponew file mode 100644index 00000000000..f0d391a4b04--- /dev/null+++ b/packages/twenty-website-new/src/locales/af-ZA.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: af-ZA\n"diff --git a/packages/twenty-website-new/src/locales/ar-SA.po b/packages/twenty-website-new/src/locales/ar-SA.ponew file mode 100644index 00000000000..5cbdb8535e3--- /dev/null+++ b/packages/twenty-website-new/src/locales/ar-SA.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: ar-SA\n"diff --git a/packages/twenty-website-new/src/locales/ca-ES.po b/packages/twenty-website-new/src/locales/ca-ES.ponew file mode 100644index 00000000000..ba48ff2edf0--- /dev/null+++ b/packages/twenty-website-new/src/locales/ca-ES.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: ca-ES\n"diff --git a/packages/twenty-website-new/src/locales/cs-CZ.po b/packages/twenty-website-new/src/locales/cs-CZ.ponew file mode 100644index 00000000000..847e070a9ea--- /dev/null+++ b/packages/twenty-website-new/src/locales/cs-CZ.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: cs-CZ\n"diff --git a/packages/twenty-website-new/src/locales/da-DK.po b/packages/twenty-website-new/src/locales/da-DK.ponew file mode 100644index 00000000000..d24527f334e--- /dev/null+++ b/packages/twenty-website-new/src/locales/da-DK.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: da-DK\n"diff --git a/packages/twenty-website-new/src/locales/de-DE.po b/packages/twenty-website-new/src/locales/de-DE.ponew file mode 100644index 00000000000..35b8ac1c787--- /dev/null+++ b/packages/twenty-website-new/src/locales/de-DE.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: de-DE\n"diff --git a/packages/twenty-website-new/src/locales/el-GR.po b/packages/twenty-website-new/src/locales/el-GR.ponew file mode 100644index 00000000000..0f3ed50c7db--- /dev/null+++ b/packages/twenty-website-new/src/locales/el-GR.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: el-GR\n"diff --git a/packages/twenty-website-new/src/locales/en.po b/packages/twenty-website-new/src/locales/en.ponew file mode 100644index 00000000000..b876953b4d4--- /dev/null+++ b/packages/twenty-website-new/src/locales/en.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: en\n"diff --git a/packages/twenty-website-new/src/locales/es-ES.po b/packages/twenty-website-new/src/locales/es-ES.ponew file mode 100644index 00000000000..4a202ea6eb4--- /dev/null+++ b/packages/twenty-website-new/src/locales/es-ES.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: es-ES\n"diff --git a/packages/twenty-website-new/src/locales/fi-FI.po b/packages/twenty-website-new/src/locales/fi-FI.ponew file mode 100644index 00000000000..a64e5dafc9b--- /dev/null+++ b/packages/twenty-website-new/src/locales/fi-FI.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: fi-FI\n"diff --git a/packages/twenty-website-new/src/locales/fr-FR.po b/packages/twenty-website-new/src/locales/fr-FR.ponew file mode 100644index 00000000000..05d9faaabff--- /dev/null+++ b/packages/twenty-website-new/src/locales/fr-FR.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: fr-FR\n"diff --git a/packages/twenty-website-new/src/locales/generated/af-ZA.ts b/packages/twenty-website-new/src/locales/generated/af-ZA.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/af-ZA.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/ar-SA.ts b/packages/twenty-website-new/src/locales/generated/ar-SA.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/ar-SA.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/ca-ES.ts b/packages/twenty-website-new/src/locales/generated/ca-ES.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/ca-ES.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/cs-CZ.ts b/packages/twenty-website-new/src/locales/generated/cs-CZ.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/cs-CZ.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/da-DK.ts b/packages/twenty-website-new/src/locales/generated/da-DK.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/da-DK.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/de-DE.ts b/packages/twenty-website-new/src/locales/generated/de-DE.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/de-DE.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/el-GR.ts b/packages/twenty-website-new/src/locales/generated/el-GR.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/el-GR.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/en.ts b/packages/twenty-website-new/src/locales/generated/en.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/en.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/es-ES.ts b/packages/twenty-website-new/src/locales/generated/es-ES.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/es-ES.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/fi-FI.ts b/packages/twenty-website-new/src/locales/generated/fi-FI.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/fi-FI.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/fr-FR.ts b/packages/twenty-website-new/src/locales/generated/fr-FR.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/fr-FR.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/he-IL.ts b/packages/twenty-website-new/src/locales/generated/he-IL.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/he-IL.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/hu-HU.ts b/packages/twenty-website-new/src/locales/generated/hu-HU.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/hu-HU.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/it-IT.ts b/packages/twenty-website-new/src/locales/generated/it-IT.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/it-IT.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/ja-JP.ts b/packages/twenty-website-new/src/locales/generated/ja-JP.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/ja-JP.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/ko-KR.ts b/packages/twenty-website-new/src/locales/generated/ko-KR.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/ko-KR.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/nl-NL.ts b/packages/twenty-website-new/src/locales/generated/nl-NL.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/nl-NL.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/no-NO.ts b/packages/twenty-website-new/src/locales/generated/no-NO.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/no-NO.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/pl-PL.ts b/packages/twenty-website-new/src/locales/generated/pl-PL.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/pl-PL.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/pseudo-en.ts b/packages/twenty-website-new/src/locales/generated/pseudo-en.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/pseudo-en.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/pt-BR.ts b/packages/twenty-website-new/src/locales/generated/pt-BR.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/pt-BR.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/pt-PT.ts b/packages/twenty-website-new/src/locales/generated/pt-PT.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/pt-PT.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/ro-RO.ts b/packages/twenty-website-new/src/locales/generated/ro-RO.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/ro-RO.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/ru-RU.ts b/packages/twenty-website-new/src/locales/generated/ru-RU.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/ru-RU.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/sr-Cyrl.ts b/packages/twenty-website-new/src/locales/generated/sr-Cyrl.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/sr-Cyrl.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/sv-SE.ts b/packages/twenty-website-new/src/locales/generated/sv-SE.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/sv-SE.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/tr-TR.ts b/packages/twenty-website-new/src/locales/generated/tr-TR.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/tr-TR.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/uk-UA.ts b/packages/twenty-website-new/src/locales/generated/uk-UA.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/uk-UA.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/vi-VN.ts b/packages/twenty-website-new/src/locales/generated/vi-VN.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/vi-VN.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/zh-CN.ts b/packages/twenty-website-new/src/locales/generated/zh-CN.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/zh-CN.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/generated/zh-TW.ts b/packages/twenty-website-new/src/locales/generated/zh-TW.tsnew file mode 100644index 00000000000..76934b72de0--- /dev/null+++ b/packages/twenty-website-new/src/locales/generated/zh-TW.ts@@ -0,0 +1 @@+/*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{}")as Messages;\ No newline at end of filediff --git a/packages/twenty-website-new/src/locales/he-IL.po b/packages/twenty-website-new/src/locales/he-IL.ponew file mode 100644index 00000000000..1ded1f937c5--- /dev/null+++ b/packages/twenty-website-new/src/locales/he-IL.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: he-IL\n"diff --git a/packages/twenty-website-new/src/locales/hu-HU.po b/packages/twenty-website-new/src/locales/hu-HU.ponew file mode 100644index 00000000000..8145050817a--- /dev/null+++ b/packages/twenty-website-new/src/locales/hu-HU.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: hu-HU\n"diff --git a/packages/twenty-website-new/src/locales/it-IT.po b/packages/twenty-website-new/src/locales/it-IT.ponew file mode 100644index 00000000000..5f702a185c1--- /dev/null+++ b/packages/twenty-website-new/src/locales/it-IT.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: it-IT\n"diff --git a/packages/twenty-website-new/src/locales/ja-JP.po b/packages/twenty-website-new/src/locales/ja-JP.ponew file mode 100644index 00000000000..53d95d4a814--- /dev/null+++ b/packages/twenty-website-new/src/locales/ja-JP.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: ja-JP\n"diff --git a/packages/twenty-website-new/src/locales/ko-KR.po b/packages/twenty-website-new/src/locales/ko-KR.ponew file mode 100644index 00000000000..35658bf40b1--- /dev/null+++ b/packages/twenty-website-new/src/locales/ko-KR.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: ko-KR\n"diff --git a/packages/twenty-website-new/src/locales/nl-NL.po b/packages/twenty-website-new/src/locales/nl-NL.ponew file mode 100644index 00000000000..6c805962df5--- /dev/null+++ b/packages/twenty-website-new/src/locales/nl-NL.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: nl-NL\n"diff --git a/packages/twenty-website-new/src/locales/no-NO.po b/packages/twenty-website-new/src/locales/no-NO.ponew file mode 100644index 00000000000..b64c6d43e4f--- /dev/null+++ b/packages/twenty-website-new/src/locales/no-NO.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: no-NO\n"diff --git a/packages/twenty-website-new/src/locales/pl-PL.po b/packages/twenty-website-new/src/locales/pl-PL.ponew file mode 100644index 00000000000..2ff9b760b4f--- /dev/null+++ b/packages/twenty-website-new/src/locales/pl-PL.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: pl-PL\n"diff --git a/packages/twenty-website-new/src/locales/pseudo-en.po b/packages/twenty-website-new/src/locales/pseudo-en.ponew file mode 100644index 00000000000..4a88161ab74--- /dev/null+++ b/packages/twenty-website-new/src/locales/pseudo-en.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: pseudo-en\n"diff --git a/packages/twenty-website-new/src/locales/pt-BR.po b/packages/twenty-website-new/src/locales/pt-BR.ponew file mode 100644index 00000000000..32bfcc0d8f6--- /dev/null+++ b/packages/twenty-website-new/src/locales/pt-BR.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: pt-BR\n"diff --git a/packages/twenty-website-new/src/locales/pt-PT.po b/packages/twenty-website-new/src/locales/pt-PT.ponew file mode 100644index 00000000000..f450ab91e26--- /dev/null+++ b/packages/twenty-website-new/src/locales/pt-PT.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: pt-PT\n"diff --git a/packages/twenty-website-new/src/locales/ro-RO.po b/packages/twenty-website-new/src/locales/ro-RO.ponew file mode 100644index 00000000000..f611ae1e1ed--- /dev/null+++ b/packages/twenty-website-new/src/locales/ro-RO.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: ro-RO\n"diff --git a/packages/twenty-website-new/src/locales/ru-RU.po b/packages/twenty-website-new/src/locales/ru-RU.ponew file mode 100644index 00000000000..0925e2a7ed7--- /dev/null+++ b/packages/twenty-website-new/src/locales/ru-RU.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: ru-RU\n"diff --git a/packages/twenty-website-new/src/locales/sr-Cyrl.po b/packages/twenty-website-new/src/locales/sr-Cyrl.ponew file mode 100644index 00000000000..b8407e9b7a5--- /dev/null+++ b/packages/twenty-website-new/src/locales/sr-Cyrl.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: sr-Cyrl\n"diff --git a/packages/twenty-website-new/src/locales/sv-SE.po b/packages/twenty-website-new/src/locales/sv-SE.ponew file mode 100644index 00000000000..e39a66153f7--- /dev/null+++ b/packages/twenty-website-new/src/locales/sv-SE.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: sv-SE\n"diff --git a/packages/twenty-website-new/src/locales/tr-TR.po b/packages/twenty-website-new/src/locales/tr-TR.ponew file mode 100644index 00000000000..9f3ebf6d704--- /dev/null+++ b/packages/twenty-website-new/src/locales/tr-TR.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: tr-TR\n"diff --git a/packages/twenty-website-new/src/locales/uk-UA.po b/packages/twenty-website-new/src/locales/uk-UA.ponew file mode 100644index 00000000000..9b24caca66e--- /dev/null+++ b/packages/twenty-website-new/src/locales/uk-UA.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: uk-UA\n"diff --git a/packages/twenty-website-new/src/locales/vi-VN.po b/packages/twenty-website-new/src/locales/vi-VN.ponew file mode 100644index 00000000000..21cc3a8d2ed--- /dev/null+++ b/packages/twenty-website-new/src/locales/vi-VN.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: vi-VN\n"diff --git a/packages/twenty-website-new/src/locales/zh-CN.po b/packages/twenty-website-new/src/locales/zh-CN.ponew file mode 100644index 00000000000..66bcb5b4393--- /dev/null+++ b/packages/twenty-website-new/src/locales/zh-CN.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: zh-CN\n"diff --git a/packages/twenty-website-new/src/locales/zh-TW.po b/packages/twenty-website-new/src/locales/zh-TW.ponew file mode 100644index 00000000000..265077a5215--- /dev/null+++ b/packages/twenty-website-new/src/locales/zh-TW.po@@ -0,0 +1,8 @@+msgid ""+msgstr ""+"POT-Creation-Date: 2026-04-27 14:31+0500\n"+"MIME-Version: 1.0\n"+"Content-Type: text/plain; charset=utf-8\n"+"Content-Transfer-Encoding: 8bit\n"+"X-Generator: @lingui/cli\n"+"Language: zh-TW\n"diff --git a/packages/twenty-website-new/src/middleware.ts b/packages/twenty-website-new/src/middleware.tsnew file mode 100644index 00000000000..ea2c56e4c3d--- /dev/null+++ b/packages/twenty-website-new/src/middleware.ts@@ -0,0 +1,71 @@+import { NextResponse, type NextRequest } from 'next/server';+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';++import { APP_LOCALE_BY_RAW } from '@/lib/i18n/app-locale-set';+import { LOCALE_COOKIE_NAME, detectLocale } from '@/lib/i18n/detect-locale';++const LOCALE_COOKIE_MAX_AGE = 60 * 60 * 24 * 365;++const setLocaleCookie = (response: NextResponse, locale: AppLocale) => {+ response.cookies.set({+ name: LOCALE_COOKIE_NAME,+ value: locale,+ path: '/',+ maxAge: LOCALE_COOKIE_MAX_AGE,+ sameSite: 'lax',+ });+};++export const middleware = (request: NextRequest) => {+ const { pathname, search } = request.nextUrl;++ const firstSlash = pathname.indexOf('/', 1);+ const firstSegment =+ firstSlash === -1 ? pathname.slice(1) : pathname.slice(1, firstSlash);+ const localeFromPath = APP_LOCALE_BY_RAW.get(firstSegment);++ if (localeFromPath === SOURCE_LOCALE) {+ const canonicalPath = firstSlash === -1 ? '/' : pathname.slice(firstSlash);+ const target = request.nextUrl.clone();+ target.pathname = canonicalPath;+ target.search = search;+ return NextResponse.redirect(target, 301);+ }++ if (localeFromPath !== undefined) {+ const cookieLocale = request.cookies.get(LOCALE_COOKIE_NAME)?.value;+ if (cookieLocale === localeFromPath) {+ return NextResponse.next();+ }+ const response = NextResponse.next();+ setLocaleCookie(response, localeFromPath);+ return response;+ }++ const detected = detectLocale({+ cookieValue: request.cookies.get(LOCALE_COOKIE_NAME)?.value,+ acceptLanguageHeader: request.headers.get('accept-language') ?? undefined,+ });++ if (detected === SOURCE_LOCALE) {+ const target = request.nextUrl.clone();+ target.pathname = `/${SOURCE_LOCALE}${pathname === '/' ? '' : pathname}`;+ const response = NextResponse.rewrite(target);+ const cookieLocale = request.cookies.get(LOCALE_COOKIE_NAME)?.value;+ if (cookieLocale !== SOURCE_LOCALE) {+ setLocaleCookie(response, SOURCE_LOCALE);+ }+ return response;+ }++ const target = request.nextUrl.clone();+ target.pathname = `/${detected}${pathname === '/' ? '' : pathname}`;+ target.search = search;+ return NextResponse.redirect(target, 308);+};++export const config = {+ matcher: [+ '/((?!api|_next/static|_next/image|favicon.ico|robots.txt|sitemap.xml|illustrations|lottie|fonts|.*\\..*).*)',+ ],+};diff --git a/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsx b/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsxindex 7298617e520..fdce472b377 100644--- a/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsx@@ -1,12 +1,12 @@import type { CaseStudyData } from '@/lib/customers';import { Container, Heading } from '@/design-system/components';import { CLIENT_ICONS } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';import { CustomerCasesCover } from '@/sections/CaseStudyCatalog/visuals/CustomerCasesCover';import { theme } from '@/theme';import { styled } from '@linaria/react';import { IconArrowLeft, IconClock } from '@tabler/icons-react';import Image from 'next/image';-import Link from 'next/link';const CATALOG_LOGO_WIDTHS: Record<string, number> = {'nine-dots': 72,@@ -46,7 +46,7 @@ const StyledContainer = styled(Container)`}`;-const BackLink = styled(Link)`+const BackLink = styled(LocalizedLink)`align-items: center;color: ${theme.colors.secondary.text[80]};display: inline-flex;diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsxindex a5ef06d0db4..beb2bf84e8a 100644--- a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsx@@ -1,15 +1,15 @@import type { CaseStudyCatalogEntry } from '@/lib/customers';import { ArrowRightIcon, CLIENT_ICONS } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';import { CustomerCasesCover } from '@/sections/CaseStudyCatalog/visuals/CustomerCasesCover';import { theme } from '@/theme';import { styled } from '@linaria/react';import Image from 'next/image';-import Link from 'next/link';import { type ComponentProps } from 'react';type CardVariant = 'default' | 'large';-type CardLinkBaseProps = ComponentProps<typeof Link> & {+type CardLinkBaseProps = ComponentProps<typeof LocalizedLink> & {$cardIndex: number;variant: CardVariant;};@@ -19,7 +19,7 @@ function CardLinkBase({variant: _variant,...linkProps}: CardLinkBaseProps) {- return <Link {...linkProps} />;+ return <LocalizedLink {...linkProps} />;}const CardLink = styled(CardLinkBase)<{diff --git a/packages/twenty-website-new/src/sections/Footer/components/Nav.tsx b/packages/twenty-website-new/src/sections/Footer/components/Nav.tsxindex 442f2b13430..97e9e80e1e2 100644--- a/packages/twenty-website-new/src/sections/Footer/components/Nav.tsx+++ b/packages/twenty-website-new/src/sections/Footer/components/Nav.tsx@@ -1,10 +1,10 @@import { FooterNavCta } from '@/sections/Footer/components/FooterNavCta';import { PlusIcon, RectangleFillIcon } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';import type { FooterNavGroupType } from '@/sections/Footer/types';import { theme } from '@/theme';import { NavigationMenu } from '@base-ui/react/navigation-menu';import { styled } from '@linaria/react';-import Link from 'next/link';import React from 'react';const FooterNav = styled.nav`@@ -161,7 +161,7 @@ export function Nav({ groups }: NavProps) {rel="noopener noreferrer"/>) : (- <Link href={link.href} />+ <LocalizedLink href={link.href} />)}>diff --git a/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsx b/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsxindex a02707e2a40..5dcb549e240 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsx@@ -11,8 +11,7 @@ import { theme } from '@/theme';import { Drawer } from '@base-ui/react/drawer';import { Separator } from '@base-ui/react/separator';import { styled } from '@linaria/react';-import Link from 'next/link';-import { usePathname } from 'next/navigation';+import { LocalizedLink, useUnlocalizedPathname } from '@/lib/i18n';import React, { useState } from 'react';const StyledDrawerContent = styled.div`@@ -93,7 +92,7 @@ const navItemStyles = `}`;-const NavItem = styled(Link)`+const NavItem = styled(LocalizedLink)`${navItemStyles}`;@@ -169,7 +168,7 @@ const NavChildItemStyles = `}`;-const NavChildItem = styled(Link)`+const NavChildItem = styled(LocalizedLink)`${NavChildItemStyles}`;@@ -284,14 +283,14 @@ const Divider = styled(Separator)`type NavGroupProps = {item: MenuNavItemType;- pathname: string | null;+ pathname: string;scheme: MenuScheme;};function NavGroup({ item, pathname, scheme }: NavGroupProps) {const hasActiveChild =item.children?.some(- (child) => !child.external && pathname?.startsWith(child.href),+ (child) => !child.external && pathname.startsWith(child.href),) ?? false;const [isOpen, setIsOpen] = useState(hasActiveChild);@@ -345,9 +344,7 @@ function NavGroup({ item, pathname, scheme }: NavGroupProps) {) : (<NavChildItemdata-scheme={scheme}- data-active={- pathname?.startsWith(child.href) || undefined- }+ data-active={pathname.startsWith(child.href) || undefined}href={child.href}/>)@@ -375,7 +372,7 @@ type MenuDrawerProps = {};export function MenuDrawer({ navItems, scheme, socialLinks }: MenuDrawerProps) {- const pathname = usePathname();+ const pathname = useUnlocalizedPathname();const buttonColor = scheme === 'primary' ? 'secondary' : 'primary';const iconFillColor =@@ -406,7 +403,7 @@ export function MenuDrawer({ navItems, scheme, socialLinks }: MenuDrawerProps) {<NavItemdata-scheme={scheme}data-active={- pathname?.startsWith(item.href) || undefined+ pathname.startsWith(item.href) || undefined}href={item.href}/>diff --git a/packages/twenty-website-new/src/sections/Menu/components/Logo.tsx b/packages/twenty-website-new/src/sections/Menu/components/Logo.tsxindex 1812225f348..160364726a8 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Logo.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Logo.tsx@@ -1,16 +1,16 @@import { Logo as LogoIcon } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';import type { MenuScheme } from '@/sections/Menu/types';import { theme } from '@/theme';import { Drawer } from '@base-ui/react/drawer';import { styled } from '@linaria/react';-import Link from 'next/link';const LogoContainer = styled.div`align-items: center;display: grid;`;-const LogoLink = styled(Link)`+const LogoLink = styled(LocalizedLink)`display: grid;text-decoration: none;diff --git a/packages/twenty-website-new/src/sections/Menu/components/Nav.tsx b/packages/twenty-website-new/src/sections/Menu/components/Nav.tsxindex e6f79b1707e..2679c61fc8d 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Nav.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Nav.tsx@@ -10,9 +10,8 @@ import { theme } from '@/theme';import { NavigationMenu } from '@base-ui/react/navigation-menu';import { Separator } from '@base-ui/react/separator';import { styled } from '@linaria/react';+import { LocalizedLink, useUnlocalizedPathname } from '@/lib/i18n';import Image from 'next/image';-import Link from 'next/link';-import { usePathname } from 'next/navigation';import React, { useState } from 'react';const NavList = styled(NavigationMenu.List)`@@ -412,7 +411,7 @@ const DropdownDescription = styled.span`type DropdownContentProps = {items: MenuNavChildItemType[];- pathname: string | null;+ pathname: string;scheme: MenuScheme;};@@ -451,7 +450,7 @@ function DropdownContent({ items, pathname, scheme }: DropdownContentProps) {<DropdownLinkdata-scheme={scheme}data-active={- !child.external && pathname?.startsWith(child.href)+ !child.external && pathname.startsWith(child.href)? true: undefined}@@ -463,7 +462,7 @@ function DropdownContent({ items, pathname, scheme }: DropdownContentProps) {rel="noopener noreferrer"/>) : (- <Link href={child.href} />+ <LocalizedLink href={child.href} />)}>@@ -533,7 +532,7 @@ type NavProps = {};export function Nav({ navItems, scheme }: NavProps) {- const pathname = usePathname();+ const pathname = useUnlocalizedPathname();const hasDropdown = navItems.some((item) => item.children);@@ -553,7 +552,7 @@ export function Nav({ navItems, scheme }: NavProps) {data-active={item.children.some((child) =>- !child.external && pathname?.startsWith(child.href),+ !child.external && pathname.startsWith(child.href),) || undefined}>@@ -588,8 +587,8 @@ export function Nav({ navItems, scheme }: NavProps) {item.href && (<NavLinkdata-scheme={scheme}- data-active={pathname?.startsWith(item.href) || undefined}- render={<Link href={item.href} />}+ data-active={pathname.startsWith(item.href) || undefined}+ render={<LocalizedLink href={item.href} />}>{item.label}</NavLink>diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsxindex 88b7196d606..b2e38dc2891 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsx@@ -9,9 +9,9 @@ import { WebGlMount } from '@/lib/visual-runtime';import type { ThreeCardsIllustrationCardType } from '@/sections/ThreeCards/types';import { THREE_CARDS_VISUALS } from '@/sections/ThreeCards/visuals';import { theme } from '@/theme';+import { LocalizedLink } from '@/lib/i18n';import { css } from '@linaria/core';import { styled } from '@linaria/react';-import Link from 'next/link';import { ThreeCardsCardShape } from './CardShape';const CARD_OUTLINE_COLOR = theme.colors.primary.border[20];@@ -212,7 +212,7 @@ const PartnerActionIconButton = styled.button`}`;-const PartnerActionIconLink = styled(Link)`+const PartnerActionIconLink = styled(LocalizedLink)`align-items: center;appearance: none;background: transparent;diff --git a/yarn.lock b/yarn.lockindex ee13d058109..cdcfe5d8751 100644--- a/yarn.lock+++ b/yarn.lock@@ -60912,6 +60912,12 @@ __metadata:"@gsap/react": "npm:2.1.2""@linaria/core": "npm:^7.0.0""@linaria/react": "npm:^7.0.1"+ "@lingui/cli": "npm:^5.1.2"+ "@lingui/conf": "npm:5.1.2"+ "@lingui/core": "npm:^5.1.2"+ "@lingui/format-po": "npm:5.1.2"+ "@lingui/react": "npm:^5.1.2"+ "@lingui/swc-plugin": "npm:^5.11.0""@lottiefiles/dotlottie-react": "npm:^0.18.10""@react-three/drei": "npm:^10.7.7""@react-three/fiber": "npm:^9.5.0"@@ -60933,6 +60939,7 @@ __metadata:sharp: "npm:^0.33.5"stripe: "npm:^20.3.1"three: "npm:^0.183.2"+ twenty-shared: "workspace:*"zod: "npm:^4.1.11"languageName: unknownlinkType: soft