Skip to content
Snippets Groups Projects
Commit f3294640 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

start appplying i18n

parent bccc5802
No related branches found
Tags release_2021-10-01_1
No related merge requests found
......@@ -15,14 +15,14 @@
</v-toolbar-items>
<v-toolbar-items class="hidden-md-and-up">
<v-divider vertical/>
<v-btn text><span>Meny</span><v-icon right>menu</v-icon></v-btn>
<v-btn text><span>{{$t("menu.title")}}</span><v-icon right>menu</v-icon></v-btn>
</v-toolbar-items>
</v-toolbar>
</header>
<div class = "banner">
<h1><a aria-label="Ordbøkene bokmålsordboka og nynorskordboka sitt nettsted" :class="$vuetify.breakpoint.name" href="/" tabindex="1">Ordbøkene</a></h1>
<p class="sub-title"><router-link aria-label="Ordbøkene bokmålsordboka og nynorskordboka sitt nettsted" to="/" tabindex="3">Bokmålsordboka og Nynorskordboka</router-link></p>
<p class="sub-title"><router-link aria-label="Ordbøkene bokmålsordboka og nynorskordboka sitt nettsted" to="/" tabindex="3">{{$t("sub-title")}}</router-link></p>
</div>
<router-view></router-view>
<footer>
......
......@@ -30,10 +30,12 @@
<v-divider vertical/>
<v-menu allowOverflow: true>
<template v-slot:activator="{ on, attrs }">
<v-btn min-width="0px" v-bind="attrs" v-on="on" plain depressed color = "primary" text><span v-if="$vuetify.breakpoint.mdAndUp">{{{"bm,nn":"begge ordbøkene", "bm": "bokmålsordboka (bm)", "nn":"nynorskordboka (nn)"}[$parent.lang]}}</span><v-icon>expand_more</v-icon></v-btn>
<v-btn min-width="0px" v-bind="attrs" v-on="on" plain depressed color = "primary" text><span v-if="$vuetify.breakpoint.mdAndUp">
{{$t(`dicts.${$parent.lang}`)}}
</span><v-icon>expand_more</v-icon></v-btn>
</template>
<v-list>
<v-list-item v-for="item in [{label:'begge ordbøkene', tag:'bm,nn'},{label:'bokmålsordboka (bm)', tag:'bm'},{label:'nynorskordboka (nn)', tag:'nn'}]" :key="item.tag"
<v-list-item v-for="item in ['bm,nn','bm','nn'].map(l => {return {label: $t(`dicts.${l}`), tag: l}})" :key="item.tag"
active-class="v-list-item--active" :class="$parent.lang == item.tag ? 'v-list-item--active' : ''" @click="$parent.update_lang_form(item.tag)">
<v-list-item-title >{{ item.label }}</v-list-item-title>
</v-list-item>
......
......@@ -8,7 +8,7 @@
@click="$emit('close')"
dark
text
>Lukk
>{{$t("close")}}
<v-icon>close</v-icon>
</v-btn>
</v-toolbar-items>
......@@ -20,7 +20,7 @@
</v-list>
<v-list subheader max-width="250">
<v-subheader>Visningsspråk</v-subheader>
<v-subheader>{{$t("settings.locale")}}</v-subheader>
<v-select rounded
v-model="updateLocale"
prepend-inner-icon="language"
......@@ -31,7 +31,7 @@
</v-list>
<v-divider></v-divider>
<v-list three-line subheader>
<v-subheader>Instillinger</v-subheader>
<v-subheader>{{$t("settings.title")}}</v-subheader>
<v-checkbox
v-model="toggleSearchToolbar"
label="Vis verktøylinje for søkealternativer"
......@@ -52,7 +52,7 @@
<v-card-actions><v-spacer/>
<v-btn rounded depressed @click='resetStore'>Tilbakestill</v-btn>
<v-btn rounded depressed @click="$emit('close')">Lukk</v-btn>
<v-btn rounded depressed @click="$emit('close')">{{$t("close")}}</v-btn>
</v-card-actions>
......
......@@ -19,6 +19,6 @@ function loadLocaleMessages () {
export default new VueI18n({
fallbackLocale: 'nob',
fallbackLocale: 'nor',
messages: loadLocaleMessages()
})
{
"menu": "menu"
"sub-title": "Bokmål and Nynorsk dictionaries",
"dicts": {
"nn": "nynorsk dictionary (nn)",
"bm": "bokmål dictionary (bm)",
"bm,nn": "both dictionaries"
},
"menu": "menu",
"close": "close",
"settings": {
"title": "Settings"
}
}
\ No newline at end of file
{
"menu": "meny"
}
\ No newline at end of file
{
"sub-title": "Bokmålsordboka og Nynorskordboka",
"dicts": {
"nn": "nynorskorboka (nn)",
"bm": "bokmålsordboka (bm)",
"bm,nn": "begge ordbøkene"
},
"menu": {
"title": "Meny",
"help-and-info": "Hjelp og informasjon",
"about": "Om ordbøkene",
"reset": "Tilbakestill"
},
"settings": {
"title": "Instillinger",
"showSearchToolbar": "Vis verktøylinje for søkealternativer",
"showHGNO": "Vis homografnumre",
"showInflectionNo": "Vis bøyningsnumre",
"locale": "Visningsspråk (påvirker ikke innholdet i artiklene)"
},
"error": {
"dicts": {
"nn": "Nynorskorboka",
"bm": "Bokmålsordboka",
"bm,nn": "ordbøkene"
}
},
"close": "Lukk"
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ module.exports = {
pluginOptions: {
i18n: {
fallbackLocale: 'nob',
fallbackLocale: 'nor',
localeDir: 'locales',
enableInSFC: true,
includeLocales: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment