fix: missing translations for apps / integrations #438 (#674)

* fix: missing translations for apps / integrations #438

* chore: remove unnecessary property from integration new dropdown
This commit is contained in:
Meier Lukas
2024-06-16 22:10:17 +02:00
committed by GitHub
parent e957c6b601
commit f358c33bd3
5 changed files with 26 additions and 9 deletions

View File

@@ -36,10 +36,10 @@ export const AppForm = (props: AppFormProps) => {
return ( return (
<form onSubmit={form.onSubmit(handleSubmit)}> <form onSubmit={form.onSubmit(handleSubmit)}>
<Stack> <Stack>
<TextInput {...form.getInputProps("name")} withAsterisk label="Name" /> <TextInput {...form.getInputProps("name")} withAsterisk label={t("app.field.name.label")} />
<IconPicker initialValue={initialValues?.iconUrl} {...form.getInputProps("iconUrl")} /> <IconPicker initialValue={initialValues?.iconUrl} {...form.getInputProps("iconUrl")} />
<Textarea {...form.getInputProps("description")} label="Description" /> <Textarea {...form.getInputProps("description")} label={t("app.field.description.label")} />
<TextInput {...form.getInputProps("href")} label="URL" /> <TextInput {...form.getInputProps("href")} label={t("app.field.url.label")} />
<Group justify="end"> <Group justify="end">
<Button variant="default" component={Link} href="/manage/apps"> <Button variant="default" component={Link} href="/manage/apps">

View File

@@ -1,12 +1,16 @@
import { Container, Stack, Title } from "@mantine/core"; import { Container, Stack, Title } from "@mantine/core";
import { getI18n } from "@homarr/translation/server";
import { AppNewForm } from "./_app-new-form"; import { AppNewForm } from "./_app-new-form";
export default function AppNewPage() { export default async function AppNewPage() {
const t = await getI18n();
return ( return (
<Container> <Container>
<Stack> <Stack>
<Title>New app</Title> <Title>{t("app.page.create.title")}</Title>
<AppNewForm /> <AppNewForm />
</Stack> </Stack>
</Container> </Container>

View File

@@ -16,20 +16,21 @@ import { IconApps, IconPencil } from "@tabler/icons-react";
import type { RouterOutputs } from "@homarr/api"; import type { RouterOutputs } from "@homarr/api";
import { api } from "@homarr/api/server"; import { api } from "@homarr/api/server";
import { getI18n } from "@homarr/translation/server"; import { getI18n, getScopedI18n } from "@homarr/translation/server";
import { AppDeleteButton } from "./_app-delete-button"; import { AppDeleteButton } from "./_app-delete-button";
export default async function AppsPage() { export default async function AppsPage() {
const apps = await api.app.all(); const apps = await api.app.all();
const t = await getScopedI18n("app");
return ( return (
<Container> <Container>
<Stack> <Stack>
<Group justify="space-between" align="center"> <Group justify="space-between" align="center">
<Title>Apps</Title> <Title>{t("page.list.title")}</Title>
<Button component={Link} href="/manage/apps/new"> <Button component={Link} href="/manage/apps/new">
New app {t("page.create.title")}
</Button> </Button>
</Group> </Group>
{apps.length === 0 && <AppNoResults />} {apps.length === 0 && <AppNoResults />}

View File

@@ -83,7 +83,7 @@ export const IconPicker = ({ initialValue, onChange, error, onFocus, onBlur }: I
rightSectionPointerEvents="none" rightSectionPointerEvents="none"
withAsterisk withAsterisk
error={error} error={error}
label="Icon URL" label={t("iconPicker.label")}
/> />
</Combobox.Target> </Combobox.Target>

View File

@@ -317,6 +317,17 @@ export default {
}, },
}, },
}, },
field: {
name: {
label: "Name",
},
description: {
label: "Description",
},
url: {
label: "Url",
},
},
}, },
integration: { integration: {
page: { page: {
@@ -453,6 +464,7 @@ export default {
tryAgain: "Try again", tryAgain: "Try again",
}, },
iconPicker: { iconPicker: {
label: "Icon URL",
header: "Type name or objects to filter for icons... Homarr will search through {countIcons} icons for you.", header: "Type name or objects to filter for icons... Homarr will search through {countIcons} icons for you.",
}, },
information: { information: {