mirror of
https://github.com/dyzulk/trustlab.git
synced 2026-01-26 13:32:06 +07:00
feat: localize all hardcoded strings in Root CA Management and Archive UI
This commit is contained in:
@@ -62,25 +62,21 @@ export default function RootCaManagementClient() {
|
||||
setActiveSync(syncKey);
|
||||
try {
|
||||
let endpoint = "/api/admin/ca-certificates/sync-cdn";
|
||||
let msg = `Sync successful (Mode: ${mode})`;
|
||||
|
||||
if (type === 'crt') {
|
||||
endpoint = "/api/admin/ca-certificates/sync-crt";
|
||||
msg = `CRT Files Sync successful (${mode})`;
|
||||
} else if (type === 'installers') {
|
||||
endpoint = "/api/admin/ca-certificates/sync-installers";
|
||||
msg = `Individual Installers Sync successful (${mode})`;
|
||||
} else if (type === 'bundles') {
|
||||
endpoint = "/api/admin/ca-certificates/sync-bundles";
|
||||
msg = "Global Bundles Sync successful";
|
||||
}
|
||||
|
||||
const response = await axios.post(endpoint, { mode });
|
||||
addToast(response.data.message || msg, "success");
|
||||
addToast(response.data.message || t("toast_sync_success"), "success");
|
||||
mutate();
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
addToast(err.response?.data?.message || "Sync failed", "error");
|
||||
addToast(err.response?.data?.message || t("toast_sync_failed"), "error");
|
||||
} finally {
|
||||
setActiveSync(null);
|
||||
}
|
||||
@@ -90,11 +86,11 @@ export default function RootCaManagementClient() {
|
||||
setIsPromoting(true);
|
||||
try {
|
||||
const response = await axios.post(`/api/admin/ca-certificates/${uuid}/promote`);
|
||||
addToast(response.data.message || "Promoted successfully", "success");
|
||||
addToast(response.data.message || t("toast_promote_success"), "success");
|
||||
mutate();
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
addToast(err.response?.data?.message || "Promotion failed", "error");
|
||||
addToast(err.response?.data?.message || t("toast_promote_failed"), "error");
|
||||
} finally {
|
||||
setIsPromoting(false);
|
||||
}
|
||||
@@ -192,8 +188,8 @@ export default function RootCaManagementClient() {
|
||||
|
||||
{/* Full-width Archive History */}
|
||||
<ComponentCard
|
||||
title="Version Archives"
|
||||
desc="Browse historical versions and promote them back to Latest if needed. This table provides full visibility into your CDN audit trail."
|
||||
title={t("archive_management_title")}
|
||||
desc={t("archive_management_desc")}
|
||||
>
|
||||
<ArchiveManagementTable
|
||||
certificates={certificates}
|
||||
|
||||
Reference in New Issue
Block a user