yangdx commited on
Commit
f927d98
·
1 Parent(s): d0ba3dc

feat(i18n): add translations for pipeline status UI

Browse files
lightrag_webui/src/components/documents/PipelineStatusDialog.tsx CHANGED
@@ -150,27 +150,27 @@ export default function PipelineStatusDialog({
150
  {/* Pipeline Status */}
151
  <div className="flex items-center gap-4">
152
  <div className="flex items-center gap-2">
153
- <div className="text-sm font-medium">Busy:</div>
154
  <div className={`h-2 w-2 rounded-full ${status?.busy ? 'bg-green-500' : 'bg-gray-300'}`} />
155
  </div>
156
  <div className="flex items-center gap-2">
157
- <div className="text-sm font-medium">Request Pending:</div>
158
  <div className={`h-2 w-2 rounded-full ${status?.request_pending ? 'bg-green-500' : 'bg-gray-300'}`} />
159
  </div>
160
  </div>
161
 
162
  {/* Job Information */}
163
  <div className="rounded-md border p-3 space-y-2">
164
- <div>Job Name: {status?.job_name || '-'}</div>
165
  <div className="flex justify-between">
166
- <span>Start Time: {status?.job_start ? new Date(status.job_start).toLocaleString() : '-'}</span>
167
- <span>Progress: {status ? `${status.cur_batch}/${status.batchs}` : '-'}</span>
168
  </div>
169
  </div>
170
 
171
  {/* Latest Message */}
172
  <div className="space-y-2">
173
- <div className="text-sm font-medium">Latest Message:</div>
174
  <div className="font-mono text-sm rounded-md bg-zinc-800 text-zinc-100 p-3">
175
  {status?.latest_message || '-'}
176
  </div>
@@ -178,7 +178,7 @@ export default function PipelineStatusDialog({
178
 
179
  {/* History Messages */}
180
  <div className="space-y-2">
181
- <div className="text-sm font-medium">History Messages:</div>
182
  <div
183
  ref={historyRef}
184
  onScroll={handleScroll}
 
150
  {/* Pipeline Status */}
151
  <div className="flex items-center gap-4">
152
  <div className="flex items-center gap-2">
153
+ <div className="text-sm font-medium">{t('documentPanel.pipelineStatus.busy')}:</div>
154
  <div className={`h-2 w-2 rounded-full ${status?.busy ? 'bg-green-500' : 'bg-gray-300'}`} />
155
  </div>
156
  <div className="flex items-center gap-2">
157
+ <div className="text-sm font-medium">{t('documentPanel.pipelineStatus.requestPending')}:</div>
158
  <div className={`h-2 w-2 rounded-full ${status?.request_pending ? 'bg-green-500' : 'bg-gray-300'}`} />
159
  </div>
160
  </div>
161
 
162
  {/* Job Information */}
163
  <div className="rounded-md border p-3 space-y-2">
164
+ <div>{t('documentPanel.pipelineStatus.jobName')}: {status?.job_name || '-'}</div>
165
  <div className="flex justify-between">
166
+ <span>{t('documentPanel.pipelineStatus.startTime')}: {status?.job_start ? new Date(status.job_start).toLocaleString() : '-'}</span>
167
+ <span>{t('documentPanel.pipelineStatus.progress')}: {status ? `${status.cur_batch}/${status.batchs}` : '-'}</span>
168
  </div>
169
  </div>
170
 
171
  {/* Latest Message */}
172
  <div className="space-y-2">
173
+ <div className="text-sm font-medium">{t('documentPanel.pipelineStatus.latestMessage')}:</div>
174
  <div className="font-mono text-sm rounded-md bg-zinc-800 text-zinc-100 p-3">
175
  {status?.latest_message || '-'}
176
  </div>
 
178
 
179
  {/* History Messages */}
180
  <div className="space-y-2">
181
+ <div className="text-sm font-medium">{t('documentPanel.pipelineStatus.historyMessages')}:</div>
182
  <div
183
  ref={historyRef}
184
  onScroll={handleScroll}
lightrag_webui/src/features/DocumentManager.tsx CHANGED
@@ -130,10 +130,10 @@ export default function DocumentManager() {
130
  variant="outline"
131
  onClick={() => setShowPipelineStatus(true)}
132
  side="bottom"
133
- tooltip="View pipeline status"
134
  size="sm"
135
  >
136
- <ActivityIcon /> Pipeline Status
137
  </Button>
138
  </div>
139
  <div className="flex-1" />
 
130
  variant="outline"
131
  onClick={() => setShowPipelineStatus(true)}
132
  side="bottom"
133
+ tooltip={t('documentPanel.documentManager.pipelineStatusTooltip')}
134
  size="sm"
135
  >
136
+ <ActivityIcon /> {t('documentPanel.documentManager.pipelineStatusButton')}
137
  </Button>
138
  </div>
139
  <div className="flex-1" />
lightrag_webui/src/locales/ar.json CHANGED
@@ -59,6 +59,8 @@
59
  "title": "إدارة المستندات",
60
  "scanButton": "مسح ضوئي",
61
  "scanTooltip": "مسح المستندات ضوئيًا",
 
 
62
  "uploadedTitle": "المستندات المرفوعة",
63
  "uploadedDescription": "قائمة المستندات المرفوعة وحالاتها.",
64
  "emptyTitle": "لا توجد مستندات",
@@ -89,6 +91,19 @@
89
  "hideButton": "إخفاء",
90
  "showFileNameTooltip": "عرض اسم الملف",
91
  "hideFileNameTooltip": "إخفاء اسم الملف"
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
  },
94
  "graphPanel": {
 
59
  "title": "إدارة المستندات",
60
  "scanButton": "مسح ضوئي",
61
  "scanTooltip": "مسح المستندات ضوئيًا",
62
+ "pipelineStatusButton": "حالة خط المعالجة",
63
+ "pipelineStatusTooltip": "عرض حالة خط المعالجة",
64
  "uploadedTitle": "المستندات المرفوعة",
65
  "uploadedDescription": "قائمة المستندات المرفوعة وحالاتها.",
66
  "emptyTitle": "لا توجد مستندات",
 
91
  "hideButton": "إخفاء",
92
  "showFileNameTooltip": "عرض اسم الملف",
93
  "hideFileNameTooltip": "إخفاء اسم الملف"
94
+ },
95
+ "pipelineStatus": {
96
+ "title": "حالة خط المعالجة",
97
+ "busy": "مشغول",
98
+ "requestPending": "الطلب معلق",
99
+ "jobName": "اسم المهمة",
100
+ "startTime": "وقت البدء",
101
+ "progress": "التقدم",
102
+ "latestMessage": "آخر رسالة",
103
+ "historyMessages": "سجل الرسائل",
104
+ "errors": {
105
+ "fetchFailed": "فشل في جلب حالة خط المعالجة\n{{error}}"
106
+ }
107
  }
108
  },
109
  "graphPanel": {
lightrag_webui/src/locales/fr.json CHANGED
@@ -59,6 +59,8 @@
59
  "title": "Gestion des documents",
60
  "scanButton": "Scanner",
61
  "scanTooltip": "Scanner les documents",
 
 
62
  "uploadedTitle": "Documents téléchargés",
63
  "uploadedDescription": "Liste des documents téléchargés et leurs statuts.",
64
  "emptyTitle": "Aucun document",
@@ -84,6 +86,19 @@
84
  "scanFailed": "Échec de la numérisation des documents\n{{error}}",
85
  "scanProgressFailed": "Échec de l'obtention de la progression de la numérisation\n{{error}}"
86
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
  },
89
  "graphPanel": {
 
59
  "title": "Gestion des documents",
60
  "scanButton": "Scanner",
61
  "scanTooltip": "Scanner les documents",
62
+ "pipelineStatusButton": "État du Pipeline",
63
+ "pipelineStatusTooltip": "Voir l'état du pipeline",
64
  "uploadedTitle": "Documents téléchargés",
65
  "uploadedDescription": "Liste des documents téléchargés et leurs statuts.",
66
  "emptyTitle": "Aucun document",
 
86
  "scanFailed": "Échec de la numérisation des documents\n{{error}}",
87
  "scanProgressFailed": "Échec de l'obtention de la progression de la numérisation\n{{error}}"
88
  }
89
+ },
90
+ "pipelineStatus": {
91
+ "title": "État du Pipeline",
92
+ "busy": "Occupé",
93
+ "requestPending": "Requête en attente",
94
+ "jobName": "Nom du travail",
95
+ "startTime": "Heure de début",
96
+ "progress": "Progression",
97
+ "latestMessage": "Dernier message",
98
+ "historyMessages": "Historique des messages",
99
+ "errors": {
100
+ "fetchFailed": "Échec de la récupération de l'état du pipeline\n{{error}}"
101
+ }
102
  }
103
  },
104
  "graphPanel": {
lightrag_webui/src/locales/zh.json CHANGED
@@ -59,6 +59,8 @@
59
  "title": "文档管理",
60
  "scanButton": "扫描",
61
  "scanTooltip": "扫描文档",
 
 
62
  "uploadedTitle": "已上传文档",
63
  "uploadedDescription": "已上传文档列表及其状态",
64
  "emptyTitle": "无文档",
@@ -89,6 +91,19 @@
89
  "hideButton": "隐藏",
90
  "showFileNameTooltip": "显示文件名",
91
  "hideFileNameTooltip": "隐藏文件名"
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
  },
94
  "graphPanel": {
 
59
  "title": "文档管理",
60
  "scanButton": "扫描",
61
  "scanTooltip": "扫描文档",
62
+ "pipelineStatusButton": "流水线状态",
63
+ "pipelineStatusTooltip": "查看流水线状态",
64
  "uploadedTitle": "已上传文档",
65
  "uploadedDescription": "已上传文档列表及其状态",
66
  "emptyTitle": "无文档",
 
91
  "hideButton": "隐藏",
92
  "showFileNameTooltip": "显示文件名",
93
  "hideFileNameTooltip": "隐藏文件名"
94
+ },
95
+ "pipelineStatus": {
96
+ "title": "流水线状态",
97
+ "busy": "忙碌",
98
+ "requestPending": "请求等待中",
99
+ "jobName": "作业名称",
100
+ "startTime": "开始时间",
101
+ "progress": "进度",
102
+ "latestMessage": "最新消息",
103
+ "historyMessages": "历史消息",
104
+ "errors": {
105
+ "fetchFailed": "获取流水线状态失败\n{{error}}"
106
+ }
107
  }
108
  },
109
  "graphPanel": {