d19b7f8485
## Summary The Getting Started pages on the docs site (docs.twenty.com) were only ever available in English, never translated into the other supported languages. **Root cause:** The Getting Started section (added in #19728) was never added to the Crowdin source config (`crowdin-docs.yml`), so its `.mdx` files were never uploaded for translation. Only `user-guide`, `developers`, and `twenty-ui` were configured. This also surfaced a related bug: because the pages had no translations, the navigation generator fell back to the English page path for every language, duplicating paths like `getting-started/introduction` across all 14 language navs. Mintlify treats duplicate cross-language paths as undefined behavior, which broke the language switcher (it always redirected to `/getting-started/introduction`). ## Changes - `.github/crowdin-docs.yml` — add `getting-started/**/*.mdx` as a translation source so the pages get sent to Crowdin. - `packages/twenty-docs/scripts/fix-translated-links.sh` — add `getting-started` link-rewriting rules to match the other sections. - `packages/twenty-docs/scripts/generate-docs-json.ts` — only include a page in a non-default language when its translated file exists; drop empty groups/tabs (removes the duplicate cross-language paths that broke the switcher). - `packages/twenty-docs/docs.json` — regenerated. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/21842?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
#
|
|
# Crowdin CLI configuration for Documentation translations
|
|
# See https://crowdin.github.io/crowdin-cli/configuration for more information
|
|
#
|
|
|
|
"project_id": 2
|
|
"preserve_hierarchy": true
|
|
"base_url": "https://twenty.api.crowdin.com"
|
|
"base_path": ".."
|
|
|
|
files: [
|
|
{
|
|
"source": "packages/twenty-docs/getting-started/**/*.mdx",
|
|
"translation": "packages/twenty-docs/l/%two_letters_code%/getting-started/**/%original_file_name%",
|
|
},
|
|
{
|
|
#
|
|
# MDX documentation files - user-guide
|
|
# Using md type to preserve JSX component structure
|
|
# This prevents Crowdin from reformatting <Warning>, <Accordion>, etc.
|
|
#
|
|
"source": "packages/twenty-docs/user-guide/**/*.mdx",
|
|
"translation": "packages/twenty-docs/l/%two_letters_code%/user-guide/**/%original_file_name%",
|
|
},
|
|
{
|
|
#
|
|
# MDX documentation files - developers
|
|
# Using md type to preserve JSX component structure
|
|
#
|
|
"source": "packages/twenty-docs/developers/**/*.mdx",
|
|
"translation": "packages/twenty-docs/l/%two_letters_code%/developers/**/%original_file_name%",
|
|
},
|
|
{
|
|
#
|
|
# MDX documentation files - twenty-ui
|
|
# Using md type to preserve JSX component structure
|
|
#
|
|
"source": "packages/twenty-docs/twenty-ui/**/*.mdx",
|
|
"translation": "packages/twenty-docs/l/%two_letters_code%/twenty-ui/**/%original_file_name%",
|
|
},
|
|
{
|
|
#
|
|
# Navigation labels template - translated into per-locale navigation.json
|
|
#
|
|
"source": "packages/twenty-docs/navigation/navigation.template.json",
|
|
"translation": "packages/twenty-docs/l/%two_letters_code%/navigation.json",
|
|
}
|
|
]
|
|
|