Skip to content

Commit

Permalink
feat(locales): add new translations and update existing ones for log …
Browse files Browse the repository at this point in the history
…management
  • Loading branch information
elliotxx committed Nov 27, 2024
1 parent 894d521 commit 9c30448
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
10 changes: 9 additions & 1 deletion ui/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"CheckAllIssues": "Alle Fehler prüfen",
"ResourceTopology": "Ressourcen Topologie",
"KubernetesEvents": "Kubernetes Ereignisse",
"LogAggregator": "Log-Aggregator",
"Name": "Name",
"Times": "Mal",
"FilterByName": "Nach Name filtern",
Expand Down Expand Up @@ -119,5 +120,12 @@
"LoginSuccess": "Erfolgreich eingeloggt",
"Login": "Einloggen",
"LogoutSuccess": "Erfolgreich abgemeldet",
"InputToken": "Geben Sie bitte den Token ein"
"InputToken": "Geben Sie bitte den Token ein",
"ResumeLogs": "Logs fortsetzen",
"PauseLogs": "Logs pausieren",
"ClearLogs": "Logs löschen",
"Connected": "Verbunden",
"Disconnected": "Getrennt",
"FailedToParsePodDetails": "Pod-Details konnten nicht analysiert werden",
"SelectContainer": "Container auswählen"
}
10 changes: 9 additions & 1 deletion ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"CheckAllIssues": "Check All Issues",
"ResourceTopology": "Resource Topology",
"KubernetesEvents": "Kubernetes Events",
"LogAggregator": "Log",
"Name": "Name",
"Times": "Times",
"FilterByName": "Filter by Name",
Expand Down Expand Up @@ -119,5 +120,12 @@
"LoginSuccess": "Login Successful",
"Login": "Login",
"LogoutSuccess": "Successfully Logged Out",
"InputToken": "Please Enter the Token"
"InputToken": "Please Enter the Token",
"SelectContainer": "Select container",
"ResumeLogs": "Resume logs",
"PauseLogs": "Pause logs",
"ClearLogs": "Clear logs",
"Connected": "Connected",
"Disconnected": "Disconnected",
"FailedToParsePodDetails": "Failed to parse pod details"
}
10 changes: 9 additions & 1 deletion ui/src/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"CheckAllIssues": "Verificar Todos os Problemas",
"ResourceTopology": "Topologia de Recursos",
"KubernetesEvents": "Eventos do Kubernetes",
"LogAggregator": "Agregador de Logs",
"Name": "Nome",
"Times": "Vezes",
"FilterByName": "Filtrado por nome",
Expand Down Expand Up @@ -119,5 +120,12 @@
"LoginSuccess": "Login bem-sucedido",
"Login": "Login",
"LogoutSuccess": "Sessão encerrada com sucesso",
"InputToken": "Por favor, insira o token"
"InputToken": "Por favor, insira o token",
"ResumeLogs": "Retomar logs",
"PauseLogs": "Pausar logs",
"ClearLogs": "Limpar logs",
"Connected": "Conectado",
"Disconnected": "Desconectado",
"FailedToParsePodDetails": "Falha ao analisar detalhes do Pod",
"SelectContainer": "Selecionar container"
}
10 changes: 9 additions & 1 deletion ui/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"CheckAllIssues": "查看全部风险",
"ResourceTopology": "资源拓扑",
"KubernetesEvents": "Kubernetes 事件",
"LogAggregator": "日志",
"Name": "名称",
"Times": "",
"FilterByName": "请输入名称",
Expand Down Expand Up @@ -119,5 +120,12 @@
"LoginSuccess": "登录成功",
"Login": "登录",
"LogoutSuccess": "登出成功",
"InputToken": "请输入 token"
"InputToken": "请输入 Token",
"ResumeLogs": "继续日志",
"PauseLogs": "暂停日志",
"ClearLogs": "清除日志",
"Connected": "已连接",
"Disconnected": "已断开",
"FailedToParsePodDetails": "解析 Pod 详情失败",
"SelectContainer": "选择容器"
}
8 changes: 4 additions & 4 deletions ui/src/pages/insightDetail/components/podLogs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const PodLogs: React.FC<PodLogsProps> = ({
}
} catch (error) {
console.error('Failed to parse pod details:', error)
setError(t('Failed to parse pod details'))
setError(t('FailedToParsePodDetails'))
}
}
}, [yamlData, container, t])
Expand Down Expand Up @@ -127,22 +127,22 @@ const PodLogs: React.FC<PodLogsProps> = ({
value={container}
onChange={setContainer}
style={{ width: 200 }}
placeholder={t('Select container')}
placeholder={t('SelectContainer')}
>
{containers.map(c => (
<Select.Option key={c} value={c}>
{c}
</Select.Option>
))}
</Select>
<Tooltip title={isPaused ? t('Resume logs') : t('Pause logs')}>
<Tooltip title={isPaused ? t('ResumeLogs') : t('PauseLogs')}>
<Button
type={isPaused ? 'default' : 'primary'}
icon={isPaused ? <PlayCircleOutlined /> : <PauseCircleOutlined />}
onClick={handlePause}
/>
</Tooltip>
<Tooltip title={t('Clear logs')}>
<Tooltip title={t('ClearLogs')}>
<Button icon={<ClearOutlined />} onClick={handleClear} />
</Tooltip>
<Badge
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/insightDetail/resource/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const ClusterDetail = () => {
if (kind === 'Pod') {
setTabList(prev => {
if (!prev.find(tab => tab.value === 'Log')) {
return [...prev, { value: 'Log', label: t('Log') }]
return [...prev, { value: 'Log', label: t('LogAggregator') }]
}
return prev
})
Expand Down

0 comments on commit 9c30448

Please sign in to comment.