Skip to content

fix(locales): enable English fallback for missing translation keys#235

Open
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:fix/enable-fallback-locale-for-missing-translations
Open

fix(locales): enable English fallback for missing translation keys#235
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:fix/enable-fallback-locale-for-missing-translations

Conversation

@evan188199-tech

Copy link
Copy Markdown

What

Missing translation keys render as raw key paths (e.g. heatmap.no_workout) instead of falling back to English, because the fallbackLocale option is commented out in locales/client.ts.

Root cause

// Uncomment to set fallback locale
// fallbackLocale: en,

next-international's createI18nClient supports fallbackLocale, which makes missing keys fall back to the specified locale. It's disabled, so every untranslated key shows its raw dotted path.

138 keys are currently missing across es/pt/ru/fr (zh-CN partially covered by #200). Examples showing as raw paths today:

  • heatmap.no_workout / heatmap.one_workout_unit / heatmap.multiple_workouts_unit
  • health_risks.overweight.* / health_risks.underweight.* (~25 each, BMI results page)
  • commons.refresh, workout_builder.muscles.lats

Fix

One line — uncomment and enable:

fallbackLocale: en,

This immediately improves every locale (and future ones): missing keys show English instead of raw paths. Complementary to translation-completion PRs like #200 — the fallback is a safety net for any key not yet translated.

Fixes #234.

The fallbackLocale option in createI18nClient was commented out, so any
translation key missing from a non-English locale rendered as its raw
dotted path (e.g. 'heatmap.no_workout') instead of falling back to the
English text. 138 keys are currently affected across es/pt/ru/fr. Enable
fallbackLocale: en so missing keys show English instead of raw paths.

Fixes Snouzy#234
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Workoutcool Team Team on Vercel.

A member of the Team first needs to authorize it.

@evan188199-tech

Copy link
Copy Markdown
Author

此 PR 由 GLM-5.2 修复。

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.

Bug: Missing translation keys render as raw key paths instead of falling back to English

1 participant