Skip to content

i18n - docs translations#15724

Merged
FelixMalfait merged 6 commits intomainfrom
i18n
Nov 8, 2025
Merged

i18n - docs translations#15724
FelixMalfait merged 6 commits intomainfrom
i18n

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Nov 8, 2025

Created by Github action

abdulrahmancodes and others added 6 commits November 9, 2025 00:06
…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 introduces automated translation management for the Twenty documentation by pulling French translations from Crowdin and fixing internal links. The main enhancement is a new bash script (fix-translated-links.sh) that automatically adds locale prefixes (e.g., /fr/) to internal documentation links in translated files, ensuring proper navigation in multi-language documentation.

Key Changes:

  • Added automated link-fixing script that processes all language directories dynamically
  • Updated GitHub Actions workflow to run link fixing after pulling translations
  • Changed workflow to use ${{ github.ref }} instead of hardcoded main branch reference
  • Added 30+ new French translation files for developers, UI components, and user guide sections
  • Updated docs.json with French navigation group names ("Guide utilisateur", "Modèle de données", etc.)
  • Fixed internal links in existing French documentation to include /fr/ prefix

The implementation follows a clean post-processing approach where Crowdin pulls translations first, then the script automatically fixes all internal links before committing changes.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it only affects documentation translations and automation
  • The changes are well-structured and low-risk: the bash script uses safe sed operations with backup files, the workflow changes are minimal and improve functionality, and all modifications are isolated to documentation files. The script properly handles edge cases (empty directories, excluded directories) and uses set -e for error handling. No application code is affected.
  • No files require special attention - all changes are straightforward documentation and automation improvements

Important Files Changed

File Analysis

Filename Score Overview
.github/workflows/docs-i18n-pull.yaml 5/5 Workflow updated to use current branch ref and run link-fixing script after pulling translations from Crowdin
packages/twenty-docs/scripts/fix-translated-links.sh 5/5 New bash script that automatically fixes internal documentation links by adding locale prefixes to translated files
packages/twenty-docs/package.json 5/5 Added new fix-links npm script to run the link-fixing script
packages/twenty-docs/docs.json 5/5 Updated French documentation navigation with translated group names and formatting improvements

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Crowdin
    participant Script as fix-translated-links.sh
    participant Repo as Repository
    
    GHA->>Repo: Checkout i18n branch
    GHA->>Crowdin: Pull French translations
    Crowdin-->>Repo: Download .mdx files to fr/ directory
    GHA->>Script: Execute link fixing script
    Script->>Script: Find all language directories
    Script->>Script: Process each .mdx file
    Script->>Script: Replace /user-guide/ with /fr/user-guide/
    Script->>Script: Replace /developers/ with /fr/developers/
    Script->>Script: Replace /twenty-ui/ with /fr/twenty-ui/
    Script-->>Repo: Updated files with locale prefixes
    GHA->>Repo: Commit changes to i18n branch
    GHA->>Repo: Create pull request to main
Loading

38 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@FelixMalfait FelixMalfait merged commit 1bd1165 into main Nov 8, 2025
7 of 8 checks passed
@FelixMalfait FelixMalfait deleted the i18n branch November 8, 2025 20:20
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions bot commented Nov 8, 2025

Fails
🚫

node failed.

Log

Details
�[31mError: �[39m SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
�[90m    at parseJSONFromBytes (node:internal/deps/undici/undici:6433:19)�[39m
�[90m    at successSteps (node:internal/deps/undici/undici:6414:27)�[39m
�[90m    at readAllBytes (node:internal/deps/undici/undici:5380:13)�[39m
�[90m    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)�[39m
danger-results://tmp/danger-results-f916e075.json

Generated by 🚫 dangerJS against 44e591c

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