mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 02:42:08 +00:00
i18n: translate optimization names in source viewer headings
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
type Translate = (key: string, params?: Record<string, string | number>) => string
|
||||
|
||||
const SOURCE_TOOLS = new Set([
|
||||
"subscription_banner", "time_sync", "apt_languages", "journald", "logrotate",
|
||||
"system_limits", "memory_settings", "zram_swap", "kernel_panic", "apt_ipv4",
|
||||
"kexec", "rpc", "motd", "system_utils", "network_optimization", "bashrc_custom",
|
||||
"figurine", "fastfetch", "log2ram", "zfs_autotrim", "amd_fixes", "persistent_network",
|
||||
"vfio_iommu", "lvm_repair", "repo_cleanup", "proxmox_repos", "entropy",
|
||||
])
|
||||
|
||||
export function optimizationSourceName(tool: string, fallback: string, t: Translate): string {
|
||||
return SOURCE_TOOLS.has(tool) ? t(`settings.optimizations.sourceToolNames.${tool}`) : fallback
|
||||
}
|
||||
|
||||
export interface OptimizationSourceError {
|
||||
kind: "unavailable" | "loadFailed"
|
||||
detail?: string
|
||||
|
||||
Reference in New Issue
Block a user