Skip to content

Conversation

@purpole
Copy link
Contributor

@purpole purpole commented Nov 6, 2025

Fixes a small typo in the english OSD description.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected a spelling error ("Remaning" → "Remaining") in flight time estimate messaging and descriptions.
    • Updated corresponding translation keys and messages across all supported locales to ensure consistent display.
    • Fixed on-screen display label to use the corrected wording so users see the accurate flight time estimate text.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

Walkthrough

Corrected a misspelled locale key across multiple language message files and updated the corresponding key usage in the OSD tab JS: "osdTextElementRemaningTimeEstimate" → "osdTextElementRemainingTimeEstimate" and "osdDescElementRemaningTimeEstimate" → "osdDescElementRemainingTimeEstimate".

Changes

Cohort / File(s) Summary
Locale files (multiple languages)
locales/en/messages.json, locales/ca/messages.json, locales/da/messages.json, locales/de/messages.json, locales/es/messages.json, locales/eu/messages.json, locales/fr/messages.json, locales/gl/messages.json, locales/it/messages.json, locales/ja/messages.json, locales/ko/messages.json, locales/nl/messages.json, locales/pl/messages.json, locales/pt/messages.json, locales/pt_BR/messages.json, locales/ru/messages.json, locales/uk/messages.json, locales/zh_CN/messages.json, locales/zh_TW/messages.json
Renamed two locale keys in each file: osdTextElementRemaningTimeEstimateosdTextElementRemainingTimeEstimate and osdDescElementRemaningTimeEstimateosdDescElementRemainingTimeEstimate. Message texts preserved (minor English text fix in en).
JS usage update
src/js/tabs/osd.js
Updated code to reference the corrected locale keys (osdTextElementRemainingTimeEstimate, osdDescElementRemainingTimeEstimate) instead of the old misspelled keys.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Potential hotspots to check:

  • src/js/tabs/osd.js — ensure all key references updated and no remaining usages of old keys.
  • Any tests or templates that reference the old locale keys.
  • Integration with translation extraction or build tooling that expects the old keys.

Suggested labels

Translation

Suggested reviewers

  • haslinghuis
  • nerdCopter
  • VitroidFPV

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but accurately describes the typo fix. However, it does not follow the repository's PR template which requires specific sections and considerations. Consider following the repository's PR template more closely. Include sections like issue references (if applicable) and verify compliance with guidelines.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: fixing a typo in the OSD description by correcting 'Remaning' to 'Remaining' across multiple locale files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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: 0

🧹 Nitpick comments (1)
locales/en/messages.json (1)

6073-6077: Fix typo across all locales if addressing key naming (coordinated effort required).

The misspelled keys osdTextElementRemaningTimeEstimate and osdDescElementRemaningTimeEstimate are referenced in src/js/tabs/osd.js (lines 1281–1282) and duplicated across all 32 locale files. Correcting this requires updates to:

  • src/js/tabs/osd.js (code references)
  • All locale files (locales/*/messages.json)
  • Crowdin string mappings

Estimated ~66 locations total. Recommend as post-PR cleanup when coordinating with translation platform.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1b74ab and 5b2fe41.

📒 Files selected for processing (1)
  • locales/en/messages.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: syahmizul
Repo: betaflight/betaflight-configurator PR: 4516
File: src/js/tabs/osd.js:3544-3559
Timestamp: 2025-06-14T13:43:10.231Z
Learning: In the Betaflight Configurator OSD positioning feature (src/js/tabs/osd.js), the elementWidth and elementHeight calculations use limits.maxX - limits.minX and limits.maxY - limits.minY without adding 1. While adding 1 would be mathematically correct for inclusive bounds, it causes visual centering issues where elements appear off-center. The current calculation produces better visual centering results, so the +1 correction should be avoided to maintain proper visual alignment.
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4490
File: locales/en/messages.json:1534-1545
Timestamp: 2025-05-26T11:37:09.758Z
Learning: In the Betaflight Configurator repository, only English messages should be added directly to `locales/en/messages.json`; other language translations are handled via Crowdin automation and should not be manually updated in PRs.
📚 Learning: 2025-05-26T11:37:09.758Z
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4490
File: locales/en/messages.json:1534-1545
Timestamp: 2025-05-26T11:37:09.758Z
Learning: In the Betaflight Configurator repository, only English messages should be added directly to `locales/en/messages.json`; other language translations are handled via Crowdin automation and should not be manually updated in PRs.

Applied to files:

  • locales/en/messages.json
📚 Learning: 2025-08-11T19:10:56.992Z
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4567
File: locales/en/messages.json:7724-7728
Timestamp: 2025-08-11T19:10:56.992Z
Learning: In the Betaflight Configurator project, only English language entries are added directly to locales/en/messages.json. Translations for other languages are handled through an outsourced process and should not be suggested as part of code reviews.

Applied to files:

  • locales/en/messages.json
🔇 Additional comments (1)
locales/en/messages.json (1)

6077-6079: LGTM: typo fixed in description.

"remaning" → "remaining" reads correctly and matches existing style.

@haslinghuis haslinghuis moved this to App in 2025.12.0 Nov 6, 2025
@haslinghuis haslinghuis added this to the 2025.12 milestone Nov 6, 2025
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: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b2fe41 and 5fa2785.

📒 Files selected for processing (20)
  • locales/ca/messages.json (1 hunks)
  • locales/da/messages.json (1 hunks)
  • locales/de/messages.json (1 hunks)
  • locales/en/messages.json (1 hunks)
  • locales/es/messages.json (1 hunks)
  • locales/eu/messages.json (1 hunks)
  • locales/fr/messages.json (1 hunks)
  • locales/gl/messages.json (1 hunks)
  • locales/it/messages.json (1 hunks)
  • locales/ja/messages.json (1 hunks)
  • locales/ko/messages.json (1 hunks)
  • locales/nl/messages.json (1 hunks)
  • locales/pl/messages.json (1 hunks)
  • locales/pt/messages.json (1 hunks)
  • locales/pt_BR/messages.json (1 hunks)
  • locales/ru/messages.json (1 hunks)
  • locales/uk/messages.json (1 hunks)
  • locales/zh_CN/messages.json (1 hunks)
  • locales/zh_TW/messages.json (1 hunks)
  • src/js/tabs/osd.js (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • locales/pl/messages.json
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-05-26T11:37:09.758Z
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4490
File: locales/en/messages.json:1534-1545
Timestamp: 2025-05-26T11:37:09.758Z
Learning: In the Betaflight Configurator repository, only English messages should be added directly to `locales/en/messages.json`; other language translations are handled via Crowdin automation and should not be manually updated in PRs.

Applied to files:

  • locales/zh_CN/messages.json
  • locales/en/messages.json
📚 Learning: 2025-08-11T19:10:56.992Z
Learnt from: haslinghuis
Repo: betaflight/betaflight-configurator PR: 4567
File: locales/en/messages.json:7724-7728
Timestamp: 2025-08-11T19:10:56.992Z
Learning: In the Betaflight Configurator project, only English language entries are added directly to locales/en/messages.json. Translations for other languages are handled through an outsourced process and should not be suggested as part of code reviews.

Applied to files:

  • locales/en/messages.json
📚 Learning: 2025-06-14T13:43:10.231Z
Learnt from: syahmizul
Repo: betaflight/betaflight-configurator PR: 4516
File: src/js/tabs/osd.js:3544-3559
Timestamp: 2025-06-14T13:43:10.231Z
Learning: In the Betaflight Configurator OSD positioning feature (src/js/tabs/osd.js), the elementWidth and elementHeight calculations use limits.maxX - limits.minX and limits.maxY - limits.minY without adding 1. While adding 1 would be mathematically correct for inclusive bounds, it causes visual centering issues where elements appear off-center. The current calculation produces better visual centering results, so the +1 correction should be avoided to maintain proper visual alignment.

Applied to files:

  • locales/en/messages.json
🔇 Additional comments (18)
locales/da/messages.json (1)

5988-5994: Verification complete — all locales updated consistently.

Both verification checks passed:

  • ✓ No stale "RemaningTimeEstimate" (typo) keys remain
  • ✓ All 20 locale files contain the corrected osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate keys

The rename is complete and consistent across the codebase.

locales/gl/messages.json (1)

5199-5205: Verification complete—rename is consistent and properly migrated.

Script confirmed:

  • No old typoed keys remain in the codebase
  • New keys present across all 20 locale files
  • UI code at src/js/tabs/osd.js:1281–1282 correctly references the new keys

The typo fix is complete and safely applied without stragglers.

locales/ja/messages.json (1)

5981-5986: Typo fix verified and complete

All verification checks passed: no stale misspelled keys remain, corrected keys are present in all locale files, and no app code references the old misspelled keys. The change is consistent across the codebase.

locales/pt_BR/messages.json (1)

5376-5381: OSD key spelling correction verified.

Confirmed: corrected keys osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate are present in the locale file (lines 5376, 5380) and actively used in src/js/tabs/osd.js (lines 1281–1282). No stale references to the old misspelled keys remain.

src/js/tabs/osd.js (1)

1281-1282: LGTM! Typo correction applied correctly.

The spelling fix from "Remaning" to "Remaining" is correct, and both the text and description locale keys have been updated consistently.

locales/it/messages.json (1)

5984-5990: Verification complete—all checks passed. Approved.

  • ✓ No stale references to old "Remaning" keys
  • ✓ Italian locale contains both osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate
  • ✓ All locales have parity on both new keys
locales/pt/messages.json (1)

5984-5989: Typo fix and key rename verified—no lingering old keys found.

The corrected keys osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate are properly defined in the locale file and consistently referenced in src/js/tabs/osd.js (lines 1281–1282). No traces of the old misspelled variant remain.

locales/fr/messages.json (1)

4576-4582: Verification confirms all changes are correct and complete

The script confirms:

  • No old misspelled keys (Remaning) remain anywhere
  • New keys (Remaining) are properly referenced in src/js/tabs/osd.js (lines 1281–1282)
  • All locale files have been consistently updated with the corrected spelling

Code is ready to merge.

locales/nl/messages.json (1)

3858-3864: Typo correction properly applied.

The OSD description keys have been correctly updated from the misspelled "Remaning" to the correct "Remaining". The message content is preserved unchanged, and the changes align with the coordinated corrections across other locale files mentioned in the enriched summary.

locales/ko/messages.json (1)

5953-5959: LGTM — typo fixed and keys fully synchronized across all locales and code.

Verification confirms:

  • No lingering "Remaning…" spellings remain anywhere in the repo
  • New corrected keys present in all 16 locale files (en, de, es, fr, it, ja, nl, pl, pt, pt_BR, ru, uk, zh_CN, zh_TW, ca, da, eu, gl, ko)
  • Code actively references the new keys at src/js/tabs/osd.js:1281–1282
locales/eu/messages.json (1)

3652-3658: Correct typo fix in OSD element keys.

The JSON keys have been correctly updated from osdTextElementRemaningTimeEstimate and osdDescElementRemaningTimeEstimate to their properly spelled counterparts with "Remaining" (adding the missing 'i'). The message values remain unchanged. This fix is consistent with the coordinated typo corrections across all locale files as stated in the PR objectives.

locales/uk/messages.json (1)

5984-5990: Typo fix verified and complete.

All verification checks passed:

  • No lingering old keys ("RemaningTimeEstimate") found anywhere
  • All 30 locale files contain the corrected keys ("RemainingTimeEstimate")
  • Code references in src/js/tabs/osd.js (lines 1281-1282) already use the corrected key names
  • No stale references remain
locales/zh_TW/messages.json (1)

3579-3585: Typo fix: correct JSON key names for OSD timer element.

The misspelled keys osdTextElementRemaningTimeEstimate and osdDescElementRemaningTimeEstimate have been correctly renamed to osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate (fixing "Remaning" → "Remaining"). The message values remain unchanged, which is appropriate for a key-rename operation.

Note: The PR summary indicates this change spans multiple language message files. This review only covers the zh_TW localization file provided; please ensure the same typo corrections have been applied consistently across all other language files (e.g., en, de, fr, etc.).

locales/de/messages.json (1)

5499-5505: Typo fix verified across all locales and source code.

No stale misspelled key references found. Both corrected keys osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate are present in all 22 locale files and correctly referenced in src/js/tabs/osd.js:1281-1282. Change is safe to merge.

locales/ca/messages.json (1)

5992-5995: Key names are already correctly spelled; verification scripts target non-existent issues

The search results confirm that osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate are correctly spelled across all locale files (ca, es, en, fr, de, ja, pt, etc.) and in src/js/tabs/osd.js (lines 1281-1282). No misspelled variants exist to verify against.

However, there is a genuine typo in the Catalan translation: line 5998 contains "Temps estimat restant de volt" where "volt" should be "vol".

Likely an incorrect or invalid review comment.

locales/en/messages.json (1)

6073-6076: No issues found; review comment is incorrect.

The verification shows that all references to these i18n keys—both in src/js/tabs/osd.js (lines 1281–1282) and across all 19 locale files—already use the correct spelling osdTextElementRemainingTimeEstimate and osdDescElementRemainingTimeEstimate (with "Remaining"). There is no key rename happening in this PR, and no "Remaning" (typo) variant exists anywhere in the codebase. The original review comment's concern about breaking translations due to a key rename is unfounded.

Likely an incorrect or invalid review comment.

locales/ru/messages.json (1)

5882-5888: Typo fix verified across all locales; no stale references remain.

Script confirms zero occurrences of old "Remaning" keys and consistent presence of corrected "Remaining" keys across all 30+ locale files, including the Russian locale under review. Changes are complete and safe to merge.

locales/es/messages.json (1)

5949-5955: Typo fix verified—all locales updated consistently, no stale references remain.

Confirmed:

  • Old misspelled key (RemaningTimeEstimate) completely removed
  • New correct keys (osdTextElementRemainingTimeEstimate, osdDescElementRemainingTimeEstimate) present in all 20 locale files
  • Source code in src/js/tabs/osd.js correctly references the new keys
  • Spanish translations are grammatically sound

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 9, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

@haslinghuis haslinghuis merged commit cf070c7 into betaflight:master Nov 9, 2025
8 checks passed
@github-project-automation github-project-automation bot moved this from App to Done in 2025.12.0 Nov 9, 2025
@purpole
Copy link
Contributor Author

purpole commented Nov 9, 2025

Thank you for the nice first PR! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants