Skip to content

Commit

Permalink
fix(translations): add missing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane committed Oct 11, 2023
1 parent bf55263 commit 8939ad6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/CardMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const CardMenu: React.FC<CardMenuProps> = memo(({ video }) => {
)}
</>
) : null}
<Menu.Label>Other</Menu.Label>
<Menu.Label>{t("menu.video.other")}</Menu.Label>
<Menu.Item icon={<IconDownload size={14} />}>
{t("menu.video.download")}
</Menu.Item>
Expand Down
29 changes: 16 additions & 13 deletions src/components/ModalAddCustomInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const DOMAIN_REGEX =

export const ModalAddCustomInstance = memo(() => {
const [opened, setOpened] = useState(false);
const { t } = useTranslation("translation", {
keyPrefix: "modal.instance.add",
});
const { t } = useTranslation("translation");
const form = useForm({
initialValues: {
domain: "",
Expand Down Expand Up @@ -71,8 +69,10 @@ export const ModalAddCustomInstance = memo(() => {
}));

notifications.show({
title: t("notification.title"),
message: `${instance.domain} ${t("notification.message")}`,
title: t("modal.instance.add.notification.title"),
message: `${instance.domain} ${t(
"modal.instance.add.notification.message"
)}`,
});

setOpened(false);
Expand All @@ -85,30 +85,33 @@ export const ModalAddCustomInstance = memo(() => {
onClose={() => setOpened(false)}
centered
size="lg"
title={t("title")}
title={t("modal.instance.add.title")}
>
<Form onSubmit={form.onSubmit((values) => handleSubmit(values))}>
<TextInput
data-autofocus
placeholder={t("input.placeholder") as string}
label={t("input.label")}
description={t("input.description")}
placeholder={t("modal.instance.add.input.placeholder") as string}
label={t("modal.instance.add.input.label")}
description={t("modal.instance.add.input.description")}
{...form.getInputProps("domain")}
/>
<Space h="sm" />
<Select
label="Type"
label={t("settings.general.invidious.type")}
{...form.getInputProps("type")}
data={[{ label: "https", value: "https" }]}
/>
<Space h="lg" />
<Checkbox label={t("default")} {...form.getInputProps("isDefault")} />
<Checkbox
label={t("modal.instance.add.default")}
{...form.getInputProps("isDefault")}
/>
<Flex gap={8} justify="flex-end" mt="xl">
<Button onClick={() => setOpened(false)} color="gray">
{t("button.cancel")}
{t("modal.instance.add.button.cancel")}
</Button>
<Button type="submit" disabled={!form.isValid()}>
{t("button.submit")}
{t("modal.instance.add.button.submit")}
</Button>
</Flex>
</Form>
Expand Down

0 comments on commit 8939ad6

Please sign in to comment.