diff --git a/comps/form/utils/init.tsx b/comps/form/utils/init.tsx index f7b46e2..02cd4eb 100755 --- a/comps/form/utils/init.tsx +++ b/comps/form/utils/init.tsx @@ -7,7 +7,7 @@ import { AlertTriangle, Check, ChevronLeft, Loader2, Plus } from "lucide-react"; import { FMLocal, FMProps } from "../typings"; import { editorFormData } from "./ed-data"; import { formError } from "./error"; -import { lang } from "lib/lang"; +import { lang, translate } from "lib/lang"; export const formInit = (fm: FMLocal, props: FMProps) => { for (const [k, v] of Object.entries(props)) { @@ -207,7 +207,7 @@ export const formInit = (fm: FMLocal, props: FMProps) => { if (fm.is_newly_created) { fm.is_newly_created = false; - toastSuccess({ addNewText: "Add Another" }); + toastSuccess({ addNewText: translate("Add Another") }); } fm.status = "ready"; diff --git a/lang/en.ts b/lang/en.ts index ccaf2de..2d44d4a 100755 --- a/lang/en.ts +++ b/lang/en.ts @@ -4,4 +4,5 @@ export const langEn = { Delete: "Delete", "Record Saved": "Record Saved", "Search": "Search", + "Add Another": "Add Another", }; diff --git a/lang/id.ts b/lang/id.ts index 521f239..60df996 100755 --- a/lang/id.ts +++ b/lang/id.ts @@ -6,4 +6,5 @@ export const langId: Record = { Delete: "Hapus", "Record Saved": "Data Tersimpan", Search: "Cari", + "Add Another": "Tambah Baru", }; diff --git a/lang/index.ts b/lang/index.ts index 67a4bb6..c757383 100755 --- a/lang/index.ts +++ b/lang/index.ts @@ -14,3 +14,5 @@ export const lang = { }, base: null as null | Record, }; + +export const translate = lang.t; \ No newline at end of file