mirror of
https://github.com/unraid/api.git
synced 2025-12-20 08:09:42 -06:00
feat: translations now use crowdin (translate.unraid.net) (#1739)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - App-wide internationalization: dynamic locale detection/loading, many new locale bundles, and CLI helpers to extract/sort translation keys. - **Accessibility** - Brand button supports keyboard activation (Enter/Space). - **Documentation** - Internationalization guidance added to API and Web READMEs. - **Refactor** - UI updated to use centralized i18n keys and a unified locale loading approach. - **Tests** - Test utilities updated to support i18n and localized assertions. - **Chores** - Crowdin config and i18n scripts added; runtime locale exposed for selection. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -19,6 +19,14 @@ import type {
|
||||
|
||||
import { WebguiState } from '~/composables/services/webgui';
|
||||
import { useServerStore } from '~/store/server';
|
||||
import { testTranslate } from '../utils/i18n';
|
||||
|
||||
// Mock vue-i18n for store tests
|
||||
vi.mock('vue-i18n', () => ({
|
||||
useI18n: () => ({
|
||||
t: testTranslate,
|
||||
}),
|
||||
}));
|
||||
|
||||
type MockServerStore = ReturnType<typeof useServerStore> & Record<string, unknown>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user