Skip to content

Commit cac4d18

Browse files
committed
Implement Translator & Replace Moment with Luxon
1 parent f9284e5 commit cac4d18

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

app/assets/views/HomeView.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
33
import { useAuthStore } from '@userfrosting/sprinkle-account/stores'
4+
import { useConfigStore, useTranslator } from '@userfrosting/sprinkle-core/stores'
45
56
const auth = useAuthStore()
7+
const config = useConfigStore()
8+
const { $t } = useTranslator()
69
710
const helloMsg = computed(() => {
8-
return auth.isAuthenticated ? 'Hello ' + auth.user?.full_name + '!' : 'Hello guest !'
11+
return $t('WELCOME_TO', {
12+
title: config.get('site.title'),
13+
user: auth.user?.full_name ?? '&GUEST'
14+
})
915
})
1016
</script>
1117

1218
<template>
1319
<article class="uk-article">
14-
<h1 class="uk-article-title">
15-
<a class="uk-link-reset" href="#">{{ helloMsg }}</a>
16-
</h1>
20+
<h1 class="uk-article-title">{{ helloMsg }}</h1>
1721
<p class="uk-article-meta">
1822
Written by <a href="#">Angela Davis</a>, Professor on 29 September 2018.
1923
</p>

0 commit comments

Comments
 (0)