Skip to content

Commit df418e5

Browse files
committed
feat(lang): use translations
1 parent 49031e2 commit df418e5

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

Diff for: components/service/Ping.vue

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
<template>
2-
<ServiceBases v-bind="props">
2+
<ServiceBase v-bind="props">
33
<template #description>
4-
Server responded in <span class="border-b border-dashed">{{ ping?.time || 0 }}ms</span>
4+
<template v-if="ping?.time >= 0">
5+
{{ $t('service.ping.description') }} <span class="border-b border-dashed">{{ ping.time }} {{ $t('service.ping.units') }}</span>
6+
</template>
7+
<template v-else>
8+
{{ $t('service.ping.error') }}
9+
</template>
510
</template>
6-
</ServiceBases>
11+
</ServiceBase>
712
</template>
813

914
<script setup lang="ts">
1015
import type { PingService } from '~/types/services'
11-
import ServiceBases from '~/components/service/Base.vue'
1216
1317
const props = defineProps<PingService>()
1418

Diff for: pages/index.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
v-bind="group"
77
/>
88
</template>
9-
<Message v-else title="Services not found">
9+
<Message v-else :title="$t('service.not-found.title')">
1010
<template #text>
1111
<p>
12-
Oops! You did not specify a list of services in <span class="border-b border-dashed">config.yaml</span>
12+
{{ $t('service.not-found.description') }}
1313
</p>
1414
<p class="mt-1">
15-
<a href="#" class="text-sky-500 hover:text-sky-800">Go to documentation</a>
15+
<a href="#" class="text-sky-500 hover:text-sky-800">{{ $t('service.not-found.action') }}</a>
1616
</p>
1717
</template>
1818
</Message>

0 commit comments

Comments
 (0)