Skip to content

fix: reduce excessive MISSING_TRANSLATION warnings for fallback locales#9294

Merged
lifeizhou-ap merged 10 commits into
mainfrom
lifei/remove-default-lan-error
May 18, 2026
Merged

fix: reduce excessive MISSING_TRANSLATION warnings for fallback locales#9294
lifeizhou-ap merged 10 commits into
mainfrom
lifei/remove-default-lan-error

Conversation

@lifeizhou-ap
Copy link
Copy Markdown
Collaborator

@lifeizhou-ap lifeizhou-ap commented May 18, 2026

Summary

When the locale is not supported. The UI itself displays correctly, but only the console is noisy, it prints many warnings. This makes debugging for other issues hard

react-intl.js?v=70125736:7064 MissingTranslationError: [@formatjs/intl Error MISSING_TRANSLATION] Missing message: "bottomMenuExtensionSelection.noExtensionsAvailable" for locale "en-AU", using default message (no extensions available) as fallback.

Cause

loadMessages returned {} for English, relying on react-intl's defaultMessage fallback. But when the user's locale is not supported, react-intl considers them different and emits MISSING_TRANSLATION for every key not in the catalog.

Fix

Only show the warning message once if the locale is not the same as fallback locale

Testing

manual testing

@lifeizhou-ap lifeizhou-ap changed the title silence MISSING_TRANSLATION warnings for fallback locales fix: reduce excessive MISSING_TRANSLATION warnings for fallback locales May 18, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5b945fc2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/desktop/src/i18n/index.ts Outdated
Comment thread ui/desktop/src/i18n/index.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb2c2bf873

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/desktop/src/i18n/index.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d58242c3c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/desktop/src/i18n/index.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1218484f8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/desktop/src/i18n/index.ts Outdated
Comment on lines +130 to +132
return {
...englishMessages,
...messages,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve source defaultMessage fallback for untranslated keys

Merging englishMessages into every non-English catalog causes untranslated keys to resolve from src/i18n/compiled/en.json instead of React Intl’s in-code defaultMessage, so copy can become stale when defaultMessage text changes but i18n:extract has not been rerun. In this repo, ui/desktop/package.json shows common startup paths (start-gui) run i18n:compile but not i18n:extract, so existing IDs with updated defaultMessage will display outdated English text for partially translated locales (for example zh-CN) without any warning. Fresh evidence: the new merge at these lines applies that compiled-English fallback to all non-English locales, not just en.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i18n:check re-extracts messages and fails if en.json is stale, so CI should catch this. The English fallback is intentional to avoid missing-translation noise

@jh-block
Copy link
Copy Markdown
Collaborator

Thanks for tracking this down! I'm worried though that if we spread the English catalog under all the other locales' catalogs, we lose the missing translation signal entirely, so we can't for example use telemetry to keep track of missing translations, translators can't use tooling to scan for missing translations, etc.

I think a better approach would be a narrow fix for the problem, which as I understand it is "the emission of a warning message whenever a message is untranslated". We should be able to use the IntlProvider's onError prop to filter out this warning (and that would also be the perfect place to capture telemetry on it if we decide to do that).

This reverts commit 1218484.
This reverts commit d58242c.
This reverts commit eb2c2bf.
* main:
  fix(desktop): eliminate cross-window deep link contamination (#9273)
  fix: improve Telegram gateway error reporting and connection reliability (#9223)
  fix(cli): enable VT processing on Windows Console Host (#9248)
Copy link
Copy Markdown
Collaborator

@jh-block jh-block left a comment

Choose a reason for hiding this comment

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

lgtm! nice touch having it emit the warning once!

@lifeizhou-ap lifeizhou-ap added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit cefc685 May 18, 2026
21 of 22 checks passed
@lifeizhou-ap lifeizhou-ap deleted the lifei/remove-default-lan-error branch May 18, 2026 11:37
michaelneale added a commit that referenced this pull request May 19, 2026
* origin/main: (160 commits)
  Add Linux musl CLI builds (#9240)
  feat(acp): paginate session list (#9199)
  docs: reorganize (#9310)
  Structured per-provider config block, non-destructive provider switching (#8977)
  feat(cli): add `goose review` local code review command (#9114)
  feat(tui): diff viewer (#9260)
  fix(otel): emit trace_output as span attribute instead of event (#9255)
  docs: add guide for connecting goose Desktop to a remote goosed server (#9275)
  fix(config): check file fallback when keyring has no entry (#9279)
  fix(desktop): ScheduleModal error message styling (#9278)
  fix(ui): align sidebar hamburger in macOS fullscreen (#9257)
  Add documentation for new provider SaladCloud AI Gateway (#9253)
  fix: use current_exe() instead of PATH lookup when spawning goose (#9236)
  fix(extension_manager): set TCP_USER_TIMEOUT on streamable HTTP clients (#9207)
  fix: activate custom provider after adding via configure (#9213)
  Flush OTLP traces reliably on exit with configurable timeout (#9228)
  fix: reduce excessive MISSING_TRANSLATION warnings for fallback locales (#9294)
  feat(acp): pass session cwd param to acp providers (#9229)
  fix(desktop): eliminate cross-window deep link contamination (#9273)
  fix: improve Telegram gateway error reporting and connection reliability (#9223)
  ...

Signed-off-by: Michael Neale <michael.neale@gmail.com>

# Conflicts:
#	crates/goose/src/agents/agent.rs
#	crates/goose/tests/agent.rs
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