Skip to content

Conversation

nerdCopter
Copy link
Member

@nerdCopter nerdCopter commented Sep 15, 2025

resolves #4607

Summary by CodeRabbit

  • New Features

    • None.
  • Bug Fixes

    • Corrected the on-screen display description for the aircraft name to reference the “craft_name” CLI variable.
  • Documentation

    • Updated English locale text for the aircraft name OSD description to improve clarity and consistency.
    • Ensures the help text accurately reflects current CLI terminology across the interface.
    • No functional behavior changes; this is a text-only update visible in the UI.

Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Walkthrough

A single localization string in locales/en/messages.json was updated: the OSD tooltip for aircraft name now references the CLI variable craft_name instead of aircraft_name. No logic, behavior, or control-flow changes were made.

Changes

Cohort / File(s) Summary of changes
Localization update
locales/en/messages.json
Updated osdDescElementCraftName message to reference CLI variable craft_name instead of aircraft_name.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The change updates locales/en/messages.json to replace "aircraft_name" with "craft_name", which addresses the tooltip text but does not match the linked issue's requested CLI name "CRAFT_NAME" exactly and does not modify the optional UI label in src/js/tabs/osd.js; therefore the PR only partially satisfies the coding objectives in issue [#4607]. Update the tooltip string to reference "CRAFT_NAME" exactly to match the CLI naming expected by the issue and, if desired, also update src/js/tabs/osd.js to change the UI label to "Craft name"; then verify the change in the UI and run CI/lint/tests before merging.
Description Check ⚠️ Warning The PR description contains only "resolves #4607" and does not follow the repository template; it lacks a concise summary of what changed, the rationale, files modified, testing instructions, and CI/lint/test status, so it is insufficient as written. Please expand the PR description to follow the provided template: include a short summary of the change, the reason/motivation, a list of modified files, how to test the change, and CI/lint/test results (keeping "resolves #4607" to link the issue).
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "fix local en craft_name" directly references an English-locale fix for the craft_name variable and therefore matches the main change in locales/en/messages.json; it is concise but terse and lacks conventional capitalization or context. Because it accurately identifies the core change (localization fix for craft_name), the title is acceptable.
Out of Scope Changes Check ✅ Passed Only a single translation key in locales/en/messages.json was modified (osdDescElementCraftName) and no other files were changed, so there are no detected out-of-scope or unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Copy link
Contributor

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 (2)
locales/en/messages.json (2)

5767-5768: HTML nit: use
(or
) instead of
.

Minor consistency/validity fix.

Apply this diff:

-        "message": "Aircraft name as set in the Configuration tab.</br>Can also be set via the \"craft_name\" CLI variable."
+        "message": "Aircraft name as set in the Configuration tab.<br/>Can also be set via the \"craft_name\" CLI variable."

5464-5465: Optional: rename UI label to “Craft name” for consistency with setting name.

Issue #4607 suggested aligning the label; this keeps wording uniform across UI and CLI references. English-only change; other locales come via Crowdin.

-    "osdSetupCraftNameTitle": {
-        "message": "Aircraft Name"
+    "osdSetupCraftNameTitle": {
+        "message": "Craft name"
     },
@@
-    "osdTextElementCraftName": {
-        "message": "Aircraft name",
+    "osdTextElementCraftName": {
+        "message": "Craft name",
         "description": "One of the elements of the OSD"
     },

Also applies to: 5762-5765

📜 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 04d4255 and e4add45.

📒 Files selected for processing (1)
  • locales/en/messages.json (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#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.
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#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.
📚 Learning: 2025-05-26T11:37:09.758Z
Learnt from: haslinghuis
PR: betaflight/betaflight-configurator#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
PR: betaflight/betaflight-configurator#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)

5767-5768: Correct CLI variable referenced (aircraft_name → craft_name).

Matches existing usage elsewhere in this file (e.g., configurationCraftNameHelp, display_name, pilot_name), so this is consistent.

The linked issue text mentions “CRAFT_NAME”. Confirm we intend to show the literal CLI variable token (craft_name) rather than an uppercase label. If we must mirror the issue text verbatim, we can switch to CRAFT_NAME, but that would be inconsistent with other CLI mentions here.

@VitroidFPV VitroidFPV merged commit 7c7a41f into betaflight:master Sep 15, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from App to Done in 2025.12.0 Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Tooltip for "Aircraft Name" in OSD tab incorrectly identifies the corresponding CLI setting as "aircraft_name" instead of "CRAFT_NAME"
4 participants