diff --git a/ui/desktop/src/renderer.tsx b/ui/desktop/src/renderer.tsx index c9df7f1ea991..3e6533188a15 100644 --- a/ui/desktop/src/renderer.tsx +++ b/ui/desktop/src/renderer.tsx @@ -17,6 +17,20 @@ const App = lazy(() => import('./App')); const TELEMETRY_CONFIG_KEY = 'GOOSE_TELEMETRY_ENABLED'; +let warnedFallbackLocale = false; +function handleIntlError(err: { code: string; message?: string }) { + if (err.code === 'MISSING_TRANSLATION' && currentLocale !== currentMessageLocale) { + if (!warnedFallbackLocale) { + warnedFallbackLocale = true; + console.warn( + `[i18n] Locale "${currentLocale}" has no translations; falling back to "${currentMessageLocale}".` + ); + } + return; + } + console.error(err); +} + (async () => { // Check if we're in the launcher view (doesn't need goosed connection) const isLauncher = window.location.hash === '#/launcher'; @@ -50,7 +64,12 @@ const TELEMETRY_CONFIG_KEY = 'GOOSE_TELEMETRY_ENABLED'; ReactDOM.createRoot(document.getElementById('root')!).render( - +