Fixes broken URLs
This commit is contained in:
parent
e2cfc20341
commit
9b07778a12
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div id="app">
|
||||
<header class="app-header">
|
||||
<router-link :to="{ path: '/' }">
|
||||
<router-link :to="{ path: `/${$i18n.locale}/` }">
|
||||
<img class="header-logo"
|
||||
:src="euromatLogo"
|
||||
:width="logoSize"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"language": "de",
|
||||
"url": "faq",
|
||||
"url": "haufige-fragen",
|
||||
"title": "Häufig gestellte Fragen",
|
||||
"headline": "FAQ",
|
||||
"questions": [
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { getTranslatedTitles } from '@/i18n/helper'
|
||||
import { DEFAULT_LOCALE } from '@/config'
|
||||
import { getTranslatedAliases, getTranslatedTitles } from '@/i18n/helper'
|
||||
import i18n from './i18n'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'faq',
|
||||
// alias: getTranslatedAliases('faq'),
|
||||
path: i18n[DEFAULT_LOCALE].faq.url,
|
||||
alias: getTranslatedAliases(i18n, 'faq'),
|
||||
name: 'faq',
|
||||
component: () => import('./components/index' /* webpackChunkName: "faq" */),
|
||||
meta: {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
export default {
|
||||
de: {
|
||||
imprint: {
|
||||
pageTitle: 'Impressum',
|
||||
title: 'Impressum',
|
||||
headline: 'Impressum',
|
||||
url: 'impressum',
|
||||
address: {
|
||||
label: 'Adresse',
|
||||
polis: [
|
||||
|
@ -87,8 +88,9 @@ export default {
|
|||
},
|
||||
en: {
|
||||
imprint: {
|
||||
pageTitle: 'Imprint',
|
||||
title: 'Imprint',
|
||||
headline: 'Imprint',
|
||||
url: 'imprint',
|
||||
address: {
|
||||
label: 'Address',
|
||||
polis: [
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
import { DEFAULT_LOCALE } from '@/config'
|
||||
import { getTranslatedAliases, getTranslatedTitles } from '@/i18n/helper'
|
||||
import i18n from './i18n'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'impressum',
|
||||
alias: 'imprint',
|
||||
path: i18n[DEFAULT_LOCALE].imprint.url,
|
||||
alias: getTranslatedAliases(i18n, 'imprint'),
|
||||
name: 'imprint',
|
||||
component: () => import('./components/index' /* webpackChunkName: "misc" */),
|
||||
meta: {
|
||||
title: {
|
||||
de: i18n.de.imprint.pageTitle,
|
||||
en: i18n.en.imprint.pageTitle
|
||||
}
|
||||
title: getTranslatedTitles(i18n, 'imprint')
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -46,7 +46,7 @@ export function getTranslatedAliases (data, section) {
|
|||
return [...new Set(
|
||||
Object.keys(data)
|
||||
.filter(lang => lang !== DEFAULT_LOCALE)
|
||||
.map(lang => '/' + data[lang][section].url)
|
||||
.map(lang => data[lang][section].url)
|
||||
.filter(Boolean)
|
||||
)]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue