#139 [terms] dictionary of queer terms
This commit is contained in:
parent
0eeeae4b67
commit
b42eed6574
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<span :title="alt">
|
||||
<a v-if="link" :href="`/${config.nouns.route}#${config.nouns.terms.hashNamespace}/${link}`" :title="alt">
|
||||
<img :src="img" alt=""/>
|
||||
{{ name }}
|
||||
</a>
|
||||
<span v-else :title="alt">
|
||||
<img :src="img" alt=""/>
|
||||
{{ name }}
|
||||
</span>
|
||||
|
@ -11,6 +15,25 @@
|
|||
name: { required: true },
|
||||
alt: { required: true },
|
||||
img: { required: true },
|
||||
terms: { 'default': [] },
|
||||
},
|
||||
computed: {
|
||||
link() {
|
||||
if (!this.config.nouns.terms.enabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (let term of this.terms) {
|
||||
if (term.term.toLowerCase().includes(this.name.toLowerCase())) {
|
||||
return this.name;
|
||||
}
|
||||
if (term.original.toLowerCase().includes(this.alt.toLowerCase())) {
|
||||
return this.alt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -60,6 +60,10 @@ nouns:
|
|||
declension: false
|
||||
submit: true
|
||||
templates: true
|
||||
inclusive:
|
||||
enabled: false
|
||||
terms:
|
||||
enabled: false
|
||||
|
||||
names:
|
||||
enabled: false
|
||||
|
|
|
@ -71,9 +71,11 @@ nouns:
|
|||
templates: true
|
||||
hashNamespace: 'neutratywy'
|
||||
inclusive:
|
||||
enabled: false
|
||||
categories: ['interpłciowość', 'lgbtq+', 'niepełnosprawność', 'rasa', 'trans']
|
||||
hashNamespace: 'inkluzywny'
|
||||
terms:
|
||||
enabled: false
|
||||
hashNamespace: 'terminologia'
|
||||
|
||||
names:
|
||||
|
|
|
@ -229,51 +229,51 @@
|
|||
</div>
|
||||
</details>
|
||||
|
||||
<!--
|
||||
<Separator icon="atom-alt"/>
|
||||
<template v-if="config.nouns.inclusive.enabled">
|
||||
<Separator icon="atom-alt"/>
|
||||
|
||||
<h3 :id="$t('nouns.inclusive.id')">
|
||||
<Icon v="book-heart"/>
|
||||
<T>nouns.inclusive.headerLong</T>
|
||||
</h3>
|
||||
<h3 :id="$t('nouns.inclusive.id')">
|
||||
<Icon v="book-heart"/>
|
||||
<T>nouns.inclusive.headerLong</T>
|
||||
</h3>
|
||||
|
||||
<T>nouns.inclusive.info</T>
|
||||
<T>nouns.inclusive.info</T>
|
||||
|
||||
<details class="border mb-3" ref="inclusivedictionarywrapper">
|
||||
<summary class="bg-light p-3" @click="$refs.inclusivedictionary.loadEntries()">
|
||||
<h4 class="h5 d-inline">
|
||||
<Icon v="book-heart"/>
|
||||
<T>nouns.inclusive.headerLong</T>
|
||||
</h4>
|
||||
</summary>
|
||||
<div class="border-top">
|
||||
<InclusiveDictionary ref="inclusivedictionary"/>
|
||||
</div>
|
||||
</details>
|
||||
-->
|
||||
<details class="border mb-3" ref="inclusivedictionarywrapper">
|
||||
<summary class="bg-light p-3" @click="$refs.inclusivedictionary.loadEntries()">
|
||||
<h4 class="h5 d-inline">
|
||||
<Icon v="book-heart"/>
|
||||
<T>nouns.inclusive.headerLong</T>
|
||||
</h4>
|
||||
</summary>
|
||||
<div class="border-top">
|
||||
<InclusiveDictionary ref="inclusivedictionary"/>
|
||||
</div>
|
||||
</details>
|
||||
</template>
|
||||
|
||||
<!--
|
||||
<Separator icon="atom-alt"/>
|
||||
<template v-if="config.nouns.terms.enabled">
|
||||
<Separator icon="atom-alt"/>
|
||||
|
||||
<h3 :id="$t('nouns.terms.id')">
|
||||
<Icon v="flag"/>
|
||||
<T>nouns.terms.headerLong</T>
|
||||
</h3>
|
||||
<h3 :id="$t('nouns.terms.id')">
|
||||
<Icon v="flag"/>
|
||||
<T>nouns.terms.headerLong</T>
|
||||
</h3>
|
||||
|
||||
<T>nouns.terms.info</T>
|
||||
<T>nouns.terms.info</T>
|
||||
|
||||
<details class="border mb-3" ref="termsdictionarywrapper">
|
||||
<summary class="bg-light p-3" @click="$refs.termsdictionary.loadEntries()">
|
||||
<h4 class="h5 d-inline">
|
||||
<Icon v="flag"/>
|
||||
<T>nouns.terms.headerLong</T>
|
||||
</h4>
|
||||
</summary>
|
||||
<div class="border-top">
|
||||
<TermsDictionary ref="termsdictionary"/>
|
||||
</div>
|
||||
</details>
|
||||
-->
|
||||
<details class="border mb-3" ref="termsdictionarywrapper">
|
||||
<summary class="bg-light p-3" @click="$refs.termsdictionary.loadEntries()">
|
||||
<h4 class="h5 d-inline">
|
||||
<Icon v="flag"/>
|
||||
<T>nouns.terms.headerLong</T>
|
||||
</h4>
|
||||
</summary>
|
||||
<div class="border-top">
|
||||
<TermsDictionary ref="termsdictionary"/>
|
||||
</div>
|
||||
</details>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -18,14 +18,22 @@
|
|||
<script>
|
||||
export default {
|
||||
data() {
|
||||
const links = {
|
||||
neuterNouns: 'deer',
|
||||
dukajNouns: 'ghost',
|
||||
personNouns: 'user-friends',
|
||||
}
|
||||
|
||||
if (this.config.nouns.inclusive.enabled) {
|
||||
links['inclusive'] = 'book-heart';
|
||||
}
|
||||
|
||||
if (this.config.nouns.terms.enabled) {
|
||||
links['terms'] = 'flag';
|
||||
}
|
||||
|
||||
return {
|
||||
links: {
|
||||
neuterNouns: 'deer',
|
||||
dukajNouns: 'ghost',
|
||||
personNouns: 'user-friends',
|
||||
// inclusive: 'book-heart',
|
||||
// terms: 'flag',
|
||||
}
|
||||
links,
|
||||
};
|
||||
},
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<section v-if="profile.flags.length">
|
||||
<ul class="list-inline">
|
||||
<li v-for="flag in profile.flags" v-if="allFlags[flag]" class="list-inline-item pr-2">
|
||||
<Flag :name="flag.startsWith('-') ? allFlags[flag] : $translateForPronoun(allFlags[flag], mainPronoun)" :alt="allFlags[flag]" :img="`/flags/${flag}.png`"/>
|
||||
<Flag :name="flag.startsWith('-') ? allFlags[flag] : $translateForPronoun(allFlags[flag], mainPronoun)" :alt="allFlags[flag]" :img="`/flags/${flag}.png`" :terms="terms"/>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
@ -136,6 +136,7 @@
|
|||
async asyncData({ app, route }) {
|
||||
return {
|
||||
profiles: await app.$axios.$get(`/profile/get/${encodeURIComponent(route.params.pathMatch)}`),
|
||||
terms: await app.$axios.$get(`/terms`),
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
Reference in New Issue