Skip to content

Commit

Permalink
Merge pull request #70 from codex-team/fix_header_&_home_i18n
Browse files Browse the repository at this point in the history
fix: header & homepage i18n
  • Loading branch information
HyTekCoop authored Oct 26, 2023
2 parents 5b515de + bb13430 commit fa34b55
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/application/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
"title": "Settings",
"changeTheme": "Change theme"
},
"header": {
"buttons": {
"home": "Home",
"noteSettings": "Settings"
}
},
"home": {
"title": "Home",
"settings": "Settings"
"title": "Recent Notes"
},
"errors": {
"404": "Page not found",
Expand Down
2 changes: 1 addition & 1 deletion src/application/services/useLayout.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { shallowRef, type ShallowRef, type Component, onBeforeMount, watch } from 'vue';
import { shallowRef, type ShallowRef, type Component, watch } from 'vue';
import { useRoute } from 'vue-router';
import Default from '@/presentation/layouts/Default.vue';
import Fullpage from '@/presentation/layouts/Fullpage.vue';
Expand Down
6 changes: 3 additions & 3 deletions src/presentation/components/header/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const { user } = useAppState();
const tabs = computed<Tab[]>(() => {
const availableTabs = [
{
title: t('home.title'),
title: t('header.buttons.home'),
path: '/',
icon: IconPicture,
isActive: currentRoute.value.name === 'home',
Expand All @@ -53,7 +53,7 @@ const tabs = computed<Tab[]>(() => {
*/
if ( currentRoute.value.name === 'note') {
availableTabs.push({
title: t('home.settings'),
title: t('header.buttons.noteSettings'),
path: currentRoute.value.path + '/settings',
icon: IconMenu,
isActive: false,
Expand All @@ -66,7 +66,7 @@ const tabs = computed<Tab[]>(() => {
*/
if ( currentRoute.value.name === 'settings') {
availableTabs.push({
title: t('home.settings'),
title: t('header.buttons.noteSettings'),
path: currentRoute.value.path,
icon: IconMenu,
isActive: true,
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/Home.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<h1>Recent Notes</h1>
<h1>{{ $t('home.title') }}</h1>
<p>This page will contain your Notes you recently worked with </p>
</div>
</template>
Expand Down

0 comments on commit fa34b55

Please sign in to comment.