Skip to content

Commit 1198f8f

Browse files
committed
refactor: enhance internationalization support in ServerDetail and ProjectManagement components
1 parent 643c1f4 commit 1198f8f

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

apps/daas/src/views/api-page/api-monitor/ServerDetail.vue

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ const requestChartOption = computed<EChartsOption>(() => ({
509509
},
510510
{
511511
type: 'value',
512-
name: '错误率 (%)',
512+
name: t('api_monitor_error_rate'),
513513
position: 'right',
514514
},
515515
],
@@ -532,13 +532,13 @@ const requestChartOption = computed<EChartsOption>(() => ({
532532
},
533533
},
534534
legend: {
535-
data: ['请求数', '错误率'],
535+
data: [t('api_monitor_request_count'), t('api_monitor_error_rate')],
536536
// left: 0,
537537
top: 0,
538538
},
539539
series: [
540540
{
541-
name: '请求数',
541+
name: t('api_monitor_request_count'),
542542
type: 'line',
543543
yAxisIndex: 0,
544544
data: serverChart.value?.request.requestCount || [],
@@ -555,7 +555,7 @@ const requestChartOption = computed<EChartsOption>(() => ({
555555
},
556556
},
557557
{
558-
name: '错误率',
558+
name: t('api_monitor_error_rate'),
559559
type: 'line',
560560
yAxisIndex: 1,
561561
data: serverChart.value?.request.errorRate || [],
@@ -600,7 +600,7 @@ const latencyChartOption = computed<EChartsOption>(() => ({
600600
},
601601
yAxis: {
602602
type: 'value',
603-
name: '延迟 (ms)',
603+
name: t('api_monitor_latency_ms'),
604604
},
605605
tooltip: {
606606
borderRadius: 12,
@@ -845,7 +845,7 @@ const handleNavigateToAuditWithError = (row?: string) => {
845845
846846
if (row.apiPath) {
847847
query.keyword = row.apiPath
848-
query.options='-'
848+
query.options = '-'
849849
}
850850
851851
const href = router.resolve({
@@ -869,7 +869,7 @@ const handleNavigateToAuditWithResponseTime = (
869869
870870
if (row.apiPath) {
871871
query.keyword = row.apiPath
872-
query.options='-'
872+
query.options = '-'
873873
}
874874
875875
const href = router.resolve({
@@ -1154,9 +1154,7 @@ const handleBack = () => {
11541154
<span
11551155
v-if="row.maxDelay !== undefined"
11561156
class="underline-dashed cursor-pointer flex align-center gap-1"
1157-
@click.stop="
1158-
handleNavigateToAuditWithResponseTime(row, 'DESC')
1159-
"
1157+
@click.stop="handleNavigateToAuditWithResponseTime(row, 'DESC')"
11601158
>
11611159
{{ row.maxDelay }}
11621160
<el-icon>
@@ -1176,9 +1174,7 @@ const handleBack = () => {
11761174
<span
11771175
v-if="row.minDelay !== undefined"
11781176
class="underline-dashed cursor-pointer flex align-center gap-1"
1179-
@click.stop="
1180-
handleNavigateToAuditWithResponseTime(row, 'ASC')
1181-
"
1177+
@click.stop="handleNavigateToAuditWithResponseTime(row, 'ASC')"
11821178
>
11831179
{{ row.minDelay }}
11841180
<el-icon>

apps/daas/src/views/data-import-export/ProjectManagement.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,13 @@ const handleSelectAll = (checked: any) => {
627627
<el-icon class="mr-2">
628628
<i-lucide-edit />
629629
</el-icon>
630-
编辑
630+
{{ t('public_button_edit') }}
631631
</el-dropdown-item>
632632
<el-dropdown-item command="delete" class="is-danger">
633633
<el-icon class="mr-2">
634634
<i-lucide-trash-2 />
635635
</el-icon>
636-
删除
636+
{{ t('public_button_delete') }}
637637
</el-dropdown-item>
638638
</el-dropdown-menu>
639639
</template>

0 commit comments

Comments
 (0)