feat: translate 'Action' to 'Tindakan' and update validation messages
This commit is contained in:
@@ -31,7 +31,7 @@ export const contentSchema = z.object({
|
||||
.nullable(),
|
||||
)
|
||||
.refine((data) => data.length, {
|
||||
message: 'Please select a category',
|
||||
message: 'Pilih kategori',
|
||||
}),
|
||||
tags: z
|
||||
.array(
|
||||
@@ -46,17 +46,17 @@ export const contentSchema = z.object({
|
||||
)
|
||||
.optional(),
|
||||
title: z.string().min(1, {
|
||||
message: 'Judul is required',
|
||||
message: 'Wajib diisi',
|
||||
}),
|
||||
content: z.string().min(1, {
|
||||
message: 'Konten is required',
|
||||
message: 'Wajib diisi',
|
||||
}),
|
||||
featured_image: z.string().url({
|
||||
message: 'Gambar Unggulan must be a valid URL',
|
||||
message: 'URL tidak valid',
|
||||
}),
|
||||
is_premium: z.boolean().optional(),
|
||||
live_at: z.string().min(1, {
|
||||
message: 'Tanggal mulai tayang is required',
|
||||
message: 'Pilih tanggal',
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -144,7 +144,7 @@ export const FormContentsPage = (properties: TProperties) => {
|
||||
size="lg"
|
||||
className="text-md h-[42px] rounded-md"
|
||||
>
|
||||
Save
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex items-end justify-between gap-4">
|
||||
@@ -154,7 +154,7 @@ export const FormContentsPage = (properties: TProperties) => {
|
||||
name="categories"
|
||||
label="Kategori"
|
||||
placeholder={
|
||||
watchCategories
|
||||
watchCategories?.length
|
||||
? watchCategories.map((category) => category?.name).join(', ')
|
||||
: 'Pilih Kategori'
|
||||
}
|
||||
@@ -167,11 +167,11 @@ export const FormContentsPage = (properties: TProperties) => {
|
||||
multiple
|
||||
id="tags"
|
||||
name="tags"
|
||||
label="Tags"
|
||||
label="Tag"
|
||||
placeholder={
|
||||
watchTags
|
||||
watchTags?.length
|
||||
? watchTags.map((tag) => tag?.name).join(', ')
|
||||
: 'Pilih Tags'
|
||||
: 'Pilih Tag'
|
||||
}
|
||||
options={tags}
|
||||
className="border-0 bg-white shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none"
|
||||
@@ -180,7 +180,7 @@ export const FormContentsPage = (properties: TProperties) => {
|
||||
/>
|
||||
<Input
|
||||
id="live_at"
|
||||
label="Tanggal Mulai Tayang"
|
||||
label="Mulai Tayang"
|
||||
placeholder="Pilih Tanggal"
|
||||
name="live_at"
|
||||
type="date"
|
||||
@@ -190,7 +190,7 @@ export const FormContentsPage = (properties: TProperties) => {
|
||||
<Switch
|
||||
id="is_premium"
|
||||
name="is_premium"
|
||||
label="Subscription"
|
||||
label="Tipe Langganan"
|
||||
labelClassName="text-sm font-medium text-[#363636]"
|
||||
className="h-[42px]"
|
||||
options={{ true: 'Premium', false: 'Biasa' }}
|
||||
|
||||
Reference in New Issue
Block a user