From 67dd85c9281a299220ea7f23da43345692c8763e Mon Sep 17 00:00:00 2001 From: MisonL <35633790+MisonL@users.noreply.github.com> Date: Fri, 16 Jan 2026 00:51:05 +0800 Subject: [PATCH] Feat/localization tests docker (#371) * feat(i18n): complete 100% internationalization and fix Next.js 15 compatibility * feat(i18n): complete 100% internationalization coverage * chore(test): finalize component tests and project cleanup * test(logic): add unit tests for useModalManager hook * fix(test): resolve timeout in AppSidebar tests by mocking TooltipProvider * feat(i18n): comprehensive i18n audit, fixes for hardcoded strings, and complete zh-TW support * fix(i18n): resolve TypeScript warnings and improve translation hook stability - Remove unused useTranslation import from ConnectionGuard - Add ref-based checking state to prevent dependency cycles - Fix useTranslation hook to return empty string for undefined translations - Add comment for backward compatibility on ExtractedReference interface - Ensure .replace() string methods work safely with nested translation keys * feat(i18n): complete internationalization implementation with Docker deployment - Add LanguageLoadingOverlay component for smooth language transitions - Update all translation files (en-US, zh-CN, zh-TW) with improved terminology - Optimize Docker configuration for better performance - Update version check and config handling for i18n support - Fix route handling for language-specific content - Add comprehensive task documentation * fix(i18n): resolve localization errors, duplicates, and type issues * chore(i18n): finalize 100% internationalization coverage * chore(test): supplement i18n test cases and cleanup redundant files * fix(test): resolve lint type errors and finalize delivery documents * feat(i18n): finalize full internationalization and zh-TW localization * fix(frontend): add missing devDependency and fix build tsconfig * feat(ui): enhance sidebar hover effects with better visual feedback * fix(frontend): resolve accessibility, i18n, and lint issues - fix: add missing id, name, autocomplete attributes to dialog inputs - fix: add aria labels and DialogDescription for accessibility - fix: resolve uncontrolled component warning in SettingsForm - fix: correct duplicate 'Traditional Chinese' label in zh-TW locale - feat: add i18n support for podcast template names - chore: fix lint errors in Dialogs * fix: address all 21 PR feedback items from cubic-dev-ai bot Configuration: - Remove ignoreDuringBuilds flags from next.config.ts Testing: - Fix AppSidebar.test.tsx regex pattern and add missing assertion Logic: - Fix ConnectionGuard.tsx re-entry prevention logic Internationalization (I18n) - Translations: - Add missing keys: notebooks.archived, common.note/insight, accessibility keys - Add specific keys: sources.allSourcesDescShort, transformations.selectModel - Add singular/plural keys: podcasts.usedByCount_one/other, common.note/notes - Add common.created/updated with {time} placeholder Internationalization (I18n) - Usage: - SourcesPage: use allSourcesDescShort instead of string splitting - TransformationPlayground: use navigation.transformation and selectModel - CommandPalette: use dedicated keys instead of string concatenation - GeneratePodcastDialog: fix zh-TW date locale handling - NotebookHeader: correctly interpolate {time} placeholder - TransformationCard: use common.description instead of undefined key - ChatPanel/SpeakerProfilesPanel: implement proper pluralization - SystemInfo: correctly interpolate {version} placeholder - LanguageLoadingOverlay: use t.common.loading instead of hardcoded string - MessageActions: use specific error key cannotSaveNoteNoNotebook Other: - Fix SessionManager.tsx exhaustive-deps warning * fix: remove duplicate locale keys and add missing zh-CN translations - en-US: remove duplicate loading key (line 59) and addNew key (sources) - zh-CN: remove duplicate common keys (loading, note, insight, newSource, newNotebook, newPodcast) - zh-CN: remove duplicate accessibility.searchNotebooks key - zh-CN: remove duplicate sources.addNew key - zh-CN: remove duplicate navigation.transformation key - zh-CN: add missing usedByCount_one and usedByCount_other keys in podcasts - zh-TW: remove duplicate common keys (loading, note, insight, newSource, newNotebook, newPodcast) - zh-TW: remove duplicate accessibility.searchNotebooks key - zh-TW: remove duplicate sources.addNew key * docs: remove info.md * fix: remove duplicate notebook keys and unused ts-expect-error - zh-CN: remove duplicate notebooks keys (archived, archive, unarchive, deleteNotebook, deleteNotebookDesc) - zh-TW: remove duplicate notebooks keys (archived, archive, unarchive, deleteNotebook, deleteNotebookDesc) - GeneratePodcastDialog: remove unused @ts-expect-error directive * fix(a11y): fix unassociated labels in search page - Replace