Skip to content

Enable Bengali localization and restore en.arb keys lost to a bad merge - #528

Open
arnavgoel17 wants to merge 1 commit into
ishita2740:mainfrom
arnavgoel17:fix/297-enable-bengali-localization
Open

Enable Bengali localization and restore en.arb keys lost to a bad merge#528
arnavgoel17 wants to merge 1 commit into
ishita2740:mainfrom
arnavgoel17:fix/297-enable-bengali-localization

Conversation

@arnavgoel17

Copy link
Copy Markdown
Contributor

Summary

Bengali translation work was sitting completely unused: app_bn.arb existed, but the generated Dart file was stale and — more importantly — bn was excluded from every user-facing surface because enabling it would have crashed. This PR makes Bengali a real, selectable language.

While validating with flutter gen-l10n, a second, larger problem surfaced:

98 keys had been silently dropped from app_en.arb by the conflict resolution in merge 79b5803 ("Merge branch 'main' into feat/ayurvedic-educational-layer"). Everything from welcomeToRhythma and all 17 phone+OTP login keys to the entire sms*, insightsNotEnoughData, deleteAccount and assistantAccessibility* families vanished from the source-of-truth ARB file while the generated Dart files kept them (hand-patched by bf2fbff to keep the app compiling). That hand-patching masked the loss — until anyone re-ran gen-l10n, which is exactly what this issue asks for.

What changed

  • Restored the 98 lost keys to app_en.arb verbatim from pre-merge commit d1346cb.
  • Completed Bengali coverage: added the 10 missing Ayurveda keys and translated the 5 strings still in English (insightsDisclaimer, logFlowVeryHeavy, logFlowSpotting, logSympSeverePain, logSympFainting). app_bn.arb now covers every key in app_en.arb.
  • Regenerated all localization Dart files with flutter gen-l10n.
  • Added bn (বাংলা) to appSupportedLanguages — both the onboarding language screen and Settings → Language iterate this list, so one entry enables it in both places, and LocaleProvider.setLocale now accepts it.
  • Fixed three tests that encoded pre-change behavior (they could never run before, since the suite was blocked by compile errors):
    • supported_languages_test: expects 9 locales incl. bn
    • settings_screens_test: tapped the stale l10n-based label 'हिन्दी (Hindi)' instead of the current nativeName 'हिन्दी'
    • locale_provider_test: used a storage init API that no longer exists; migrated to the shared Hive test fixture, and added a new case proving setLocale(bn) is accepted

Validation

  • flutter gen-l10n: clean regeneration; app_bn.arb has full key coverage of app_en.arb (verified programmatically)
  • flutter analyze: 0 issues (baseline on main was 17 errors in committed generated files)
  • flutter test: 118 passing, 0 failing
  • Note: other locales still have untranslated keys relative to en (e.g. hi:38, mr:38, ta:28); those fall back to English at runtime and were out of scope here.

Fixes #297

…o a bad merge

Bengali translation work was sitting unused: app_bn.arb existed but the
locale was not selectable anywhere in the app.

- Restore 98 keys silently dropped from app_en.arb by the conflict
  resolution in merge 79b5803 (welcomeToRhythma, all sms*, deleteAccount,
  insights*, nudge*, assistantAccessibility*, onboarding* keys). The
  generated Dart files had been hand-patched to keep compiling, which
  masked the loss until gen-l10n ran again.
- Add the 10 missing Ayurveda keys to app_bn.arb and translate the 5
  strings that were still English (insightsDisclaimer, logFlow*,
  logSymp*), so Bengali has full en.arb coverage.
- Regenerate all localization Dart files via flutter gen-l10n.
- Add bn (বাংলা) to appSupportedLanguages, which makes it selectable on
  both the onboarding language screen and Settings > Language, and lets
  LocaleProvider accept it.

Tests:
- flutter analyze: 0 issues (17 pre-existing errors on main).
- flutter test: 118 passing, including a new test proving bn is accepted
  by LocaleProvider. Updated three tests that encoded pre-change
  behavior (8 vs 9 locales; stale l10n-based Hindi label; storage init
  that no longer compiles).
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@arnavgoel17 is attempting to deploy a commit to the ishita2740's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ishita2740

Copy link
Copy Markdown
Owner

@arnavgoel17 I will merge the PR soon

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.

Bengali localization is incomplete — silently unusable

2 participants