From 35c02d1643361a4727cdf51fb39a7736db52b748 Mon Sep 17 00:00:00 2001 From: Ardeman Date: Tue, 25 Mar 2025 01:20:20 +0800 Subject: [PATCH] feat: update UI text to Indonesian language across various components and pages --- app/components/dialog/success.tsx | 2 +- app/layouts/admin/menu.ts | 8 +++--- app/layouts/admin/sidebar.tsx | 2 +- app/layouts/news/dialog-register.tsx | 6 ++--- app/layouts/news/dialog-subscribe-plan.tsx | 8 +++--- app/pages/dashboard-advertisements/index.tsx | 12 ++++----- app/pages/dashboard-contents/index.tsx | 2 +- app/pages/dashboard-subscribe-plan/index.tsx | 27 ++++++++++---------- app/pages/dashboard-subscriptions/index.tsx | 4 +-- app/pages/dashboard-users/index.tsx | 6 ++--- app/pages/dashboard/data.ts | 10 ++++---- app/pages/form-advertisements/index.tsx | 4 +-- app/pages/form-contents/index.tsx | 2 +- app/pages/form-subscribe-plan/index.tsx | 14 +++++----- 14 files changed, 53 insertions(+), 54 deletions(-) diff --git a/app/components/dialog/success.tsx b/app/components/dialog/success.tsx index bd55460..e2d018c 100644 --- a/app/components/dialog/success.tsx +++ b/app/components/dialog/success.tsx @@ -117,7 +117,7 @@ export const DialogSuccess = ({ isOpen, onClose }: ModalProperties) => { setIsSubscribeOpen(true) }} > - Select Subscribe Plan + Pilih Paken Berlangganan ) : ( @@ -86,7 +86,7 @@ export const AdvertisementsPage = () => { size="icon" variant="danger" onClick={() => setSelectedAds(data)} - title="Hapus Banner Iklan" + title="Hapus Spanduk Iklan" > @@ -96,7 +96,7 @@ export const AdvertisementsPage = () => { return (
- +
{/* TODO: Filter */}
@@ -106,7 +106,7 @@ export const AdvertisementsPage = () => { size="lg" className="text-md h-[42px] px-4" > - Buat Banner Iklan + Buat Spanduk Iklan
@@ -114,13 +114,13 @@ export const AdvertisementsPage = () => { data={dataTable} columns={dataColumns} slots={dataSlot} - title="Daftar Banner Iklan" + title="Daftar Spanduk Iklan" /> setSelectedAds(undefined)} - title="Banner iklan" + title="Spanduk iklan" fetcherAction={`/actions/admin/advertisements/delete/${selectedAds?.id}`} > {
) : (
- Normal + Biasa
), 7: (value: number) => formatNumberWithPeriods(value), diff --git a/app/pages/dashboard-subscribe-plan/index.tsx b/app/pages/dashboard-subscribe-plan/index.tsx index 2f450ea..f2eedd8 100644 --- a/app/pages/dashboard-subscribe-plan/index.tsx +++ b/app/pages/dashboard-subscribe-plan/index.tsx @@ -3,8 +3,8 @@ import { PlusIcon, TrashIcon, } from '@heroicons/react/24/solid' -import DT from 'datatables.net-dt' -import DataTable from 'datatables.net-react' +import DT, { type ConfigColumns } from 'datatables.net-dt' +import DataTable, { type DataTableSlots } from 'datatables.net-react' import { useState } from 'react' import { Link, useRouteLoaderData } from 'react-router' @@ -27,7 +27,7 @@ export const SubscribePlanPage = () => { DataTable.use(DT) const { subscribePlanData: dataTable } = loaderData || {} - const dataColumns = [ + const dataColumns: ConfigColumns[] = [ { title: 'No', render: ( @@ -48,12 +48,13 @@ export const SubscribePlanPage = () => { data: 'code', }, { - title: 'Length', + title: 'Durasi', data: 'length', }, { title: 'Harga', data: 'price', + className: 'dt-type-numeric', }, { title: 'Status', @@ -64,10 +65,8 @@ export const SubscribePlanPage = () => { data: 'id', }, ] - const dataSlot = { - 4: (value: number) => ( -
Rp. {formatNumberWithPeriods(value)}
- ), + const dataSlot: DataTableSlots = { + 4: (value: number) => `Rp. ${formatNumberWithPeriods(value)}`, 5: (value: number) => ( { as="a" href={`/lg-admin/subscribe-plan/update/${value}`} size="icon" - title="Update Subscribe Plan" + title="Update Paket Berlangganan" > @@ -93,7 +92,7 @@ export const SubscribePlanPage = () => { size="icon" variant="danger" onClick={() => setSelectedSubscribePlan(data)} - title="Hapus Subscribe Plan" + title="Hapus Paket Berlangganan" > @@ -102,7 +101,7 @@ export const SubscribePlanPage = () => { } return (
- +
{/* TODO: Filter */}
@@ -125,13 +124,13 @@ export const SubscribePlanPage = () => { ordering: true, info: true, }} - title=" Daftar Subscribe Plan" + title=" Daftar Paket Berlangganan" /> setSelectedSubscribePlan(undefined)} - title="Subscribe plan" + title="Paket Berlangganan" fetcherAction={`/actions/admin/subscribe-plan/delete/${selectedSubscribePlan?.id}`} >

{selectedSubscribePlan?.name}

diff --git a/app/pages/dashboard-subscriptions/index.tsx b/app/pages/dashboard-subscriptions/index.tsx index 2767fe5..a6ff2a9 100644 --- a/app/pages/dashboard-subscriptions/index.tsx +++ b/app/pages/dashboard-subscriptions/index.tsx @@ -27,7 +27,7 @@ export const SubscriptionsPage = () => { return (
- +
@@ -71,7 +71,7 @@ export const SubscriptionsPage = () => { ordering: true, info: true, }} - title="Daftar Subscription" + title="Daftar Pelanggan" />
) diff --git a/app/pages/dashboard-users/index.tsx b/app/pages/dashboard-users/index.tsx index 9a54eaa..0632c07 100644 --- a/app/pages/dashboard-users/index.tsx +++ b/app/pages/dashboard-users/index.tsx @@ -39,7 +39,7 @@ export const UsersPage = () => { data: 'created_at', }, { - title: 'User', + title: 'Pengguna', }, { title: 'Phone', @@ -70,7 +70,7 @@ export const UsersPage = () => { return (
- +
{/* TODO: Filter */}
@@ -80,7 +80,7 @@ export const UsersPage = () => { data={dataTable || []} columns={dataColumns} slots={dataSlot} - title="Daftar User" + title="Daftar Pengguna" />
) diff --git a/app/pages/dashboard/data.ts b/app/pages/dashboard/data.ts index 1feb7ba..88200c4 100644 --- a/app/pages/dashboard/data.ts +++ b/app/pages/dashboard/data.ts @@ -1,10 +1,10 @@ import { ChartBarIcon, ChartPieIcon } from '@heroicons/react/24/solid' export const REPORT = [ - { title: 'Total User', amount: 8, icon: ChartBarIcon }, - { title: '⁠Total User Subscribe', amount: 0, icon: ChartBarIcon }, + { title: 'Total Pengguna', amount: 8, icon: ChartBarIcon }, + { title: '⁠Total Pelanggan', amount: 0, icon: ChartBarIcon }, { - title: 'Total Nilai Subscribe', + title: 'Total Nilai Berlangganan', amount: 0, icon: ChartBarIcon, currency: 'Rp. ', @@ -13,12 +13,12 @@ export const REPORT = [ export const HISTORY = [ { - title: 'Total Content Biasa', + title: 'Total Artikel Biasa', amount: 7, icon: ChartPieIcon, }, { - title: 'Total Content Premium', + title: 'Total Artikel Premium', amount: 3, icon: ChartPieIcon, }, diff --git a/app/pages/form-advertisements/index.tsx b/app/pages/form-advertisements/index.tsx index c6900ab..c5b8b2b 100644 --- a/app/pages/form-advertisements/index.tsx +++ b/app/pages/form-advertisements/index.tsx @@ -57,7 +57,7 @@ export const FormAdvertisementsPage = (properties: TProperties) => { } if (fetcher.data?.success) { - toast.success(`Banner iklan berhasil ${adData ? 'diupdate' : 'dibuat'}!`) + toast.success(`Spanduk iklan berhasil ${adData ? 'diupdate' : 'dibuat'}!`) navigate('/lg-admin/advertisements') } // eslint-disable-next-line react-hooks/exhaustive-deps @@ -65,7 +65,7 @@ export const FormAdvertisementsPage = (properties: TProperties) => { return (
- +
{ label="Subscription" labelClassName="text-sm font-medium text-[#363636]" className="h-[42px]" - options={{ true: 'Premium', false: 'Normal' }} + options={{ true: 'Premium', false: 'Biasa' }} />
diff --git a/app/pages/form-subscribe-plan/index.tsx b/app/pages/form-subscribe-plan/index.tsx index e0d3d4f..8ae7170 100644 --- a/app/pages/form-subscribe-plan/index.tsx +++ b/app/pages/form-subscribe-plan/index.tsx @@ -54,7 +54,7 @@ export const FormSubscribePlanPage = (properties: TProperties) => { if (fetcher.data?.success) { toast.success( - `Subscribe Plan berhasil ${subscribePlanData ? 'diupdate' : 'dibuat'}!`, + `Paket Berlangganan berhasil ${subscribePlanData ? 'diupdate' : 'dibuat'}!`, ) navigate('/lg-admin/subscribe-plan') } @@ -69,7 +69,7 @@ export const FormSubscribePlanPage = (properties: TProperties) => { return (
@@ -82,8 +82,8 @@ export const FormSubscribePlanPage = (properties: TProperties) => {
{ {