I18n fixes (#17699)

* fix norwegian

* fix face library keys

* add russian
This commit is contained in:
Josh Hawkins 2025-04-14 17:09:18 -05:00 committed by GitHub
parent bd0ee86db9
commit 34e34b8b15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 8 deletions

View File

@ -81,7 +81,8 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
{ code: "zh-CN", label: t("menu.language.zhCN") },
{ code: "tr", label: t("menu.language.tr") },
{ code: "nl", label: t("menu.language.nl") },
{ code: "nb", label: t("menu.language.nb") },
{ code: "nb-NO", label: t("menu.language.nb") },
{ code: "ru", label: t("menu.language.ru") },
];
// settings

View File

@ -288,7 +288,7 @@ function ObjectDetailsTab({
setSimilarity,
setInputFocused,
}: ObjectDetailsTabProps) {
const { t } = useTranslation(["views/explore"]);
const { t } = useTranslation(["views/explore", "views/faceLibrary"]);
const apiHost = useApiHost();
@ -664,9 +664,12 @@ function ObjectDetailsTab({
.post(`/faces/train/${trainName}/classify`, { event_id: search.id })
.then((resp) => {
if (resp.status == 200) {
toast.success(t("toast.success.trainedFace"), {
position: "top-center",
});
toast.success(
t("toast.success.trainedFace", { ns: "views/faceLibrary" }),
{
position: "top-center",
},
);
}
})
.catch((error) => {
@ -674,9 +677,15 @@ function ObjectDetailsTab({
error.response?.data?.message ||
error.response?.data?.detail ||
"Unknown error";
toast.error(t("toast.error.trainFailed", { errorMessage }), {
position: "top-center",
});
toast.error(
t("toast.error.trainFailed", {
ns: "views/faceLibrary",
errorMessage,
}),
{
position: "top-center",
},
);
});
},
[search, t],
@ -684,6 +693,7 @@ function ObjectDetailsTab({
return (
<div className="flex flex-col gap-5">
{t("toast.success.trainedFace", { ns: "views/faceLibrary" })}
<div className="flex w-full flex-row">
<div className="flex w-full flex-col gap-3">
<div className="flex flex-col gap-1.5">