fix(planner): translate MealActionSheet button labels to German

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 10:30:39 +02:00
parent 8e3256d960
commit 278fda7d90
2 changed files with 16 additions and 16 deletions

View File

@@ -79,7 +79,7 @@
style="width:100%;background:var(--orange-tint);border:1px solid #FBCDA4;color:var(--orange-dark);font-family:var(--font-sans);font-size:13px;font-weight:500;border-radius:var(--radius-lg);padding:12px;text-align:center;cursor:pointer"
onclick={onswap}
>
Swap this meal
Gericht tauschen
</button>
{#if slot.recipe}
@@ -87,14 +87,14 @@
href="/recipes/{slot.recipe.id}/cook"
style="display:block;width:100%;background:var(--green-tint);border:1px solid var(--green-light);color:var(--green-dark);font-family:var(--font-sans);font-size:13px;font-weight:500;border-radius:var(--radius-lg);padding:12px;text-align:center;box-sizing:border-box;text-decoration:none"
>
🍳 Cook now
🍳 Jetzt kochen
</a>
<a
href="/recipes/{slot.recipe.id}"
style="display:block;width:100%;background:var(--color-subtle);border:1px solid var(--color-border);color:var(--color-text-muted);font-family:var(--font-sans);font-size:13px;font-weight:500;border-radius:var(--radius-lg);padding:12px;text-align:center;box-sizing:border-box;text-decoration:none"
>
👁 View recipe
👁 Rezept ansehen
</a>
{/if}
@@ -103,7 +103,7 @@
style="width:100%;background:none;border:none;color:var(--color-text-muted);font-family:var(--font-sans);font-size:13px;text-align:center;cursor:pointer;padding:12px"
onclick={oncancel}
>
Cancel
Abbrechen
</button>
</div>
</div>

View File

@@ -30,37 +30,37 @@ describe('MealActionSheet', () => {
it('renders all 4 action buttons', () => {
render(MealActionSheet, { props: baseProps });
expect(screen.getByRole('button', { name: /Swap this meal/i })).toBeTruthy();
expect(screen.getByRole('link', { name: /Cook now/i })).toBeTruthy();
expect(screen.getByRole('link', { name: /View recipe/i })).toBeTruthy();
expect(screen.getByRole('button', { name: /Cancel/i })).toBeTruthy();
expect(screen.getByRole('button', { name: /Gericht tauschen/i })).toBeTruthy();
expect(screen.getByRole('link', { name: /Jetzt kochen/i })).toBeTruthy();
expect(screen.getByRole('link', { name: /Rezept ansehen/i })).toBeTruthy();
expect(screen.getByRole('button', { name: /Abbrechen/i })).toBeTruthy();
});
it('Cook now links to the cook route', () => {
it('Jetzt kochen links to the cook route', () => {
render(MealActionSheet, { props: baseProps });
const link = screen.getByRole('link', { name: /Cook now/i });
const link = screen.getByRole('link', { name: /Jetzt kochen/i });
expect(link.getAttribute('href')).toBe('/recipes/r1/cook');
});
it('View recipe links to the recipe detail route', () => {
it('Rezept ansehen links to the recipe detail route', () => {
render(MealActionSheet, { props: baseProps });
const link = screen.getByRole('link', { name: /View recipe/i });
const link = screen.getByRole('link', { name: /Rezept ansehen/i });
expect(link.getAttribute('href')).toBe('/recipes/r1');
});
it('clicking Swap this meal calls onswap', async () => {
it('clicking Gericht tauschen calls onswap', async () => {
const onswap = vi.fn();
const user = userEvent.setup();
render(MealActionSheet, { props: { ...baseProps, onswap } });
await user.click(screen.getByRole('button', { name: /Swap this meal/i }));
await user.click(screen.getByRole('button', { name: /Gericht tauschen/i }));
expect(onswap).toHaveBeenCalledOnce();
});
it('clicking Cancel calls oncancel', async () => {
it('clicking Abbrechen calls oncancel', async () => {
const oncancel = vi.fn();
const user = userEvent.setup();
render(MealActionSheet, { props: { ...baseProps, oncancel } });
await user.click(screen.getByRole('button', { name: /Cancel/i }));
await user.click(screen.getByRole('button', { name: /Abbrechen/i }));
expect(oncancel).toHaveBeenCalledOnce();
});