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

use locale on inflection button

parent 61f872a1
No related branches found
No related tags found
No related merge requests found
......@@ -14,17 +14,17 @@
<v-btn v-if="showLinkCopy"
small text class="toolbar-button" rounded @click="copy_link">
<v-icon small left>link</v-icon><span class = "button-text">{{$t("article_footer.copy_link")}}</span>
<v-icon small left>link</v-icon><span class = "button-text">{{$t("article.copy_link")}}</span>
</v-btn>
<v-btn v-if="webShareApiSupported" text small class="toolbar-button" rounded @click="shareViaWebShare">
<v-icon small left>share</v-icon><span class = "button-text">{{$t("article_footer.share")}}</span>
<v-icon small left>share</v-icon><span class = "button-text">{{$t("article.share")}}</span>
</v-btn>
<v-dialog max-width="600px" v-model="citation_dialog">
<template v-slot:activator="{ on, attrs }">
<v-btn text small class="toolbar-button" rounded v-on="on" v-bind="attrs">
<v-icon left small>format_quote</v-icon> <span class = "button-text">{{$t("article_footer.cite")}}</span>
<v-icon left small>format_quote</v-icon> <span class = "button-text">{{$t("article.cite")}}</span>
</v-btn>
......@@ -35,16 +35,16 @@
<v-toolbar-title>Sitere artikkelen</v-toolbar-title>
<v-spacer></v-spacer><v-toolbar-items><v-btn :aria-label="$t('article_footer.cancel')" @click="close_citation_dialog" text>{{$t('close')}}<v-icon right>close</v-icon></v-btn></v-toolbar-items></v-toolbar>
<v-card-text class="text--primary">
{{$t("article_footer.description")}}
{{$t("article.description")}}
<br/>
<div id = "citation" v-html="this.create_citation()"/>
</v-card-text>
<v-card-actions>
<v-btn depressed small rounded @click="copy_citation"><br>
<v-icon left small icon>content_copy</v-icon> <span class = "button-text">{{$t("article_footer.copy")}}</span>
<v-icon left small icon>content_copy</v-icon> <span class = "button-text">{{$t("article.copy")}}</span>
</v-btn>
<v-btn depressed small rounded @click="download_ris"><br>
<v-icon left small icon>get_app</v-icon> <span class = "button-text">{{$t("article_footer.download")}}</span>
<v-icon left small icon>get_app</v-icon> <span class = "button-text">{{$t("article.download")}}</span>
</v-btn>
</v-card-actions>
......@@ -104,7 +104,7 @@ export default {
},
create_citation() {
const [lemma, dd, mm, yyyy, link] = this.get_citation_info()
let citation = this.$t("article_footer.citation", {lemma, link, dd, mm, yyyy})
let citation = this.$t("article.citation", {lemma, link, dd, mm, yyyy})
return citation
},
......@@ -112,7 +112,7 @@ export default {
let link = this.create_link()
let self = this
navigator.clipboard.writeText(link).then(() => {
self.what_copied = this.$t("article_footer.link_copied")
self.what_copied = this.$t("article.link_copied")
self.copy_popup = true
}).catch(err => {
console.log("ERROR COPYING:",err)
......@@ -124,7 +124,7 @@ export default {
let citation = document.getElementById("citation").textContent;
navigator.clipboard.writeText(citation)
this.citation_dialog = false
this.what_copied = this.$t("article_footer.citation_copied")
this.what_copied = this.$t("article.citation_copied")
this.copy_popup = true
},
......
......@@ -4,7 +4,7 @@
<div class="inflection-wrapper" v-if="inflected && !$parent.collapsed">
<v-btn class="show-inflection" width="160px" rounded depressed small @click.native="toggle" :class="$vuetify.breakpoint.name">
<span>{{inflection_button_text}}</span><span class = "inflection-arrow"><v-icon right>{{inflection_arrow}}</v-icon></span>
<span>{{this.inflection_expanded? $t('article.hide_inflection'):$t('article.show_inflection')}}</span><span class = "inflection-arrow"><v-icon right>{{inflection_arrow}}</v-icon></span>
</v-btn>
<div class="inflection-canvas" v-if="inflection_expanded">
<inflectionTable :lemmaList="lemmas_with_word_class_and_lang" :mq="$vuetify.breakpoint.name" />
......@@ -30,12 +30,6 @@ export default {
inflect_tooltip: function() {
return this.dictionary == 'bm' ? 'Klikk for å se bøyinger' : 'Klikk for å sjå bøyingar'
},
inflection_button_text: function() {
return {
"bm": {false: "Se bøyning", true: "Skjul bøyning"},
"nn": {false: "Sjå bøying", true: "Skjul bøying"}
}[this.dictionary][this.inflection_expanded]
},
inflection_arrow: function() {
return this.inflection_expanded? "expand_less" : "expand_more"
},
......
......@@ -29,7 +29,9 @@
"locale": "Brukergrensesnitt",
"default-dict": "Standard ordbokvisning"
},
"article_footer": {
"article": {
"show_inflection": "Vis bøyning",
"hide_inflection": "Skjul bøyning",
"share": "Del ordet",
"copy_link": "Kopier lenke",
"cite": "Siter",
......
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