-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(i18n): refactored components to use i18n
- Loading branch information
Showing
8 changed files
with
117 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
<template> | ||
<footer class="text-center bg-transparent border-top-1 border-gray-200 p-1"> | ||
<p class="text-gray-500">© {{ currentYear }} Tobias Stadler</p> | ||
<p class="text-gray-500"> | ||
{{ t('static.TheFooter.copyright', [currentYear]) }} | ||
</p> | ||
</footer> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useI18n } from 'vue-i18n'; | ||
import { useCurrentYear } from '@/composables/useCurrentYear'; | ||
const currentYear = useCurrentYear(); | ||
const { t } = useI18n(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { PrimeIcons } from 'primevue/api'; | ||
|
||
import type { MenuItem } from 'primevue/menuitem'; | ||
|
||
import i18n from '@/plugins/i18n'; | ||
|
||
const t = i18n.global.t; | ||
|
||
const menuLinks: MenuItem[] = [ | ||
{ | ||
icon: PrimeIcons.CODE, | ||
key: 'projects', | ||
label: t('TheMenubar.links.projects.label'), | ||
url: t('static.TheMenubar.links.projects.url'), | ||
color: 'primary', | ||
}, | ||
{ | ||
icon: PrimeIcons.GITHUB, | ||
key: 'github', | ||
label: t('static.TheMenubar.links.github.label'), | ||
url: t('static.TheMenubar.links.github.url'), | ||
color: 'contrast', | ||
}, | ||
{ | ||
icon: PrimeIcons.LINKEDIN, | ||
key: 'linkedin', | ||
label: t('static.TheMenubar.links.linkedin.label'), | ||
url: t('static.TheMenubar.links.linkedin.url'), | ||
color: 'info', | ||
}, | ||
]; | ||
|
||
export default menuLinks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"static": { | ||
"authorName": "Tobias Stadler", | ||
"githubName": "devtobi", | ||
"TheMenubar": { | ||
"title": "@:static.authorName - @:TheMenubar.cv", | ||
"profilePictureAlt": "@:TheMenubar.profilePictureAltPrefix @:static.authorName", | ||
"links": { | ||
"projects": { | ||
"url": "https://devtobi.de" | ||
}, | ||
"github": { | ||
"label": "GitHub ({'@'}@:static.githubName)", | ||
"url": "https://github.com/@:static.githubName" | ||
}, | ||
"linkedin": { | ||
"label": "LinkedIn", | ||
"url": "https://www.linkedin.com/in/tobias-stadler/" | ||
} | ||
} | ||
}, | ||
"TheFooter": { | ||
"copyright": "© {0} @:static.authorName ({'@'}@:static.githubName)" | ||
} | ||
}, | ||
"TheMenubar": { | ||
"profilePictureAltPrefix": "Profilbild von", | ||
"newFeaturesSoon": "Neue Funktionen werden bald hinzugefügt!", | ||
"cv": "Lebenslauf", | ||
"links": { | ||
"projects": { | ||
"label": "Meine Projekte" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
{ | ||
"static": { | ||
"authorName": "Tobias Stadler", | ||
"githubName": "devtobi", | ||
"TheMenubar": { | ||
"title": "@:static.authorName - @:TheMenubar.cv", | ||
"profilePictureAlt": "@:TheMenubar.profilePictureAltPrefix @:static.authorName", | ||
"links": { | ||
"projects": { | ||
"url": "https://devtobi.de" | ||
}, | ||
"github": { | ||
"label": "GitHub ({'@'}@:static.githubName)", | ||
"url": "https://github.com/@:static.githubName" | ||
}, | ||
"linkedin": { | ||
"label": "LinkedIn", | ||
"url": "https://www.linkedin.com/in/tobias-stadler/" | ||
} | ||
} | ||
}, | ||
"TheFooter": { | ||
"copyright": "© {0} @:static.authorName ({'@'}@:static.githubName)" | ||
} | ||
}, | ||
"TheMenubar": { | ||
"profilePictureAltText": "Profile picture of Tobias Stadler", | ||
"profilePictureAltPrefix": "Profile picture of", | ||
"newFeaturesSoon": "New features will be added soon!", | ||
"cv": "Curriculum Vitae" | ||
"cv": "Curriculum Vitae", | ||
"links": { | ||
"projects": { | ||
"label": "My projects" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters