b027e4bdb1
**i18n** — collapsed the ~22 scattered i18n files into a single module and turned on Spanish alongside French. **Sections** — dropped the old compound pattern (`Section.Root`, `Section.Heading`, …). Reusable layout shells moved to `src/templates/`, atomic bits stay in `design-system/`, and each page now owns its copy in local `_components` blocks instead of pulling it out of shared sections. Data files hold arrays only, no prose. **Copy → `<Trans>`** — A lot of headings were split across several `<HeadingPart>`s just for font styling, which meant each piece was a separate translation string. A translator got "Build your Enterprise CRM" and "at AI Speed" as two unrelated strings and had no way to reorder them for their language. Those are now single `<Trans>` units with placeholders. Same idea for the old `\n` + `white-space: pre-line` line-break trick: replaced with a small `ResponsiveLineBreak` element so the break is doesn't quietly rot, and did a dead-code pass. The de-fragmentation changes the message IDs, so around 60 strings will fall back to English in fr/es until Crowdin re-syncs.
23 lines
631 B
TypeScript
23 lines
631 B
TypeScript
import { defineConfig } from '@lingui/conf';
|
|
import { formatter } from '@lingui/format-po';
|
|
import { SOURCE_LOCALE } from 'twenty-shared/translations';
|
|
|
|
import { WEBSITE_LOCALE_LIST } from './src/lib/i18n/locales';
|
|
|
|
export default defineConfig({
|
|
sourceLocale: SOURCE_LOCALE,
|
|
locales: [...WEBSITE_LOCALE_LIST],
|
|
fallbackLocales: {
|
|
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 }),
|
|
});
|