diff --git a/app/[locale]/(public)/audio/detail/[slug]/page.tsx b/app/[locale]/(public)/audio/detail/[slug]/page.tsx
index 9e2a89f8..826cc7dc 100644
--- a/app/[locale]/(public)/audio/detail/[slug]/page.tsx
+++ b/app/[locale]/(public)/audio/detail/[slug]/page.tsx
@@ -20,6 +20,7 @@ import Swal from "sweetalert2";
import { checkMaliciousText, getPublicLocaleTimestamp } from "@/utils/globals";
import parse from "html-react-parser";
import $ from "jquery";
+import { useTranslations } from "next-intl";
const formWaveSurferOptions = (ref: any) => ({
container: ref,
@@ -66,6 +67,8 @@ const DetailAudio = () => {
const [listSuggestion, setListSuggestion] = useState();
const MySwal = withReactContent(Swal);
const [visibleInput, setVisibleInput] = useState(null);
+ const t = useTranslations("LandingPage");
+
let typeString = "audio";
useEffect(() => {
@@ -250,11 +253,8 @@ const DetailAudio = () => {
};
const sizes = [
- { label: "XL", value: "3198 x 1798 px" },
- { label: "L", value: "2399 x 1349 px" },
- { label: "M", value: "1599 x 899 px" },
- { label: "S", value: "1066 x 599 px" },
- { label: "XS", value: "800 x 450 px" },
+ { label: "MP3", value: "... MB" },
+ { label: "WAV", value: "... MB" },
];
const handleShare = (type: any, url: any) => {
@@ -592,16 +592,20 @@ const DetailAudio = () => {
- oleh {detailDataAudio?.uploadedBy?.userLevel?.name}
+ {t("by")} {detailDataAudio?.uploadedBy?.userLevel?.name}
+
+
+ | {t("updatedOn")} {detailDataAudio?.updatedAt} WIB |
-
| Diupdate pada {detailDataAudio?.updatedAt} WIB |
{detailDataAudio?.clickCount}
-
Kreator: {detailDataAudio?.creatorName}
+
+ {t("creator")} {detailDataAudio?.creatorName}
+
{/* Keterangan */}
@@ -616,12 +620,12 @@ const DetailAudio = () => {
{isSaved ? (
handleDeleteWishlist()} className="flex flex-col mb-3 items-center justify-center cursor-pointer">
- Hapus
+ {t("delete")}
) : (
doBookmark()} className="flex flex-col mb-3 items-center justify-center cursor-pointer">
- Simpan
+ {t("save")}
)}
@@ -643,7 +647,7 @@ const DetailAudio = () => {
{/* Opsi Ukuran Foto */}
- Opsi Ukuran Audio
+ {t("audioSize")}
@@ -665,7 +669,7 @@ const DetailAudio = () => {
@@ -674,12 +678,12 @@ const DetailAudio = () => {
- Download
+ {t("download")}
{/* Tombol Bagikan */}
-
Bagikan
+
{t("share")}
handleShare("fb", `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}`)}>
@@ -697,13 +701,13 @@ const DetailAudio = () => {
-
Share Ke Email
+
{t("shareTo")}
-
Email Tujuan :
-
setEmailShareInput(event.target.value)} onKeyPress={handleEmailList} type="email" placeholder="Tekan Enter untuk input Email" />
+
{t("destinationEmail")}
+
setEmailShareInput(event.target.value)} onKeyPress={handleEmailList} type="email" placeholder={t("pressEnter")} />
@@ -717,10 +721,10 @@ const DetailAudio = () => {
{/* Comment */}
-
Berikan Komentar
+
{t("comment")}
@@ -749,11 +753,11 @@ const DetailAudio = () => {
onClick={() => showInput(`comment-id-${data.id}`)}
className="mr-2"
>
-
Balas
+
{t("reply")}
{Number(data.suggestionFrom?.id) == Number(userId) || Number(userRoleId) == 2 ? (
deleteData(data.id)}>
- Hapus
+ {t("delete")}
) : (
""
@@ -763,13 +767,13 @@ const DetailAudio = () => {
{visibleInput === `comment-id-${data.id}` && (
@@ -798,7 +802,7 @@ const DetailAudio = () => {
}
onClick={() => showInput(`comment-id-${child1.id}`)}
>
-
Balas
+
{t("reply")}
{
}
onClick={() => deleteData(child1.id)}
>
- Hapus
+ {t("delete")}
@@ -818,13 +822,13 @@ const DetailAudio = () => {
{visibleInput === `comment-id-${child1.id}` && (
@@ -853,7 +857,7 @@ const DetailAudio = () => {
}
onClick={() => showInput(`comment-id-${child2.id}`)}
>
- Balas
+ {t("reply")}
{
}
onClick={() => deleteData(child2.id)}
>
- Hapus
+ {t("delete")}
@@ -875,10 +879,10 @@ const DetailAudio = () => {
diff --git a/app/[locale]/(public)/document/detail/[slug]/page.tsx b/app/[locale]/(public)/document/detail/[slug]/page.tsx
index 07f35072..4293008e 100644
--- a/app/[locale]/(public)/document/detail/[slug]/page.tsx
+++ b/app/[locale]/(public)/document/detail/[slug]/page.tsx
@@ -18,6 +18,7 @@ import { checkMaliciousText, getPublicLocaleTimestamp } from "@/utils/globals";
import withReactContent from "sweetalert2-react-content";
import Swal from "sweetalert2";
import parse from "html-react-parser";
+import { useTranslations } from "next-intl";
const DetailDocument = () => {
const [selectedSize, setSelectedSize] = useState("L");
@@ -50,6 +51,7 @@ const DetailDocument = () => {
const [listSuggestion, setListSuggestion] = useState();
const MySwal = withReactContent(Swal);
const [visibleInput, setVisibleInput] = useState(null);
+ const t = useTranslations("LandingPage");
let typeString = "document";
@@ -139,11 +141,9 @@ const DetailDocument = () => {
};
const sizes = [
- { label: "XL", value: "3198 x 1798 px" },
- { label: "L", value: "2399 x 1349 px" },
- { label: "M", value: "1599 x 899 px" },
- { label: "S", value: "1066 x 599 px" },
- { label: "XS", value: "800 x 450 px" },
+ { label: "DOC", value: "...KB" },
+ { label: "PPT", value: "...KB" },
+ { label: "PDF", value: "...KB" },
];
async function sendActivityLog(activityTypeId: number) {
@@ -433,14 +433,22 @@ const DetailDocument = () => {
Kreator: {detailDataDocument?.creatorName}
*/}
- oleh {detailDataDocument?.uploadedBy?.userLevel?.name}
+ {t("by")} {detailDataDocument?.uploadedBy?.userLevel?.name}
+
+
+ | {t("updatedOn")} {detailDataDocument?.updatedAt} WIB |
-
| Diupdate pada {detailDataDocument?.updatedAt} WIB |
{detailDataDocument?.clickCount}
+
+
+ {t("creator")}
+ {detailDataDocument?.creatorName}
+
+
{/* Keterangan */}
@@ -455,12 +463,12 @@ const DetailDocument = () => {
{isSaved ? (
handleDeleteWishlist()} className="flex flex-col mb-3 items-center justify-center cursor-pointer">
- Hapus
+ {t("delete")}
) : (
doBookmark()} className="flex flex-col mb-3 items-center justify-center cursor-pointer">
- Simpan
+ {t("save")}
)}
@@ -482,7 +490,7 @@ const DetailDocument = () => {
{/* Opsi Ukuran Foto */}
- Opsi Ukuran Foto
+ {t("docSize")}
{sizes.map((size: any) => (
@@ -502,7 +510,7 @@ const DetailDocument = () => {
@@ -511,12 +519,12 @@ const DetailDocument = () => {
- Download
+ {t("download")}
{/* Tombol Bagikan */}
-
Bagikan
+
{t("share")}
handleShare("fb", `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}`)}>
@@ -534,13 +542,13 @@ const DetailDocument = () => {
-
Share Ke Email
+
{t("shareTo")}
-
Email Tujuan :
-
setEmailShareInput(event.target.value)} onKeyPress={handleEmailList} type="email" placeholder="Tekan Enter untuk input Email" />
+
{t("destinationEmail")}
+
setEmailShareInput(event.target.value)} onKeyPress={handleEmailList} type="email" placeholder={t("pressEnter")} />
@@ -554,10 +562,10 @@ const DetailDocument = () => {
{/* Comment */}
-
Berikan Komentar
+
{t("comment")}
@@ -586,11 +594,11 @@ const DetailDocument = () => {
onClick={() => showInput(`comment-id-${data.id}`)}
className="mr-2"
>
-
Balas
+
{t("reply")}
{Number(data.suggestionFrom?.id) == Number(userId) || Number(userRoleId) == 2 ? (
deleteData(data.id)}>
- Hapus
+ {t("delete")}
) : (
""
@@ -600,13 +608,13 @@ const DetailDocument = () => {
{visibleInput === `comment-id-${data.id}` && (
@@ -635,7 +643,7 @@ const DetailDocument = () => {
}
onClick={() => showInput(`comment-id-${child1.id}`)}
>
-
Balas
+
{t("reply")}
{
}
onClick={() => deleteData(child1.id)}
>
- Hapus
+ {t("delete")}
@@ -655,13 +663,13 @@ const DetailDocument = () => {
{visibleInput === `comment-id-${child1.id}` && (
@@ -690,7 +698,7 @@ const DetailDocument = () => {
}
onClick={() => showInput(`comment-id-${child2.id}`)}
>
- Balas
+ {t("reply")}
{
}
onClick={() => deleteData(child2.id)}
>
- Hapus
+ {t("delete")}
{visibleInput === `comment-id-${child2.id}` && (
diff --git a/app/[locale]/(public)/image/detail/[slug]/page.tsx b/app/[locale]/(public)/image/detail/[slug]/page.tsx
index afbc9f97..9a119d3e 100644
--- a/app/[locale]/(public)/image/detail/[slug]/page.tsx
+++ b/app/[locale]/(public)/image/detail/[slug]/page.tsx
@@ -473,7 +473,7 @@ const DetailInfo = () => {
{t("by")} {detailDataImage?.uploadedBy?.userLevel?.name}
- | {t("updateOn")}
+ | {t("updatedOn")}
{detailDataImage?.updatedAt} WIB |
diff --git a/app/[locale]/(public)/indeks/detail/[slug]/page.tsx b/app/[locale]/(public)/indeks/detail/[slug]/page.tsx
index f9a96517..af0d0358 100644
--- a/app/[locale]/(public)/indeks/detail/[slug]/page.tsx
+++ b/app/[locale]/(public)/indeks/detail/[slug]/page.tsx
@@ -10,6 +10,7 @@ import { Icon } from "@iconify/react/dist/iconify.js";
import { getCookiesDecrypt } from "@/lib/utils";
import { close, loading } from "@/config/swal";
import { Input } from "@/components/ui/input";
+import { useTranslations } from "next-intl";
const IndeksDetail = () => {
const searchParams = useSearchParams();
@@ -24,6 +25,7 @@ const IndeksDetail = () => {
const userRoleId = getCookiesDecrypt("urie");
const router: any = useRouter();
const [listComments, setListComments] = useState([]);
+ const t = useTranslations("LandingPage");
useEffect(() => {
initFetch();
@@ -154,7 +156,7 @@ const IndeksDetail = () => {
{/* Judul */}
-
Indeks / Detail
+ Index / Detail
{indeksData?.title}
{/* Gambar Utama */}
@@ -164,8 +166,8 @@ const IndeksDetail = () => {
{/* Footer Informasi */}
-
- oleh {indeksData?.uploaderName} | Diupdate pada {indeksData?.createdAt} WIB
+
+ {t("by")} {indeksData?.uploaderName} | {t("updatedOn")} {indeksData?.createdAt} WIB
@@ -180,10 +182,10 @@ const IndeksDetail = () => {
-
Berikan Komentar
+
{t("comment")}
@@ -202,7 +204,7 @@ const IndeksDetail = () => {
{data.message}
{data.children.length > 0
@@ -242,7 +244,7 @@ const IndeksDetail = () => {
{child1.message}
{child1.children.length > 0
@@ -282,7 +284,7 @@ const IndeksDetail = () => {
{child2.message}
@@ -320,7 +322,7 @@ const IndeksDetail = () => {
{/* Konten Serupa */}
-
Post Terkait
+
{t("relatedPosts")}
{indexData?.map((relate: any) => (
diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx
index bc54bb23..f0f17197 100644
--- a/app/[locale]/(public)/video/detail/[slug]/page.tsx
+++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx
@@ -440,7 +440,7 @@ const DetailVideo = () => {
{t("by")} {detailDataVideo?.uploadedBy?.userLevel?.name}
- | {t("updateOn")}
+ | {t("updatedOn")}
{detailDataVideo?.updatedAt} WIB |
@@ -536,7 +536,7 @@ const DetailVideo = () => {
{/* Tombol Bagikan */}
diff --git a/messages/en.json b/messages/en.json
index 57ea1d12..3124deeb 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -366,7 +366,7 @@
"previousSchedule": "Previous Schedule",
"speaker": "Speaker :",
"nextSchedule": "Next Schedule",
- "by": "By",
+ "by": "Uploaded By",
"updatedOn": "Update On",
"creator": "Creator :",
"delete": "Delete",
@@ -382,7 +382,10 @@
"leaveComment": "Leave your comments here.",
"reply": "Reply",
"cancel": "Cancel",
- "enterReply": "Enter Your Replay"
+ "enterReply": "Enter Your Replay",
+ "docSize": "Document Size Options",
+ "audioSize": "Audio Size Options",
+ "relatedPosts": "Related Posts"
},
"FilterPage": {
"image": "Image",
diff --git a/messages/in.json b/messages/in.json
index e82fa2d9..74cb5032 100644
--- a/messages/in.json
+++ b/messages/in.json
@@ -366,7 +366,7 @@
"previousSchedule": "Jadwal Sebelumnya",
"speaker": "Pembicara :",
"nextSchedule": "Jadwal Selanjutnya",
- "by": "Oleh",
+ "by": "Diunggah Oleh",
"updatedOn": "Diupdate pada",
"creator": "Kreator :",
"delete": "Hapus",
@@ -382,7 +382,10 @@
"reply": "Balas",
"cancel": "Batal",
"videoSize": "Opsi Ukuran Audio Visual",
- "enterReply": "Masukkan balasan Anda"
+ "enterReply": "Masukkan balasan Anda",
+ "docSize": "Opsi Ukuran Teks",
+ "audioSize": "Opsi Ukuran Audio",
+ "relatedPosts": "Post Terkait"
},
"FilterPage": {
"image": "Foto",