fix lang
This commit is contained in:
parent
07dac276b8
commit
518e323c63
|
|
@ -7,7 +7,7 @@ import { AlertTriangle, Check, ChevronLeft, Loader2, Plus } from "lucide-react";
|
||||||
import { FMLocal, FMProps } from "../typings";
|
import { FMLocal, FMProps } from "../typings";
|
||||||
import { editorFormData } from "./ed-data";
|
import { editorFormData } from "./ed-data";
|
||||||
import { formError } from "./error";
|
import { formError } from "./error";
|
||||||
import { lang } from "lib/lang";
|
import { lang, translate } from "lib/lang";
|
||||||
|
|
||||||
export const formInit = (fm: FMLocal, props: FMProps) => {
|
export const formInit = (fm: FMLocal, props: FMProps) => {
|
||||||
for (const [k, v] of Object.entries(props)) {
|
for (const [k, v] of Object.entries(props)) {
|
||||||
|
|
@ -207,7 +207,7 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
||||||
|
|
||||||
if (fm.is_newly_created) {
|
if (fm.is_newly_created) {
|
||||||
fm.is_newly_created = false;
|
fm.is_newly_created = false;
|
||||||
toastSuccess({ addNewText: "Add Another" });
|
toastSuccess({ addNewText: translate("Add Another") });
|
||||||
}
|
}
|
||||||
|
|
||||||
fm.status = "ready";
|
fm.status = "ready";
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,5 @@ export const langEn = {
|
||||||
Delete: "Delete",
|
Delete: "Delete",
|
||||||
"Record Saved": "Record Saved",
|
"Record Saved": "Record Saved",
|
||||||
"Search": "Search",
|
"Search": "Search",
|
||||||
|
"Add Another": "Add Another",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@ export const langId: Record<LangKeyword, string> = {
|
||||||
Delete: "Hapus",
|
Delete: "Hapus",
|
||||||
"Record Saved": "Data Tersimpan",
|
"Record Saved": "Data Tersimpan",
|
||||||
Search: "Cari",
|
Search: "Cari",
|
||||||
|
"Add Another": "Tambah Baru",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,5 @@ export const lang = {
|
||||||
},
|
},
|
||||||
base: null as null | Record<LangKeyword, string>,
|
base: null as null | Record<LangKeyword, string>,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const translate = lang.t;
|
||||||
Loading…
Reference in New Issue