Skip to content

l10n(hi): translate the supplement catalogue, so 300 strings stop falling back to English - #723

Merged
abdulsaheel merged 1 commit into
OpenStrap:mainfrom
kurexw:l10n/hi-supplement
Nov 15, 2026
Merged

abdulsaheel merged 1 commit into
OpenStrap:mainfrom
kurexw:l10n/hi-supplement

Conversation

@kurexw

@kurexw kurexw commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Hindi had none of the 300 supplement* strings that were added on Oct 7 (cc9dc10). de, ru and th have them. In a Hindi app these fell back to English across notifications ("Did you nap?", "Your recovery is ready"), progress lines ("Need {n} more nights", "Wear {n} more days to unlock"), the coach's action confirmations, lab marker names, chart descriptions for screen readers, and the metric explanations.

hindi_coverage_test already listed this as "Still to do: the supplement catalogue" and exempted it. This change translates all 300 and removes the exemption, so a future English-only key fails the test instead of silently showing English.

Terms follow what app_hi.arb already uses: बैंड, स्ट्रेन (strain), रिकवरी, HRV, हृदय गति, आराम हृदय गति, सामान्य सीमा, वर्कआउट, जर्नल, जीवन संकेत, ब्रीफ़िंग, and the आप form. Where the existing strings mix unit spellings, I used the more common one (kg, kcal, मिली, किमी). Units and method citations (Cole–Kripke, Plews 2013, AN-2554…) keep their names, as in de and ru.

The new entries are appended at the end of app_hi.arb, and no existing line changed.

Testing

  • hindi_coverage_test: the stricter test fails on main (300 missing) and passes with this change. A new case pins two of the strings.
  • A script check: same 300 keys as English, and every string has exactly the same {placeholders}.
  • ui2_screen_sweep_test (14 screens × 8 locales × 1.0/2.0/3.1× text): no overflows.
  • The test files that use the Hindi locale pass, together with the sweep (315 tests).
  • flutter gen-l10n and flutter analyze are clean.

I am not a native speaker, and Hindi is the one of the four I am least sure of. Please have a native speaker read it before merging, especially the longer metric explanations and the short labels (P/C/F macro letters are प्रो/का/व).

Risks and rollback

Strings only, no code paths. Revert the commit to roll back.

Checklist

  • Same keys and placeholders as English
  • Coverage test tightened, and fails without the change
  • Large-text sweep clean in every locale
  • Analyze clean

Spanish is #720, French #721 and Chinese #722.

🤖 Generated with Claude Code

Summary by Sourcery

Translate the full supplement catalogue into Hindi and enforce complete Hindi localization coverage.

New Features:

  • Add Hindi translations for the complete supplement catalogue, covering notifications, progress messages, coach actions, lab markers, accessibility descriptions, and metric explanations.

Bug Fixes:

  • Prevent supplement catalogue strings from falling back to English in Hindi.

Enhancements:

  • Require Hindi localization coverage for every English string and add regression checks for representative supplement translations.

Tests:

  • Add coverage and localization checks verifying supplement translations and placeholder parity.

Summary by CodeRabbit

  • Localization
    • Added Hindi translations for firmware-lock guidance, interface labels, accessibility descriptions, status messages, metric explanations, and error text.
    • Hindi-language guidance now includes coach request-size limits, step-goal bounds, device and sensor behavior, and data-retention details.

…ling back to English

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Adds Hindi translations for the supplement catalogue so those strings no longer fall back to English.

  • lib/l10n/app_hi.arb L3491-3791

Tests

Removes the supplement-key coverage exemption and adds checks that the catalogue reads in Hindi.

  • test/hindi_coverage_test.dart L16, L25 (removed lines), L28-33

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Hindi localization resource adds translations for firmware guidance, interface labels, accessibility descriptions, status messages, metrics, notifications, device setup, and error text. No application logic changed.

Changes: Hindi localization

Layer / File(s) Summary
Add Hindi interface strings
lib/l10n/app_hi.arb
Added Hindi resource entries for firmware guidance and a broad set of interface content, including accessibility text, coach actions, metrics, notifications, device setup, and errors.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: abdulsaheel, mikenrafter

Merge Risk: Minimal · up to b03e7

This change adds Hindi translations for previously missing strings and has no logic changes. No concrete merge-blocking issue was found. A native Hindi speaker review of the wording is still advisable.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: Hindi translations for the supplement catalogue strings in app_hi.arb, so the missing strings no longer fall back to English. The PR objectives confirm 300 supplement…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: Hindi translations for the supplement catalogue strings in app_hi.arb, so the missing strings no longer fall back to English. The PR objectives confirm 300 supplement* strings were added and the coverage exemption removed. The raw summary describes app_hi.arb additions in general terms and does not mention supplement strings specifically, but the objectives describe the same change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: OpenStrap/edge
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: b8fbe00
  • Layers: Repository YAML
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 11c46f74-3f50-495f-866e-dae343f453a6
Commits

Reviewing files that changed from the base of the PR and between b8fbe00 and b03e71b.

Files ignored due to path filters: 1

  • test/hindi_coverage_test.dart is excluded by !test/**
Files selected for processing: 1

  • lib/l10n/app_hi.arb

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="test/hindi_coverage_test.dart" line_range="24" />
<code_context>
       for (final k in arb('en').keys)
         if (!k.startsWith('@') && !hindi.containsKey(k)) k,
     ];
-    // Still to do: the supplement catalogue.
-    missing.removeWhere((k) => k.startsWith('supplement'));
</code_context>
<issue_to_address>
**English copy passes coverage test**

When a future English key is added to `app_hi.arb` with its English source text as the value, `hindi.containsKey(k)` succeeds even when the Hindi value is copied verbatim from English, so the coverage test passes while that string still displays in English.

Add checks for untranslated values where English should be localized, using an explicit allowlist for technical strings that intentionally remain unchanged.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: test/hindi_coverage_test.dart:24


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread test/hindi_coverage_test.dart Resolved
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.

2 participants