chore: lots of i18n

This commit is contained in:
2026-02-21 12:34:06 +01:00
parent c991015ea8
commit b27a3e6885
18 changed files with 1355 additions and 661 deletions

View File

@@ -4,6 +4,7 @@ import { render, screen } from '@testing-library/react';
import { SettingsView } from '../../../src/renderer/components/SettingsView/SettingsView';
import { useAppStore } from '../../../src/renderer/store';
import { I18nProvider, UI_LANGUAGE_STORAGE_KEY } from '../../../src/renderer/i18n';
import { SUPPORTED_RENDER_LANGUAGES } from '../../../src/main/shared/i18n';
describe('SettingsView i18n', () => {
beforeEach(() => {
@@ -59,4 +60,17 @@ describe('SettingsView i18n', () => {
expect(screen.getByText('Projektname')).toBeInTheDocument();
expect(screen.getByText('Projekteinstellungen speichern')).toBeInTheDocument();
});
it('shows only supported render languages in project language selector', async () => {
render(
<I18nProvider>
<SettingsView />
</I18nProvider>
);
const select = await screen.findByLabelText('Hauptsprache');
const options = Array.from((select as HTMLSelectElement).options).map((option) => option.value);
expect(options).toEqual(SUPPORTED_RENDER_LANGUAGES);
});
});