Skip to content

refactor: Move translated docs to /l/{locale}/ directory structure#15726

Merged
FelixMalfait merged 12 commits intomainfrom
docs/organize-locales-under-l
Nov 9, 2025
Merged

refactor: Move translated docs to /l/{locale}/ directory structure#15726
FelixMalfait merged 12 commits intomainfrom
docs/organize-locales-under-l

Conversation

@abdulrahmancodes
Copy link
Copy Markdown
Contributor

No description provided.

…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.
…uide and developer sections. Adjusted internal links in various files to include the correct language prefix, enhancing navigation for French-speaking users.
…uding sections on API, webhooks, best practices, and workflows. Updated `docs.json` to reflect new entries and ensure consistency across language directories.
- Reorganize French docs from /fr/ to /l/fr/ for cleaner organization
- Update Crowdin config to output translations to /l/{locale}/
- Update fix-translated-links.sh to work with /l/ directory structure
- Update docs.json to use /l/fr/ paths (URLs will be /l/fr/...)
- Fix all internal links in French docs to use /l/fr/ prefix

This structure keeps locale-specific content organized under /l/ and
scales better for future languages (es, de, etc.)
- Remove commented-out code and unnecessary comments for clarity
- Streamline the process of fixing internal links to align with the new /l/{locale}/ directory structure
- Enhance maintainability of the script for future updates
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 restructures the translated documentation from a flat {locale}/ directory structure to a more organized /l/{locale}/ pattern. The change affects 71 files, primarily moving French documentation from packages/twenty-docs/fr/ to packages/twenty-docs/l/fr/.

Key changes:

  • Updated crowdin.yml to output translations to /l/{locale}/ instead of {locale}/
  • Refactored fix-translated-links.sh to work with the new structure and updated link patterns to include the /l/ prefix
  • Updated docs.json navigation config with 188 path changes for French documentation
  • Moved all 66 French MDX files to the new location
  • Updated internal links in content files to use /l/fr/ prefix

Issues found:

  • Broken links to /l/fr/developers/local-setup which doesn't exist (referenced in introduction and docker-compose pages)

Confidence Score: 4/5

  • Safe to merge with minor documentation link issues that should be addressed
  • The refactoring is well-executed with consistent updates across configuration, scripts, and content. However, broken links to the non-existent French local-setup page reduce confidence from 5 to 4. These are not critical runtime errors but will create a poor user experience for French documentation readers.
  • packages/twenty-docs/l/fr/developers/introduction.mdx and packages/twenty-docs/l/fr/developers/self-hosting/docker-compose.mdx contain broken links to /l/fr/developers/local-setup

Important Files Changed

File Analysis

Filename Score Overview
crowdin.yml 5/5 Updated translation paths to include /l/ prefix for locale-based directory structure
packages/twenty-docs/scripts/fix-translated-links.sh 5/5 Refactored to work with new /l/{locale}/ structure, simplified directory detection logic
packages/twenty-docs/docs.json 5/5 Updated all French documentation paths from fr/ to l/fr/ prefix throughout navigation structure
packages/twenty-docs/l/fr/developers/introduction.mdx 4/5 Moved from fr/ to l/fr/ with updated internal links, but references non-existent /l/fr/developers/local-setup

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Crowdin as Crowdin Service
    participant Script as fix-translated-links.sh
    participant Docs as Documentation System
    
    Dev->>Crowdin: Push English MDX files
    Note over Dev,Crowdin: Source: packages/twenty-docs/{section}/**/*.mdx
    
    Crowdin->>Crowdin: Translate content
    Note over Crowdin: Translators work on content
    
    Crowdin->>Docs: Pull translations to /l/{locale}/ directory
    Note over Docs: New structure: packages/twenty-docs/l/fr/{section}/**/*.mdx
    
    Script->>Docs: Scan /l/{locale}/ directories
    Script->>Script: Process each locale
    
    loop For each MDX file
        Script->>Docs: Update href="/user-guide/" to href="/l/{locale}/user-guide/"
        Script->>Docs: Update href="/developers/" to href="/l/{locale}/developers/"
        Script->>Docs: Update markdown links similarly
        Script->>Docs: Update full docs.twenty.com URLs
    end
    
    Script->>Docs: Clean up .bak files
    
    Note over Docs: All internal links now use /l/{locale}/ prefix
    Note over Docs: docs.json updated with new paths
Loading

Additional Comments (1)

  1. packages/twenty-docs/l/fr/developers/self-hosting/docker-compose.mdx, line 1 (link)

    logic: This file also references the non-existent /l/fr/developers/local-setup page (full URL in content).

71 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Base automatically changed from docs/improve-i18n-navigation-and-links to main November 9, 2025 12:16
@FelixMalfait FelixMalfait enabled auto-merge (squash) November 9, 2025 12:20
@FelixMalfait FelixMalfait merged commit a21680d into main Nov 9, 2025
46 checks passed
@FelixMalfait FelixMalfait deleted the docs/organize-locales-under-l branch November 9, 2025 12:22
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 9, 2025

Thanks @abdulrahmancodes for your contribution!
This marks your 73rd 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