From e1650f627cfb51317a73a87bd567c98f031ef1a5 Mon Sep 17 00:00:00 2001 From: zhushen <2270364052@qq.com> Date: Mon, 11 May 2026 20:30:50 +0800 Subject: [PATCH] fix: Wrap MobileLayout with I18nProvider; use outputLanguage key in config P1: MobileLayout was missing I18nProvider wrapper, causing useI18n to throw error on mobile devices. Now both desktop and mobile layouts are wrapped with I18nProvider. P2: SKILL.md used 'language' key but Dashboard reads 'outputLanguage'. Fixed config.json key name to match ProjectConfig type definition. All tests passed: - Core: 670 tests - Dashboard: 42 tests --- .../packages/dashboard/src/App.tsx | 22 ++++++++++--------- .../skills/understand/SKILL.md | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/understand-anything-plugin/packages/dashboard/src/App.tsx b/understand-anything-plugin/packages/dashboard/src/App.tsx index ef41f9b..5a3bf84 100644 --- a/understand-anything-plugin/packages/dashboard/src/App.tsx +++ b/understand-anything-plugin/packages/dashboard/src/App.tsx @@ -394,16 +394,18 @@ function Dashboard({ accessToken }: { accessToken: string }) { if (isMobile) { return ( - - - + + + + + ); } diff --git a/understand-anything-plugin/skills/understand/SKILL.md b/understand-anything-plugin/skills/understand/SKILL.md index 22115df..5faf83e 100644 --- a/understand-anything-plugin/skills/understand/SKILL.md +++ b/understand-anything-plugin/skills/understand/SKILL.md @@ -121,10 +121,10 @@ Determine whether to run a full analysis or incremental update. - `chinese` → `zh`, `japanese` → `ja`, `korean` → `ko`, `english` → `en`, `spanish` → `es`, `french` → `fr`, `german` → `de`, `portuguese` → `pt`, `russian` → `ru`, `arabic` → `ar`, etc. - Locale variants: `zh-TW`, `zh-HK`, `zh-CN`, `pt-BR`, etc. are preserved as-is. - If `--language` is NOT specified: - - Check `$PROJECT_ROOT/.understand-anything/config.json` for an existing `language` field. If present, use that. + - Check `$PROJECT_ROOT/.understand-anything/config.json` for an existing `outputLanguage` field. If present, use that. - If no stored preference, default to `en` (English). - If `--language` IS specified: - - Update `$PROJECT_ROOT/.understand-anything/config.json` with the new language: merge `{"language": ""}` into existing config. + - Update `$PROJECT_ROOT/.understand-anything/config.json` with the new language: merge `{"outputLanguage": ""}` into existing config. - Store as `$OUTPUT_LANGUAGE` for use throughout all phases. - **Language directive template:** Store as `$LANGUAGE_DIRECTIVE`: ```markdown