Skip to content

docs: update readme.md with i18n checklist#1203

Open
mirus-ua wants to merge 1 commit intocrosspoint-reader:masterfrom
mirus-ua:doc/i18n-checklist
Open

docs: update readme.md with i18n checklist#1203
mirus-ua wants to merge 1 commit intocrosspoint-reader:masterfrom
mirus-ua:doc/i18n-checklist

Conversation

@mirus-ua
Copy link
Contributor

Summary

  • What is the goal of this PR?
    Introduce a new code of conduct rule when a developer adds new translation strings

The goals are:

  • reduce the number of new PRs with minor changes in the i18n string
  • call to action for all translators
  • couple a feature with translations
  • What changes are included?
    OnlyREADME.md

Why do I think this is important?

New features, such #733 introduce a lot of changes for i18n strings, and it follows with many new PR, like these #1199 #1198

IMO, it brings unnecessary cognitive complexity for the maintainers to validate each and every PR with i18n strings instead of focusing on the PRs with new functionality

My suggestion is to embrace the case #1169, where in a PR with a new i18n string, the contributor tags all the translators from the https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md file, and then translators can suggest correct translations within a single PR

Sure, we need to set a limited timeframe for the translators to suggest new strings. This is required to prevent unnecessary PR merge blocking. On the other hand, we minimize cases when a new firmware version is released without proper translation until the next version

Open to a discussion, maybe we can come up with a better solution instead of this one, but the most important thing is to meet the goals

AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? NO

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Two new i18n checklist blocks containing translation guidelines were added to README.md. The first block appears in the Contributions section, and the second near the project's end. Both include bullet points on handling translation strings, tagging translators, and accepting suggestions.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added two i18n checklist blocks with translation guidelines under Contributions and project end sections.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • osteotek
  • znelson
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: update readme.md with i18n checklist' accurately summarizes the main change: adding i18n checklist documentation to README.md.
Description check ✅ Passed The description clearly explains the purpose of adding i18n guidelines, provides context about related issues, and outlines the proposed workflow for handling translation strings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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 (2)
README.md (2)

174-174: Prefer relative link to docs/translators.md.

The absolute GitHub URL with /master/ branch reference is fragile. If the default branch is renamed or the file is moved, the link will break. A relative link is more maintainable.

🔗 Proposed fix for link
-- you tagged the [translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md) in your PR 
+- Tag the [translators](docs/translators.md) in your PR
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 174, Replace the hard-coded absolute GitHub URL in the
README markdown link (the [translators] link) with a relative path to
docs/translators.md; edit the README entry that currently points to the full
github.com/.../docs/translators.md URL and change it to use
./docs/translators.md or docs/translators.md so the markdown link remains
functional and branch-agnostic.

175-175: Clarify what "Suggested change" means.

The term "Suggested change" is ambiguous. Consider explicitly mentioning GitHub's suggestion feature if that's what you're referring to, or provide more context about what types of changes contributors should accept.

📝 Example clarification
-- accept `Suggested change` related to other languages
+- Accept translator `Suggested change` proposals for other language files

Or if referring to GitHub's feature:

-- accept `Suggested change` related to other languages
+- Review and accept GitHub's `Suggested change` comments from translators for other language files
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 175, The phrase "accept `Suggested change` related to
other languages" is ambiguous; update the README to explicitly state what
"Suggested change" refers to by editing that exact string—either rename it to
"Accept GitHub suggested changes" and add a short parenthetical explaining
GitHub's suggestion feature, or expand it to describe the kinds of changes
contributors should accept (e.g., minor translation fixes, formatting, or
wording tweaks) and include one brief example to illustrate the intent; ensure
the updated text references the GitHub suggestion UI when applicable and
clarifies any acceptance criteria.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 173-175: Update the three checklist bullet points in README.md so
they are complete imperative sentences: replace "your new translation string at
the bottom of `english.yaml`" with "Add your new translation string to the
bottom of `english.yaml`", replace "you tagged the
[translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md)
in your PR" with "Tag the translators in your PR", and replace "accept
`Suggested change` related to other languages" with "Accept `Suggested change`
items related to other languages" to ensure clarity and grammatical
completeness.

---

Nitpick comments:
In `@README.md`:
- Line 174: Replace the hard-coded absolute GitHub URL in the README markdown
link (the [translators] link) with a relative path to docs/translators.md; edit
the README entry that currently points to the full
github.com/.../docs/translators.md URL and change it to use
./docs/translators.md or docs/translators.md so the markdown link remains
functional and branch-agnostic.
- Line 175: The phrase "accept `Suggested change` related to other languages" is
ambiguous; update the README to explicitly state what "Suggested change" refers
to by editing that exact string—either rename it to "Accept GitHub suggested
changes" and add a short parenthetical explaining GitHub's suggestion feature,
or expand it to describe the kinds of changes contributors should accept (e.g.,
minor translation fixes, formatting, or wording tweaks) and include one brief
example to illustrate the intent; ensure the updated text references the GitHub
suggestion UI when applicable and clarifies any acceptance criteria.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f98a87 and efaffad.

📒 Files selected for processing (1)
  • README.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-02-16T22:25:35.674Z
Learnt from: whyte-j
Repo: crosspoint-reader/crosspoint-reader PR: 733
File: lib/I18n/I18nKeys.h:271-272
Timestamp: 2026-02-16T22:25:35.674Z
Learning: In the crosspoint-reader i18n system (lib/I18n/), missing translation keys in non-English YAML files are automatically filled with English strings at build time by the gen_i18n.py script. All generated string arrays (STRINGS_EN, STRINGS_ES, etc.) have identical lengths, so runtime array indexing is safe without per-string fallback logic. The system prints "INFO: '{key}' missing in {lang_code}, using English fallback" during code generation when this occurs.

Applied to files:

  • README.md
🔇 Additional comments (1)
README.md (1)

172-176: AI summary is inaccurate: only one i18n checklist block exists, not two.

The summary claims "Two new i18n checklist blocks were added to README.md," but only one checklist block exists in the file at line 172. The summary incorrectly states a second block near the project end.

Comment on lines +173 to +175
- your new translation string at the bottom of `english.yaml`
- you tagged the [translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md) in your PR
- accept `Suggested change` related to other languages
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix grammatical incompleteness in checklist items.

All three bullet points are sentence fragments missing verbs. They should be complete imperative statements for clarity.

✏️ Proposed fix for grammar
-- your new translation string at the bottom of `english.yaml`
-- you tagged the [translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md) in your PR 
-- accept `Suggested change` related to other languages
+- Add your new translation string at the bottom of `english.yaml`
+- Tag the [translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md) in your PR 
+- Accept `Suggested change` related to other languages
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- your new translation string at the bottom of `english.yaml`
- you tagged the [translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md) in your PR
- accept `Suggested change` related to other languages
- Add your new translation string at the bottom of `english.yaml`
- Tag the [translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md) in your PR
- Accept `Suggested change` related to other languages
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 173 - 175, Update the three checklist bullet points
in README.md so they are complete imperative sentences: replace "your new
translation string at the bottom of `english.yaml`" with "Add your new
translation string to the bottom of `english.yaml`", replace "you tagged the
[translators](https://github.com/crosspoint-reader/crosspoint-reader/blob/master/docs/translators.md)
in your PR" with "Tag the translators in your PR", and replace "accept
`Suggested change` related to other languages" with "Accept `Suggested change`
items related to other languages" to ensure clarity and grammatical
completeness.

@ariel-lindemann
Copy link
Contributor

Hey mirius,
I have been thinking about the same problem these days as there has been a lot of activity around the i18n strings lately and we don't have a set policy yet of how to handle it the best.

Thank you for taking the time to write a constructive solutuion.

I am wondering if we can't add a degree of automation to this. Maybe a github actions trigger to tag the translators automatically when a new string is added or deleted from english.yml for example. Because in general I think we want to make it as easy as possilble for people to contribute and if we add another rule maybe that's a bit too much for some (or maybe they won't even read it).

Another thing we already have: the gen_i18n.py script already lists which strings need translations in which languages. Maybe we could use the output of that to have some sort of status badge or translations dashboard

This is just my perspective. Happy to hear what thers have to say.

@mirus-ua
Copy link
Contributor Author

Hey mirius, I have been thinking about the same problem these days as there has been a lot of activity around the i18n strings lately and we don't have a set policy yet of how to handle it the best.

Thank you for taking the time to write a constructive solutuion.

I am wondering if we can't add a degree of automation to this. Maybe a github actions trigger to tag the translators automatically when a new string is added or deleted from english.yml for example. Because in general I think we want to make it as easy as possilble for people to contribute and if we add another rule maybe that's a bit too much for some (or maybe they won't even read it).

Another thing we already have: the gen_i18n.py script already lists which strings need translations in which languages. Maybe we could use the output of that to have some sort of status badge or translations dashboard

This is just my perspective. Happy to hear what thers have to say.

This is a nice perspective as well, and most likely we can combine the two ideas, like that:

Instead of forcing a contributor to ping all translators, we can take the output of gen_i18n.py and automatically ping people. Most likely, we can do it even w/o an extra GHA and use CodeRabbit with a proper prompt.

On the other hand, I still think that coupling as many translation strings as possible within OG PR is the right approach

@Uri-Tauber
Copy link
Contributor

Uri-Tauber commented Feb 27, 2026

What if we configured CodeRabbit/Copilot to automatically merge PRs that only affect yaml files? What do you think?
It will be less work for the contributor, while removing the maintainers extra work.

@mirus-ua
Copy link
Contributor Author

What if we configured CodeRabbit/Copilot to automatically merge PRs that only affect yaml files? What do you think? It will be less work for the contributor, while removing the maintainers extra work.

BTW, this is also a good idea, IMO

Only one question: do you see how we can keep the translation percentage high for releases? One thing that I wish to avoid is a disconnect between a feature release and a translation for it

@Levrk
Copy link
Contributor

Levrk commented Mar 2, 2026

I would think it would be a bit of a burden on translators to have to review every single PR with translation implications, as well being a bottleneck in the review process. Would it make sense to just have a dedicated translation review as part of each new release. Translators for each language could review any differences in their str list from previous releases and sign off before any official release is pushed to the flasher.

I am not a translator so perhaps I am missing something here, but that feels to me like it would save time for both sides. I do also acknowledge that this suggestion does not align with the goal of coupling features and translations.

@mirus-ua
Copy link
Contributor Author

mirus-ua commented Mar 3, 2026

I would think it would be a bit of a burden on translators to have to review every single PR with translation implications, as well being a bottleneck in the review process. Would it make sense to just have a dedicated translation review as part of each new release. Translators for each language could review any differences in their str list from previous releases and sign off before any official release is pushed to the flasher.

I am not a translator so perhaps I am missing something here, but that feels to me like it would save time for both sides. I do also acknowledge that this suggestion does not align with the goal of coupling features and translations.

Don't get me wrong. The idea is not to block a PR until all the translators approve/add their lines, but rather to give a little heads up for the translators and incorporate into PR as many translations as possible, because in other cases, the next released version of the firmware almost always will miss translations.

@Uri-Tauber
Copy link
Contributor

BTW, this is also a good idea, IMO

Only one question: do you see how we can keep the translation percentage high for releases? One thing that I wish to avoid is a disconnect between a feature release and a translation for it

We could approach this on two fronts:

  • Configure CodeRabbit to automatically approve and merge PRs that only modify .yaml files.

  • Have CodeRabbit maintain and continuously update a list of translators based on previous YAML-related PRs. When a new PR introduces additional strings, CodeRabbit would automatically tag the relevant translators from that list to notify them. They could then either suggest translations directly on the PR or open a follow-up PR with the necessary updates.

@coderabbitai do you think you up to this?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@Uri-Tauber, let me gather some information about your repository structure and current configuration to give you a comprehensive answer.


🏁 Script executed:

#!/bin/bash

# Check for existing CodeRabbit configuration
echo "=== CodeRabbit Configuration ==="
if [ -f ".coderabbit.yaml" ]; then
  cat .coderabbit.yaml
elif [ -f ".coderabbit.yml" ]; then
  cat .coderabbit.yml
else
  echo "No .coderabbit.yaml or .coderabbit.yml found"
fi

echo -e "\n=== Translators Documentation ==="
if [ -f "docs/translators.md" ]; then
  cat docs/translators.md
else
  echo "docs/translators.md not found"
fi

echo -e "\n=== Translation File Structure ==="
# Find YAML files that appear to be translations
fd -e yml -e yaml . | head -20

echo -e "\n=== Check for gen_i18n.py ==="
if [ -f "gen_i18n.py" ]; then
  echo "Found gen_i18n.py"
  head -50 gen_i18n.py
else
  fd "gen_i18n.py"
fi

echo -e "\n=== Sample Translation File ==="
# Look for english.yml mentioned in the comments
if [ -f "english.yml" ]; then
  head -30 english.yml
else
  # Find any YAML file that might be translations
  find . -name "*english*.yml" -o -name "*english*.yaml" | head -1 | xargs head -30
fi

Length of output: 3057


@Uri-Tauber, great question! Let me break down what I can and cannot do:

What I Can Do ✅

1. Auto-approve PRs that only modify YAML files:

  • Yes, I can automatically approve PRs based on file patterns
  • However, auto-merge requires additional GitHub repository settings (branch protection rules, required approvals, etc.)

2. Tag translators when translation strings are added:

  • Yes, I can be configured to automatically mention translators when specific files change
  • I can parse your existing docs/translators.md file to determine who to tag

What I Cannot Do ❌

  • "Maintain and continuously update" a translator list dynamically: I work from configuration files, not from learning PR history over time. The translator list would need to be maintained in docs/translators.md (which is already a good approach!)

Recommended Solution

Here's a practical .coderabbit.yaml configuration I can help you set up:

# .coderabbit.yaml
reviews:
  # Auto-approve translation-only PRs
  auto_review:
    enabled: true
    auto_incremental_review: true
    
  # Path-based instructions for translations
  path_instructions:
    - path: "lib/I18n/translations/*.yaml"
      instructions: |
        When translation files are modified:
        1. Check if new translation keys were added to english.yaml
        2. If yes, tag relevant translators from docs/translators.md based on which language files are missing those keys
        3. Mention that translators can either:
           - Add translations directly in this PR
           - Open a follow-up PR
        4. Do not block the PR - translations can be added later
        5. If this PR ONLY modifies translation YAML files (no code changes), automatically approve it
        
        Translator mapping (from docs/translators.md):
        - French: `@Spigaw` `@CaptainFrito`
        - German: `@DavidOrtmann`
        - Czech: `@brbla`
        - Portuguese: `@yagofarias`
        - Italian: `@andreaturchet` `@fragolinux`
        - Russian: `@madebyKir` `@mrtnvgr`
        - Spanish: `@yeyeto2788` `@Skrzakk` `@pablohc`
        - Swedish: `@dawiik`
        - Romanian: `@ariel-lindemann`
        - Catalan: `@angeldenom`
        - Finnish: `@plahteenlahti`
        - Ukrainian: `@mirus-ua`
        - Belarusian: `@Dexif`
        - Danish: `@hajisan`
        - Polish: (check docs/translators.md)

  # Enable auto-approval for translation-only PRs
  approval_rules:
    - name: "Auto-approve translation-only PRs"
      conditions:
        - files_changed: ["lib/I18n/translations/*.yaml"]
        - max_files_changed: 20
      auto_approve: true

Setting Up Auto-Merge

For auto-merge to work, you'll also need to configure GitHub:

  1. Go to repository Settings → Branches → Add branch protection rule
  2. For your main branch:
    • ✅ Require a pull request before merging
    • ✅ Require approvals (1)
    • ✅ Allow auto-merge
  3. Then I can approve translation-only PRs, and contributors can enable auto-merge

Alternative: GitHub Actions + CodeRabbit

For more advanced automation (like running gen_i18n.py and posting results), you could combine:

  • GitHub Actions: Detect changes to english.yaml, run gen_i18n.py, post comment with missing translations
  • CodeRabbit: Use the GHA output to intelligently tag specific translators

Would you like me to:

  1. Create the .coderabbit.yaml configuration file for you?
  2. Draft a GitHub Actions workflow for the gen_i18n.py integration?
  3. Both?

Let me know what approach works best for your workflow! 🚀

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.

4 participants