Skip to content

Add language translation guidelines#6639

Merged
sriramveeraghanta merged 2 commits intopreviewfrom
contribution-translations
Feb 19, 2025
Merged

Add language translation guidelines#6639
sriramveeraghanta merged 2 commits intopreviewfrom
contribution-translations

Conversation

@danciaclara
Copy link
Collaborator

@danciaclara danciaclara commented Feb 19, 2025

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • Documentation
    • Introduced a new section with comprehensive, step-by-step guidelines for contributing to language support.
    • Expanded instructions for updating translations, adding new keys, and integrating additional languages.
    • Added a quality checklist to ensure consistency and correctness in translation contributions.
    • Reorganized existing help content for improved clarity and emphasis on translation support.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2025

Walkthrough

This pull request updates the CONTRIBUTING.md file by adding a new section titled “Contributing to language support.” The section provides detailed, step‐by‐step guidelines for adding or updating translations, including the organization of translation files by language, the use of IntlMessageFormat for dynamic content, and specific instructions for introducing new translation keys and languages. It also includes a quality checklist, and the previous help section has been moved to follow the new content.

Changes

File(s) Change Summary
CONTRIBUTING.md Added a “Contributing to language support” section that details file structure, formatting rules (using IntlMessageFormat), translation key updates, new language additions, and includes a quality checklist. Reorganized existing help content.

Possibly related PRs

Suggested reviewers

  • sriramveeraghanta

Poem

I'm just a happy rabbit on a hop,
In docs and guides, I never stop.
New translation tips, aligned with care,
Guiding keys and languages everywhere.
With whiskers twitching in delight,
I celebrate these changes day and night!
🐇✨ Happy coding!


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

85-94: Specify Language for Fenced Code Block

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between cd3fa94 and fb20eb7.

📒 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 Added

The 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 Section

The 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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 as plaintext will 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

📥 Commits

Reviewing files that changed from the base of the PR and between fb20eb7 and 89b4033.

📒 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.

@sriramveeraghanta sriramveeraghanta merged commit 1c6a2fb into preview Feb 19, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the contribution-translations branch February 19, 2025 09:24
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
* Add language translation guidelines

* fix: minor formatting fix

---------

Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
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.

3 participants