i18n(hem+nav) + fix(samtycke-layout): hem-fliken, nav-titlar, samtyckesrad bryter inte
- profile.tsx: samtyckesraden fick flex:1 på texten så längre språk (t.ex. spanska) inte trycker på/av-knappen ur läge (låg till vänster förut) - home.tsx: Dina sparade recept, Skicka in eget recept, matlager-underrubrik, Allt/Öppna, platsnamn (Kyl/Frys/Skafferi...) -> t() (via typ, ej svenskt DB-namn) - _layout.tsx: nav-titlar (Bläddra recept, Sparade recept, Matlager, Streckkod, Byt ut) -> t() - 15 nya nycklar (home.*/nav.*) i alla 12 språk Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -127,28 +127,28 @@ export default function HomeScreen() {
|
||||
</Row>
|
||||
|
||||
<Card onPress={() => router.push("/saved-recipes")}>
|
||||
<Body>⭐ Dina sparade recept</Body>
|
||||
<Body>⭐ {t("home.savedRecipes")}</Body>
|
||||
</Card>
|
||||
|
||||
<Card onPress={() => router.push("/submit-recipe")}>
|
||||
<Body>✍️ Skicka in eget recept</Body>
|
||||
<Body>✍️ {t("home.submitRecipe")}</Body>
|
||||
</Card>
|
||||
|
||||
{/* Matlager – städat, öppnas per plats eller som helhet (spec §8). */}
|
||||
<Card>
|
||||
<Heading>🧺 {t("home.inventory")}</Heading>
|
||||
<Small>Allt du har hemma – öppna en plats eller sök i hela lagret.</Small>
|
||||
<Small>{t("home.inventorySubtitle")}</Small>
|
||||
<Row style={{ marginTop: spacing.xs }}>
|
||||
{locations.map((loc) => (
|
||||
<Button
|
||||
key={loc.type}
|
||||
label={loc.name}
|
||||
label={LOCATION_ORDER.includes(loc.type) ? t(`home.location.${loc.type}`) : loc.name}
|
||||
variant="ghost"
|
||||
onPress={() => router.push(`/kitchen?loc=${loc.type}`)}
|
||||
/>
|
||||
))}
|
||||
<Button
|
||||
label={locations.length ? "Allt" : "Öppna"}
|
||||
label={locations.length ? t("home.openAll") : t("home.open")}
|
||||
variant="primary"
|
||||
onPress={() => router.push("/kitchen")}
|
||||
/>
|
||||
|
||||
@@ -79,7 +79,7 @@ export default function RootLayout() {
|
||||
options={{ title: "", presentation: "fullScreenModal" }}
|
||||
/>
|
||||
<Stack.Screen name="scan-review/[jobId]" options={{ title: t("scan.review.title"), fullScreenGestureEnabled: false }} />
|
||||
<Stack.Screen name="swap-meal/[entryId]" options={{ presentation: "modal", title: "Byt ut" }} />
|
||||
<Stack.Screen name="swap-meal/[entryId]" options={{ presentation: "modal", title: t("nav.swap") }} />
|
||||
<Stack.Screen name="meal-review/[jobId]" options={{ title: t("scan.meal.title"), fullScreenGestureEnabled: false }} />
|
||||
<Stack.Screen name="reconciliation" options={{ title: t("reconciliation.title") }} />
|
||||
<Stack.Screen name="scan-diff-review/[jobId]" options={{ title: t("scan.review.title"), fullScreenGestureEnabled: false }} />
|
||||
@@ -87,9 +87,9 @@ export default function RootLayout() {
|
||||
<Stack.Screen name="meal-boxes" options={{ title: t("mealbox.title"), presentation: "modal" }} />
|
||||
<Stack.Screen name="household" options={{ title: t("home.household"), presentation: "modal" }} />
|
||||
<Stack.Screen name="memory" options={{ title: t("memory.title") }} />
|
||||
<Stack.Screen name="saved-recipes" options={{ title: "Sparade recept" }} />
|
||||
<Stack.Screen name="recipes" options={{ title: "Bläddra recept" }} />
|
||||
<Stack.Screen name="kitchen" options={{ title: "Matlager" }} />
|
||||
<Stack.Screen name="saved-recipes" options={{ title: t("nav.savedRecipes") }} />
|
||||
<Stack.Screen name="recipes" options={{ title: t("nav.browseRecipes") }} />
|
||||
<Stack.Screen name="kitchen" options={{ title: t("nav.kitchen") }} />
|
||||
<Stack.Screen name="profile" options={{ title: t("profile.title"), presentation: "modal" }} />
|
||||
<Stack.Screen
|
||||
name="paywall"
|
||||
@@ -99,7 +99,7 @@ export default function RootLayout() {
|
||||
name="log-meal"
|
||||
options={{ title: t("myday.logMeal"), presentation: "modal" }}
|
||||
/>
|
||||
<Stack.Screen name="barcode" options={{ title: "Streckkod" }} />
|
||||
<Stack.Screen name="barcode" options={{ title: t("nav.barcode") }} />
|
||||
</Stack>
|
||||
</AnalyticsProvider>
|
||||
</PersistQueryClientProvider>
|
||||
|
||||
@@ -271,8 +271,8 @@ export default function ProfileScreen() {
|
||||
{CONSENT_KINDS.map((kind) => {
|
||||
const granted = consentMap.get(kind) === "granted";
|
||||
return (
|
||||
<Row key={kind} style={{ justifyContent: "space-between" }}>
|
||||
<Small>{t(`profile.consent.${kind}`)}</Small>
|
||||
<Row key={kind} style={{ justifyContent: "space-between", alignItems: "center" }}>
|
||||
<Small style={{ flex: 1, marginRight: 12 }}>{t(`profile.consent.${kind}`)}</Small>
|
||||
<Button
|
||||
label={granted ? t("common.on") : t("common.off")}
|
||||
variant={granted ? "secondary" : "ghost"}
|
||||
|
||||
Reference in New Issue
Block a user