Skip to content

Commit

Permalink
feat(lang): use translations
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Dec 30, 2023
1 parent 49031e2 commit df418e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions components/service/Ping.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<template>
<ServiceBases v-bind="props">
<ServiceBase v-bind="props">
<template #description>
Server responded in <span class="border-b border-dashed">{{ ping?.time || 0 }}ms</span>
<template v-if="ping?.time >= 0">
{{ $t('service.ping.description') }} <span class="border-b border-dashed">{{ ping.time }} {{ $t('service.ping.units') }}</span>
</template>
<template v-else>
{{ $t('service.ping.error') }}
</template>
</template>
</ServiceBases>
</ServiceBase>
</template>

<script setup lang="ts">
import type { PingService } from '~/types/services'
import ServiceBases from '~/components/service/Base.vue'
const props = defineProps<PingService>()
Expand Down
6 changes: 3 additions & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
v-bind="group"
/>
</template>
<Message v-else title="Services not found">
<Message v-else :title="$t('service.not-found.title')">
<template #text>
<p>
Oops! You did not specify a list of services in <span class="border-b border-dashed">config.yaml</span>
{{ $t('service.not-found.description') }}
</p>
<p class="mt-1">
<a href="#" class="text-sky-500 hover:text-sky-800">Go to documentation</a>
<a href="#" class="text-sky-500 hover:text-sky-800">{{ $t('service.not-found.action') }}</a>
</p>
</template>
</Message>
Expand Down

0 comments on commit df418e5

Please sign in to comment.