Add language translation guidelines#6639
Conversation
WalkthroughThis pull request updates the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
CONTRIBUTING.md (1)
85-94: Specify Language for Fenced Code BlockThe tree diagram showing the folder structure (lines 85–94) currently uses a fenced code block without a language specifier. To satisfy markdownlint (MD040) and improve readability, consider specifying a language (e.g.,
text):-``` +```text packages/i18n/src/locales/ ├── en/ │ ├── core.json # Critical translations │ └── translations.json ├── fr/ │ └── translations.json └── [language]/ └── translations.json -``` +```🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
85-85: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CONTRIBUTING.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CONTRIBUTING.md
85-85: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🔇 Additional comments (2)
CONTRIBUTING.md (2)
69-69: New Contribution Bullet AddedThe bullet point “- Add or update translations” is a clear and concise addition to the list of ways to contribute. This helps highlight translation improvements as an encouraged contribution.
77-78: New Language Support Guidelines SectionThe newly inserted “## Contributing to language support” section and its introductory sentence provide a dedicated space for translation contributions. This focused section should help contributors understand the process for adding or updating translations.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
CONTRIBUTING.md (3)
80-84: Detailing the Translation Structure
The “Understanding translation structure” subsection effectively explains the file organization for translations. To further improve clarity, consider linking to a sample directory in the repository if available.
85-94: Add Language Specifier to Fenced Code Block
The code block illustrating the directory structure does not specify a language. This may trigger markdown lint warnings (MD040). Adding a language specifier such asplaintextwill improve syntax highlighting and compliance. Consider this diff:-``` +```plaintext🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
85-85: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
127-183: Comprehensive Contributing Guidelines for Translations and New Languages
The step-by-step instructions covering updating existing translations, adding new translation keys, and integrating new languages are thorough and user-friendly. The clear segmentation (supported by code examples in TypeScript) is effective. For even greater clarity, consider adding screenshots or links to actual translation files in the repository.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
CONTRIBUTING.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CONTRIBUTING.md
85-85: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript)
- GitHub Check: Analyze (python)
🔇 Additional comments (7)
CONTRIBUTING.md (7)
69-69: Clarify Translation Contribution in the Ways-to-Contribute List
The added bullet point “Add or update translations” succinctly highlights translation-related contributions. This aligns well with the PR objective of enhancing language translation guidelines.
77-79: Introduce New Language Support Section
The new "Contributing to language support" section is clearly introduced and provides a nice overview of translation contribution practices. This addition directly addresses the PR’s intent to guide contributors on translations.
95-107: Nested Structure Example is Clear
The “Nested structure” section, along with the JSON example, clearly demonstrates how translation keys should be organized. The snippet is well-formed and informative.
109-118: Translation Formatting Guide & Simple Variable Example
The explanation of using [IntlMessageFormat] for dynamic content is clear and the simple variable example (provided in a JSON code block) is well presented. This makes it easier for contributors to follow best practices for dynamic content formatting.
119-125: Effective Pluralization Example
The pluralization example correctly demonstrates the use of ICU message formatting, helping ensure that contributors handle plural cases appropriately.
184-199: Robust Quality Checklist and Pro Tips
The quality checklist and pro tips sections provide valuable guidance for ensuring translation completeness and consistency. They add an extra layer of quality assurance for contributors.
202-205: Clear Contact and Support Information
The “Need help? Questions and suggestions” section is appropriately placed at the end, providing contributors with clear direction for further assistance. This helps maintain an open channel for feedback and support.
* Add language translation guidelines * fix: minor formatting fix --------- Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
Description
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit