fix(planner): translate SwapSuggestionList copy to German

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 10:29:54 +02:00
parent 30722d9bcc
commit 8e3256d960
2 changed files with 14 additions and 14 deletions

View File

@@ -39,7 +39,7 @@
<p <p
style="font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-dark); margin: 0 0 4px 0; font-family: var(--font-sans);" style="font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-dark); margin: 0 0 4px 0; font-family: var(--font-sans);"
> >
Replacing Wird ersetzt
</p> </p>
<span <span
data-testid="replacing-name" data-testid="replacing-name"
@@ -53,7 +53,7 @@
<p <p
style="font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 6px 0; font-family: var(--font-sans);" style="font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 6px 0; font-family: var(--font-sans);"
> >
Swap to (easiest first) Ersetzen durch (einfachste zuerst)
</p> </p>
<!-- Recipe list --> <!-- Recipe list -->
@@ -98,7 +98,7 @@
onclick={() => onpick(recipe.id, recipe.name)} onclick={() => onpick(recipe.id, recipe.name)}
style="background: none; border: none; cursor: pointer; font-size: 11px; font-weight: 500; color: var(--green); font-family: var(--font-sans); flex-shrink: 0;" style="background: none; border: none; cursor: pointer; font-size: 11px; font-weight: 500; color: var(--green); font-family: var(--font-sans); flex-shrink: 0;"
> >
Pick Wählen
</button> </button>
</div> </div>
{/each} {/each}
@@ -111,6 +111,6 @@
onclick={oncancel} onclick={oncancel}
style="width: 100%; background: none; border: none; cursor: pointer; color: var(--color-text-muted); font-size: 13px; text-align: center; padding: 8px 0; font-family: var(--font-sans);" style="width: 100%; background: none; border: none; cursor: pointer; color: var(--color-text-muted); font-size: 13px; text-align: center; padding: 8px 0; font-family: var(--font-sans);"
> >
Cancel Abbrechen
</button> </button>
{/if} {/if}

View File

@@ -20,7 +20,7 @@ const baseProps = {
describe('SwapSuggestionList', () => { describe('SwapSuggestionList', () => {
it('renders the Replacing banner', () => { it('renders the Replacing banner', () => {
render(SwapSuggestionList, { props: baseProps }); render(SwapSuggestionList, { props: baseProps });
expect(screen.getByText(/Replacing/i)).toBeTruthy(); expect(screen.getByText(/Wird ersetzt/i)).toBeTruthy();
}); });
it('renders old meal name with strikethrough', () => { it('renders old meal name with strikethrough', () => {
@@ -32,7 +32,7 @@ describe('SwapSuggestionList', () => {
it('renders the easiest-first eyebrow label', () => { it('renders the easiest-first eyebrow label', () => {
render(SwapSuggestionList, { props: baseProps }); render(SwapSuggestionList, { props: baseProps });
expect(screen.getByText(/easiest first/i)).toBeTruthy(); expect(screen.getByText(/einfachste zuerst/i)).toBeTruthy();
}); });
it('renders all recipe names', () => { it('renders all recipe names', () => {
@@ -42,11 +42,11 @@ describe('SwapSuggestionList', () => {
expect(screen.getByText('Mushroom risotto')).toBeTruthy(); expect(screen.getByText('Mushroom risotto')).toBeTruthy();
}); });
it('clicking Pick calls onpick with recipeId and name', async () => { it('clicking Wählen calls onpick with recipeId and name', async () => {
const onpick = vi.fn(); const onpick = vi.fn();
const user = userEvent.setup(); const user = userEvent.setup();
render(SwapSuggestionList, { props: { ...baseProps, onpick } }); render(SwapSuggestionList, { props: { ...baseProps, onpick } });
const buttons = screen.getAllByRole('button', { name: /Pick/i }); const buttons = screen.getAllByRole('button', { name: /Wählen/i });
await user.click(buttons[0]); await user.click(buttons[0]);
expect(onpick).toHaveBeenCalledWith('r1', 'Quick carbonara'); expect(onpick).toHaveBeenCalledWith('r1', 'Quick carbonara');
}); });
@@ -68,21 +68,21 @@ describe('SwapSuggestionList', () => {
expect(screen.getByTestId('swap-empty-state')).toBeTruthy(); expect(screen.getByTestId('swap-empty-state')).toBeTruthy();
}); });
it('renders optional Cancel button when oncancel provided', () => { it('renders optional Abbrechen button when oncancel provided', () => {
render(SwapSuggestionList, { props: { ...baseProps, oncancel: vi.fn() } }); render(SwapSuggestionList, { props: { ...baseProps, oncancel: vi.fn() } });
expect(screen.getByRole('button', { name: /Cancel/i })).toBeTruthy(); expect(screen.getByRole('button', { name: /Abbrechen/i })).toBeTruthy();
}); });
it('does not render Cancel button when oncancel not provided', () => { it('does not render Abbrechen button when oncancel not provided', () => {
render(SwapSuggestionList, { props: baseProps }); render(SwapSuggestionList, { props: baseProps });
expect(screen.queryByRole('button', { name: /Cancel/i })).toBeNull(); expect(screen.queryByRole('button', { name: /Abbrechen/i })).toBeNull();
}); });
it('clicking Cancel calls oncancel', async () => { it('clicking Abbrechen calls oncancel', async () => {
const oncancel = vi.fn(); const oncancel = vi.fn();
const user = userEvent.setup(); const user = userEvent.setup();
render(SwapSuggestionList, { props: { ...baseProps, oncancel } }); render(SwapSuggestionList, { props: { ...baseProps, oncancel } });
await user.click(screen.getByRole('button', { name: /Cancel/i })); await user.click(screen.getByRole('button', { name: /Abbrechen/i }));
expect(oncancel).toHaveBeenCalledOnce(); expect(oncancel).toHaveBeenCalledOnce();
}); });
}); });