docs: Fix French navigation labels and translated internal links#15723
docs: Fix French navigation labels and translated internal links#15723FelixMalfait merged 7 commits intomainfrom
Conversation
…ity by consolidating page arrays into single-line entries. Updated French translations for various sections, including user guide and developer resources, ensuring consistency in terminology.
…ks in translated documentation. Update `package.json` to include a new script for link fixing and modify the workflow to run this script before committing changes.
…lated documentation. Consolidate link replacement commands for user-guide, developers, and twenty-ui sections, ensuring consistency across language directories.
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR enhances the French documentation workflow by fixing two key issues: translating navigation labels from English to French in docs.json, and automatically correcting internal links in translated documentation to include the proper locale prefix.
Key Changes
- Navigation Labels: Translated all French tab and group labels (e.g., "User Guide" → "Guide utilisateur", "Developers" → "Développeurs", "Getting Started" → "Prise en main")
- Link Fixing Automation: Created
fix-translated-links.shscript that automatically prefixes internal documentation links with the language code (e.g.,/user-guide/→/fr/user-guide/) - Workflow Integration: Integrated the link-fixing script into the Crowdin pull workflow to run automatically after translations are downloaded
- Developer Convenience: Added
fix-linksnpm script for manual execution during development
Technical Approach
The link-fixing script is well-designed with:
- Automatic language directory detection
- Exclusion of non-language directories to prevent false positives
- Proper error handling with
set -e - Clean-up of backup files created by
sed - Support for future additional languages beyond French
Code Quality
All changes are clean, well-structured, and follow bash scripting best practices. The JSON formatting changes improve readability while maintaining valid structure.
Confidence Score: 5/5
- This PR is safe to merge with no identified risks
- The changes are focused on documentation infrastructure improvements with no impact on runtime code. The bash script follows best practices with proper error handling, the workflow integration is straightforward, and the JSON changes are purely cosmetic improvements. All files have valid syntax and logic.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| packages/twenty-docs/scripts/fix-translated-links.sh | 5/5 | New bash script to automatically fix internal documentation links by adding locale prefixes; script is well-structured with proper error handling |
| .github/workflows/docs-i18n-pull.yaml | 5/5 | Integrated link-fixing script into workflow after Crowdin pulls; updated commit message to reflect the additional step |
| packages/twenty-docs/docs.json | 5/5 | Translated French navigation labels from English to French and reformatted page arrays for consistency |
| packages/twenty-docs/package.json | 5/5 | Added fix-links npm script to enable manual execution of the link-fixing script |
Sequence Diagram
sequenceDiagram
participant GHA as GitHub Actions
participant Crowdin as Crowdin API
participant Script as fix-translated-links.sh
participant Docs as Documentation Files
participant Git as Git Repository
GHA->>GHA: Trigger (schedule/manual)
GHA->>Git: Checkout main branch
GHA->>Git: Setup i18n branch
GHA->>Crowdin: Download French translations
Crowdin-->>Docs: Pull translated .mdx files
GHA->>Script: Execute fix-translated-links.sh
Script->>Docs: Detect language directories (fr/)
Script->>Docs: Fix /user-guide/ → /fr/user-guide/
Script->>Docs: Fix /developers/ → /fr/developers/
Script->>Docs: Fix /twenty-ui/ → /fr/twenty-ui/
Script->>Script: Remove .bak files
Script-->>GHA: Links fixed
GHA->>Git: Stage all changes
GHA->>Git: Commit with updated message
GHA->>Git: Push to i18n branch
GHA->>Git: Create/Update PR to main
4 files reviewed, no comments
…uide and developer sections. Adjusted internal links in various files to include the correct language prefix, enhancing navigation for French-speaking users.
| **Important :** Modifiez uniquement les paramètres explicitement mentionnés dans ce guide. Modifier d'autres configurations peut entraîner des problèmes. | ||
|
|
||
| Consultez les documents [Configurer les Variables d’Environnement](https://docs.twenty.com/developers/self-hosting/setup) pour la configuration avancée. Toutes les variables d'environnement doivent être déclarées dans le fichier docker-compose.yml au niveau du serveur et/ou du travailleur, selon la variable. | ||
| Consultez les documents [Configurer les Variables d’Environnement](https://docs.twenty.com/fr/developers/self-hosting/setup) pour la configuration avancée. Toutes les variables d'environnement doivent être déclarées dans le fichier docker-compose.yml au niveau du serveur et/ou du travailleur, selon la variable. |
There was a problem hiding this comment.
This is not a sustainable solution because it will be overwritten when translations, we need to switch to relative links or do something smarter I think
There was a problem hiding this comment.
OK I had missed the existing script
There was a problem hiding this comment.
Is it the recommended way of doing things? I feel like we can do something cleaner no?
There was a problem hiding this comment.
I can merge this for now but curious to have your feedback/recommandations
|
Thanks @abdulrahmancodes for your contribution! |

Summary
Fixes French documentation navigation labels and internal link redirects to English pages.
Changes
docs.jsonnow display in Frenchfix-translated-links.shscript that adds/fr/prefix to internal links