Skip to content

docs: Fix French navigation labels and translated internal links#15723

Merged
FelixMalfait merged 7 commits intomainfrom
docs/improve-i18n-navigation-and-links
Nov 9, 2025
Merged

docs: Fix French navigation labels and translated internal links#15723
FelixMalfait merged 7 commits intomainfrom
docs/improve-i18n-navigation-and-links

Conversation

@abdulrahmancodes
Copy link
Copy Markdown
Contributor

@abdulrahmancodes abdulrahmancodes commented Nov 8, 2025

Summary

Fixes French documentation navigation labels and internal link redirects to English pages.

Changes

  1. Translated French navigation - All tab/group labels in docs.json now display in French
  2. Automated link fixing - Created fix-translated-links.sh script that adds /fr/ prefix to internal links
  3. CI Integration - Script runs automatically after Crowdin syncs translations

…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.
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh script 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-links npm 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
Loading

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

…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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I had missed the existing script

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it the recommended way of doing things? I feel like we can do something cleaner no?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can merge this for now but curious to have your feedback/recommandations

@FelixMalfait FelixMalfait merged commit 7993e14 into main Nov 9, 2025
46 checks passed
@FelixMalfait FelixMalfait deleted the docs/improve-i18n-navigation-and-links branch November 9, 2025 12:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 9, 2025

Thanks @abdulrahmancodes for your contribution!
This marks your 72nd PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants