Skip to content

Commit 672cabe

Browse files
committed
Translate the UI
1 parent f3117a0 commit 672cabe

7 files changed

Lines changed: 52 additions & 12 deletions

File tree

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
<template>
2-
<UFFooterContent>
3-
Copyright 2024 - <a href="https://www.userfrosting.com">Created with UserFrosting</a> |
4-
Theme built with
5-
<a href="http://getuikit.com" title="Visit UIkit 3 site" target="_blank" data-uk-tooltip>
6-
<span data-uk-icon="uikit"></span>
7-
</a>
8-
</UFFooterContent>
2+
<UFFooterContent>{{ $t('COPYRIGHT', { year: new Date().getFullYear() }) }}</UFFooterContent>
93
</template>

app/assets/components/NavBar.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ const auth = useAuthStore()
2424
:username="auth.user.full_name"
2525
:avatar="auth.user.avatar"
2626
:meta="auth.user.user_name">
27-
<UFNavBarUserCardButton label="Admin Panel" :to="{ name: 'admin.dashboard' }" />
28-
<UFNavBarUserCardButton :label="$t('ACCOUNT.MY')" :to="{ name: 'account.settings' }" />
27+
<UFNavBarUserCardButton :label="$t('ADMIN_PANEL')" :to="{ name: 'admin.dashboard' }" />
28+
<UFNavBarUserCardButton
29+
:label="$t('ACCOUNT.SETTINGS')"
30+
:to="{ name: 'account.settings' }" />
2931
<UFNavBarUserCardButton :label="$t('LOGOUT')" @click="auth.logout()" />
3032
</UFNavBarUserCard>
3133
</UFNavBar>

app/assets/layouts/LayoutDashboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SidebarMenuItems } from '@userfrosting/sprinkle-admin/components'
77
<template>
88
<NavBar />
99
<UFSideBar>
10-
<UFSideBarLabel label="Admin Panel" />
10+
<UFSideBarLabel :label="$t('ADMIN_PANEL')" />
1111
<SidebarMenuItems />
1212
</UFSideBar>
1313
<UFMainContent>

app/assets/router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const router = createRouter({
3232
component: () => import('../layouts/LayoutDashboard.vue'),
3333
children: [...AdminRoutes],
3434
meta: {
35-
title: 'ADMIN'
35+
title: 'ADMIN_PANEL'
3636
}
3737
}
3838
]

app/assets/views/HomeView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const helloMsg = computed(() => {
3232

3333
<div class="uk-grid-small uk-child-width-auto" uk-grid>
3434
<div>
35-
<a class="uk-button uk-button-text" href="#">Read more</a>
35+
<a class="uk-button uk-button-text" href="#">{{ $t('READ_MORE') }}</a>
3636
</div>
3737
</div>
3838
</article>

app/locale/en_US/messages.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* UserFrosting (http://www.userfrosting.com)
7+
*
8+
* @link https://github.com/userfrosting/UserFrosting
9+
* @copyright Copyright (c) 2013-2024 Alexander Weissman & Louis Charette
10+
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
11+
*/
12+
13+
/**
14+
* US English translation.
15+
*/
16+
return [
17+
'ABOUT' => 'About',
18+
19+
'READ_MORE' => 'Read more',
20+
21+
'WELCOME_TO' => 'Welcome to {{title}}, {{user}}!',
22+
];

app/locale/fr_FR/messages.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* UserFrosting (http://www.userfrosting.com)
7+
*
8+
* @link https://github.com/userfrosting/UserFrosting
9+
* @copyright Copyright (c) 2013-2024 Alexander Weissman & Louis Charette
10+
* @license https://github.com/userfrosting/UserFrosting/blob/master/LICENSE.md (MIT License)
11+
*/
12+
13+
/**
14+
* French translations
15+
*/
16+
return [
17+
'ABOUT' => 'À propos',
18+
19+
'READ_MORE' => 'Lire la suite',
20+
21+
'WELCOME_TO' => 'Bienvenue sur {{title}}, {{user}}!',
22+
];

0 commit comments

Comments
 (0)