Refactor the Translations language to seperate their own directory, for easy to maintenable and scalable language

This commit is contained in:
Tola Leng
2025-05-23 20:39:25 +08:00
parent b4bef67220
commit 8910c1355c
40 changed files with 1416 additions and 618 deletions
+18
View File
@@ -0,0 +1,18 @@
import { AboutTranslations } from '../types/about';
export const aboutTranslations: AboutTranslations = {
aboutCheckcle: "About Checkcle",
systemDescription: "Checkcle is an open-source monitoring stack offering real-time insights into server and service health, incident management, and operational transparency. Released as MIT License.",
systemVersion: "System Version",
license: "License",
mitLicense: "MIT License",
links: "Links",
viewOnGithub: "View on GitHub",
viewDocumentation: "View Documentation",
followOnX: "Follow on X",
joinDiscord: "Join Discord",
quickActions: "Quick Actions",
quickActionsDescription: "Access common monitoring operations and features quickly. Select an action below to get started.",
quickTips: "Quick Tips",
};
+29
View File
@@ -0,0 +1,29 @@
import { CommonTranslations } from '../types/common';
export const commonTranslations: CommonTranslations = {
welcome: "Welcome",
logout: "Logout",
language: "Language",
english: "English",
khmer: "Khmer",
german: "Deutsch",
goodMorning: "Good morning",
goodAfternoon: "Good afternoon",
goodEvening: "Good evening",
profile: "Profile",
settings: "Settings",
documentation: "Documentation",
notifications: "Notifications",
close: "Close",
cancel: "Cancel",
view: "View",
edit: "Edit",
delete: "Delete",
status: "Status",
time: "Time",
title: "Title",
description: "Description",
success: "Success",
error: "Error",
};
@@ -0,0 +1,55 @@
import { IncidentTranslations } from '../types/incident';
export const incidentTranslations: IncidentTranslations = {
incidentManagement: 'Incident Management',
incidentsManagementDesc: 'Track and manage service incidents and their resolutions',
unresolvedIncidents: 'Unresolved',
resolvedIncidents: 'Resolved',
activeIncidents: 'Active Incidents',
criticalIssues: 'Critical Issues',
avgResolutionTime: 'Avg. Resolution Time',
noIncidents: 'No Active Incidents',
createIncident: 'Create Incident',
investigating: 'Investigating',
identified: 'Identified',
monitoring: 'Monitoring',
resolved: 'Resolved',
scheduleIncidentManagement: 'Schedule & Incident Management',
incidentName: 'Incident Name',
incidentStatus: 'Incident Status',
highPriority: 'High Priority',
configurationSettings: 'Configuration Settings',
incidentCreatedSuccess: 'Incident created successfully',
basicInfo: 'Basic Information',
serviceId: 'Service ID',
assignedTo: 'Assigned To',
unassigned: 'Unassigned',
timeline: 'Timeline',
incidentTime: 'Incident Time',
resolutionTime: 'Resolution Time',
systems: 'Systems',
noSystems: 'No systems affected',
impactAnalysis: 'Impact Analysis',
rootCause: 'Root Cause',
resolutionSteps: 'Resolution Steps',
lessonsLearned: 'Lessons Learned',
resolutionDetails: 'Resolution Details',
assignment: 'Assignment',
download: 'Download',
downloadPdf: 'Download PDF',
print: 'Print',
confidentialNote: 'This document is confidential and intended for internal use only.',
generatedOn: 'Generated on',
enterResolutionSteps: 'Enter steps taken to resolve the incident',
enterLessonsLearned: 'Enter lessons learned from this incident',
editIncident: 'Edit Incident',
editIncidentDesc: 'Update details for this incident',
updating: 'Updating...',
update: 'Update',
create: 'Create',
creating: 'Creating...',
configuration: 'Configuration',
failedToUpdateStatus: 'Failed to update status',
inProgress: 'In Progress',
};
+23
View File
@@ -0,0 +1,23 @@
import { Translations } from '../types';
import { commonTranslations } from './common';
import { menuTranslations } from './menu';
import { loginTranslations } from './login';
import { aboutTranslations } from './about';
import { servicesTranslations } from './services';
import { maintenanceTranslations } from './maintenance';
import { incidentTranslations } from './incident';
import { sslTranslations } from './ssl';
const enTranslations: Translations = {
common: commonTranslations,
menu: menuTranslations,
login: loginTranslations,
about: aboutTranslations,
services: servicesTranslations,
maintenance: maintenanceTranslations,
incident: incidentTranslations,
ssl: sslTranslations
};
export default enTranslations;
+23
View File
@@ -0,0 +1,23 @@
import { LoginTranslations } from '../types/login';
export const loginTranslations: LoginTranslations = {
signInToYourAccount: "Sign in to your account",
dontHaveAccount: "Don't have an account?",
createOne: "Create one",
signInWithGoogle: "Sign in with Google",
orContinueWith: "OR",
email: "Email",
password: "Password",
forgot: "Forgot?",
signIn: "Sign In",
signingIn: "Signing in...",
loginSuccessful: "Login successful",
loginSuccessMessage: "You have been logged in successfully.",
loginFailed: "Login failed",
authenticationFailed: "Authentication failed",
bySigningIn: "By signing in, you agree to our",
termsAndConditions: "Terms & Conditions",
and: "and",
privacyPolicy: "Privacy Policy",
};
@@ -0,0 +1,68 @@
import { MaintenanceTranslations } from '../types/maintenance';
export const maintenanceTranslations: MaintenanceTranslations = {
scheduledMaintenance: 'Scheduled Maintenance',
scheduledMaintenanceDesc: 'View and manage planned maintenance windows for your systems and services',
upcomingMaintenance: 'Upcoming',
ongoingMaintenance: 'Ongoing',
completedMaintenance: 'Completed',
createMaintenanceWindow: 'Create Maintenance',
totalScheduledHours: 'Total Scheduled Hours',
maintenanceName: 'Maintenance Name',
maintenanceStatus: 'Status',
scheduledStart: 'Scheduled Start',
scheduledEnd: 'Scheduled End',
affectedServices: 'Affected Services',
impact: 'Impact',
minor: 'Minor',
major: 'Major',
critical: 'Critical',
none: 'None',
actions: 'Actions',
scheduled: 'Scheduled',
inprogress: 'In Progress',
completed: 'Completed',
cancelled: 'Cancelled',
markAsInProgress: 'Mark as In Progress',
markAsCompleted: 'Mark as Completed',
markAsCancelled: 'Mark as Cancelled',
confirmDelete: 'Confirm Delete',
deleteMaintenanceConfirmation: 'Are you sure you want to delete this maintenance window?',
thisActionCannotBeUndone: 'This action cannot be undone.',
maintenanceDeleted: 'Maintenance Deleted',
maintenanceDeletedDesc: 'The maintenance window has been deleted successfully.',
errorDeletingMaintenance: 'There was an error deleting the maintenance window.',
statusUpdated: 'Status Updated',
maintenanceStatusUpdated: 'Maintenance status has been updated successfully.',
errorUpdatingMaintenanceStatus: 'There was an error updating the maintenance status.',
createMaintenance: 'Create Maintenance',
createMaintenanceDesc: 'Schedule a new maintenance window for your services',
enterTitle: 'Enter maintenance title',
enterDescription: 'Enter detailed description of the maintenance',
startTime: 'Start Time',
endTime: 'End Time',
selectDate: 'Select a date',
enterAffectedServices: 'Enter affected services',
separateServicesWithComma: 'Separate multiple services with commas',
priority: 'Priority',
selectPriority: 'Select priority',
selectStatus: 'Select status',
selectImpact: 'Select impact',
notifySubscribers: 'Notify Subscribers',
notifySubscribersDesc: 'Send notifications to all subscribers when this maintenance starts',
maintenanceCreated: 'Maintenance Created',
maintenanceCreatedDesc: 'The maintenance window has been scheduled successfully.',
errorCreatingMaintenance: 'There was an error creating the maintenance window.',
errorFetchingMaintenanceData: 'There was an error fetching maintenance data.',
low: 'Low',
medium: 'Medium',
high: 'High',
created: 'Created',
lastUpdated: 'Last Updated',
subscribersWillBeNotified: 'Subscribers will be notified when maintenance begins',
noNotifications: 'No notifications will be sent',
noScheduledMaintenance: 'No Scheduled Maintenance',
noMaintenanceWindows: 'There are no maintenance windows for this period. Create one by clicking the "Create Maintenance" button.',
maintenanceCreatedSuccess: 'Maintenance window created successfully',
};
+21
View File
@@ -0,0 +1,21 @@
import { MenuTranslations } from '../types/menu';
export const menuTranslations: MenuTranslations = {
uptimeMonitoring: "Uptime Monitoring",
instanceMonitoring: "Instance Monitoring",
sslDomain: "SSL & Domain",
scheduleIncident: "Schedule & Incident",
operationalPage: "Operational Page",
reports: "Reports",
apiDocumentation: "API Documentation",
settingPanel: "Setting Panel",
generalSettings: "General Settings",
userManagement: "User Management",
notificationSettings: "Notification Settings",
alertsTemplates: "Alerts Templates",
rolesManagement: "Roles Management",
dataRetention: "Data Retention",
backupSettings: "Backup Settings",
aboutSystem: "About System",
};
@@ -0,0 +1,12 @@
import { ServicesTranslations } from '../types/services';
export const servicesTranslations: ServicesTranslations = {
serviceName: "Service Name",
serviceType: "Service Type",
serviceStatus: "Service Status",
responseTime: "Response Time",
uptime: "Uptime",
lastChecked: "Last Checked",
noServices: "No services match your filter criteria.",
};
+107
View File
@@ -0,0 +1,107 @@
import { SSLTranslations } from '../types/ssl';
export const sslTranslations: SSLTranslations = {
// Page and section titles
sslDomainManagement: "SSL & Domain Management",
monitorSSLCertificates: "Monitor and manage SSL certificates for your domains",
addSSLCertificate: "Add SSL Certificate",
editSSLCertificate: "Edit SSL Certificate",
deleteSSLCertificate: "Delete SSL Certificate",
sslCertificateDetails: "SSL Certificate Details",
detailedInfo: "Detailed information for",
// Status related
valid: "Valid",
expiringSoon: "Expiring Soon",
expired: "Expired",
pending: "Pending",
// Statistics and cards
validCertificates: "Valid Certificates",
expiringSoonCertificates: "Expiring Soon",
expiredCertificates: "Expired Certificates",
// Form fields
domain: "Domain",
domainName: "Domain Name",
domainCannotChange: "Domain cannot be changed after creation",
warningThreshold: "Warning Threshold",
warningThresholdDays: "Warning Threshold (Days)",
expiryThreshold: "Expiry Threshold",
expiryThresholdDays: "Expiry Threshold (Days)",
notificationChannel: "Notification Channel",
chooseChannel: "Choose a notification channel",
whereToSend: "Where to send notifications",
daysBeforeExpiration: "Days before expiration to receive warnings",
daysBeforeCritical: "Days before expiration to receive critical alerts",
getNotifiedExpiration: "Get notified when certificate is about to expire",
getNotifiedCritical: "Get notified when certificate is critically close to expiration",
// Table headers and fields
issuer: "Issuer",
expirationDate: "Expiration Date",
daysLeft: "Days Left",
status: "Status",
lastNotified: "Last Notified",
actions: "Actions",
validFrom: "Valid From",
validUntil: "Valid Until",
validityDays: "Validity Days",
organization: "Organization",
commonName: "Common Name",
serialNumber: "Serial Number",
algorithm: "Algorithm",
subjectAltNames: "Subject Alternative Names",
// Buttons and actions
addDomain: "Add Domain",
refreshAll: "Refresh All",
cancel: "Cancel",
addCertificate: "Add Certificate",
check: "Check",
view: "View",
edit: "Edit",
delete: "Delete",
close: "Close",
saveChanges: "Save Changes",
updating: "Updating",
// Sections in detail view
basicInformation: "Basic Information",
validity: "Validity",
issuerInfo: "Issuer Information",
technicalDetails: "Technical Details",
monitoringConfig: "Monitoring Configuration",
recordInfo: "Record Information",
// Notifications and messages
sslCertificateAdded: "SSL Certificate added successfully",
sslCertificateUpdated: "SSL Certificate updated successfully",
sslCertificateDeleted: "SSL Certificate deleted successfully",
sslCertificateRefreshed: "SSL Certificate for {domain} refreshed successfully",
allCertificatesRefreshed: "All {count} certificates refreshed successfully",
someCertificatesFailed: "{success} certificates refreshed, {failed} failed",
failedToAddCertificate: "Failed to add SSL certificate",
failedToLoadCertificates: "Failed to load SSL certificates",
failedToUpdateCertificate: "Failed to update SSL certificate",
failedToDeleteCertificate: "Failed to delete SSL certificate",
failedToCheckCertificate: "Failed to check SSL certificate",
noCertificatesToRefresh: "No certificates to refresh",
startingRefreshAll: "Starting refresh of {count} certificates",
checkingSSLCertificate: "Checking SSL certificate...",
deleteConfirmation: "Are you sure you want to delete the certificate for",
deleteWarning: "This action cannot be undone. This will permanently delete the certificate.",
// Misc
unknown: "Unknown",
never: "Never",
none: "None",
loadingChannels: "Loading channels...",
noChannelsFound: "No notification channels found",
noSSLCertificates: "No SSL certificates found",
created: "Created",
lastUpdated: "Last Updated",
lastNotification: "Last Notification",
collectionId: "Collection ID"
};