Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: header & homepage i18n #70

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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