fix: Suppress diagram translation warning on initial load, add home-ai locale stubs

- interactive-diagram.js: Only warn about missing translations when i18n
  has already initialized (not during initial race before i18n completes)
- Add empty home-ai.json locale files (en/de/fr) to prevent console
  warning on /home-ai.html page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
TheFlow 2026-02-07 20:59:06 +13:00
parent 45e74fd5d5
commit 42219f6799
4 changed files with 10 additions and 1 deletions

View file

@ -21,7 +21,10 @@ class InteractiveDiagram {
// If no translations available, use English fallback // If no translations available, use English fallback
const hasTranslations = diagram && Object.keys(diagram).length > 0; const hasTranslations = diagram && Object.keys(diagram).length > 0;
if (!hasTranslations) { if (!hasTranslations) {
console.warn('[InteractiveDiagram] No translations loaded, using English fallback'); // Only warn if i18n has already initialized (otherwise this is expected on first load)
if (window.i18nTranslations && Object.keys(window.i18nTranslations).length > 0) {
console.warn('[InteractiveDiagram] No diagram translations in loaded locale, using English fallback');
}
this.loadFallbackData(); this.loadFallbackData();
return; return;
} }

View file

@ -0,0 +1,2 @@
{
}

View file

@ -0,0 +1,2 @@
{
}

View file

@ -0,0 +1,2 @@
{
}