[zh] fixes

This commit is contained in:
Avris 2021-02-06 20:37:47 +01:00
parent dfcd0329b8
commit 232afe3b21
5 changed files with 67 additions and 65 deletions

View File

@ -7,56 +7,58 @@
<span class="higher"><T>title</T></span> <span class="higher"><T>title</T></span>
</nuxt-link> </nuxt-link>
</h1> </h1>
<div v-if="config.locale === 'zh'" class="btn-group m-2"> <div>
<button v-for="(display, code) in {traditional: '繁體', simplified: '简体'}" <div v-if="config.locale === 'zh'" class="btn-group m-2">
:class="'btn btn-sm ' + (spelling === code ? 'btn-secondary disabled' : 'btn-outline-secondary')" <button v-for="(display, code) in {traditional: '繁體', simplified: '简体'}"
:disabled="spelling === code" :class="'btn btn-sm ' + (spelling === code ? 'btn-secondary disabled' : 'btn-outline-secondary')"
@click="setSpelling(code)" :disabled="spelling === code"
> @click="setSpelling(code)"
{{display}} >
</button> {{display}}
</div> </button>
<!-- </div>
<Dropdown v-if="Object.keys(locales).length > 1" btnClass="btn-outline-secondary btn-sm"> <Dropdown v-if="Object.keys(locales).length > 1" btnClass="btn-outline-secondary btn-sm" class="d-inline-block">
<template v-slot:toggle> <template v-slot:toggle>
<Icon v="language"/> <Icon v="language"/>
{{locales[config.locale].name}} {{locales[config.locale].name}}
</template> </template>
<template v-slot:menu> <template v-slot:menu>
<li v-for="(options, locale) in locales" :key="locale" v-if="locale !== config.locale"> <li v-for="(options, locale) in locales" :key="locale" v-if="locale !== config.locale">
<a :href="options.url" class="dropdown-item"> <a :href="options.url" class="dropdown-item">
{{options.name}} {{options.name}}
</a> </a>
</li> </li>
<li class="dropdown-divider"></li> <li class="dropdown-divider"></li>
<li> <li>
<LocaleLink locale="en" link="/blog/creating-new-language-version" class="dropdown-item small"> <LocaleLink locale="en" link="/blog/creating-new-language-version" class="dropdown-item small">
<Icon v="plus"/> <Icon v="plus"/>
<T>localise.shorter</T> <T>localise.shorter</T>
</LocaleLink> </LocaleLink>
</li> </li>
</template> </template>
</Dropdown> </Dropdown>
--> <!--
<div class="btn-group"> <div class="btn-group">
<a v-for="(options, locale) in locales" :key="locale" <a v-for="(options, locale) in locales" :key="locale"
:href="options.url" :href="options.url"
:class="'btn btn-sm ' + (locale === config.locale ? 'btn-secondary disabled' : 'btn-outline-secondary')" :class="'btn btn-sm ' + (locale === config.locale ? 'btn-secondary disabled' : 'btn-outline-secondary')"
:disabled="locale === config.locale" :disabled="locale === config.locale"
> >
{{options.name}} {{options.name}}
</a> </a>
<LocaleLink locale="en" link="/blog/creating-new-language-version" class="btn btn-sm btn-outline-secondary"> <LocaleLink locale="en" link="/blog/creating-new-language-version" class="btn btn-sm btn-outline-secondary">
<Icon v="plus"/> <Icon v="plus"/>
</LocaleLink> </LocaleLink>
</div>
-->
</div> </div>
</div> </div>
<div class="d-block d-md-none"> <div class="d-block d-md-none">
<div class="btn-group-vertical btn-block nav-custom mb-2"> <div class="btn-group-vertical btn-block nav-custom mb-2">
<nuxt-link v-for="link in links" :key="link.link" :to="link.link" :class="`btn btn-sm ${isActiveRoute(link) ? 'active' : ''}`"> <nuxt-link v-for="link in links" :key="link.link" :to="link.link" :class="`btn btn-sm ${isActiveRoute(link) ? 'active' : ''}`">
<Icon :v="link.icon"/> <Icon :v="link.icon"/>
{{ link.textLong || link.text }} <Spelling>{{ link.textLong || link.text }}</Spelling>
</nuxt-link> </nuxt-link>
</div> </div>
</div> </div>
@ -70,7 +72,7 @@
<div class="btn-group-vertical btn-block nav-custom nav-custom-left mb-2"> <div class="btn-group-vertical btn-block nav-custom nav-custom-left mb-2">
<nuxt-link v-for="link in links" :key="link.link" :to="link.link" :class="`btn btn-sm ${isActiveRoute(link) ? 'active' : ''}`"> <nuxt-link v-for="link in links" :key="link.link" :to="link.link" :class="`btn btn-sm ${isActiveRoute(link) ? 'active' : ''}`">
<Icon :v="link.icon"/> <Icon :v="link.icon"/>
{{ link.textLong || link.text }} <Spelling>{{ link.textLong || link.text }}</Spelling>
</nuxt-link> </nuxt-link>
</div> </div>
</div> </div>
@ -80,7 +82,7 @@
<nuxt-link v-for="link in links" :key="link.link" :to="link.link" :class="`btn btn-sm ${isActiveRoute(link) ? 'active' : ''}`"> <nuxt-link v-for="link in links" :key="link.link" :to="link.link" :class="`btn btn-sm ${isActiveRoute(link) ? 'active' : ''}`">
<Icon :v="link.icon" size="1.6"/> <Icon :v="link.icon" size="1.6"/>
<br/> <br/>
<span class="text-nowrap">{{ link.text }}</span> <span class="text-nowrap"><Spelling>{{ link.text }}</Spelling></span>
</nuxt-link> </nuxt-link>
</div> </div>
</div> </div>

View File

@ -2,23 +2,23 @@
<span> <span>
<strong v-if="opinion === 1"> <strong v-if="opinion === 1">
<img src="../node_modules/@fortawesome/fontawesome-pro/svgs/solid/heart.svg" :aria-label="$t('profile.opinion.yes')" class="icon"/> <img src="../node_modules/@fortawesome/fontawesome-pro/svgs/solid/heart.svg" :aria-label="$t('profile.opinion.yes')" class="icon"/>
<nuxt-link v-if="link" :to="link">{{ word }}</nuxt-link> <nuxt-link v-if="link" :to="link"><Spelling>{{ word }}</Spelling></nuxt-link>
<span v-else>{{ word }}</span> <span v-else><Spelling>{{ word }}</Spelling></span>
</strong> </strong>
<span v-else-if="opinion === 2"> <span v-else-if="opinion === 2">
<Icon v="grin-tongue" :aria-label="$t('profile.opinion.jokingly')"/> <Icon v="grin-tongue" :aria-label="$t('profile.opinion.jokingly')"/>
<nuxt-link v-if="link" :to="link">{{ word }}</nuxt-link> <nuxt-link v-if="link" :to="link"><Spelling>{{ word }}</Spelling></nuxt-link>
<span v-else>{{ word }}</span> <span v-else><Spelling>{{ word }}</Spelling></span>
</span> </span>
<span v-else-if="opinion === 0"> <span v-else-if="opinion === 0">
<Icon v="thumbs-up" :aria-label="$t('profile.opinion.meh')"/> <Icon v="thumbs-up" :aria-label="$t('profile.opinion.meh')"/>
<nuxt-link v-if="link" :to="link">{{ word }}</nuxt-link> <nuxt-link v-if="link" :to="link"><Spelling>{{ word }}</Spelling></nuxt-link>
<span v-else>{{ word }}</span> <span v-else><Spelling>{{ word }}</Spelling></span>
</span> </span>
<span v-else-if="opinion === -1" class="text-muted small"> <span v-else-if="opinion === -1" class="text-muted small">
<Icon v="thumbs-down" :aria-label="$t('profile.opinion.no')"/> <Icon v="thumbs-down" :aria-label="$t('profile.opinion.no')"/>
<nuxt-link v-if="link" :to="link">{{ word }}</nuxt-link> <nuxt-link v-if="link" :to="link"><Spelling>{{ word }}</Spelling></nuxt-link>
<span v-else>{{ word }}</span> <span v-else><Spelling>{{ word }}</Spelling></span>
</span> </span>
</span> </span>
</template> </template>

View File

@ -40,7 +40,7 @@ sources:
mergePronouns: {} mergePronouns: {}
nouns: nouns:
enabled: true enabled: false
route: 'dictionary' route: 'dictionary'
collapsable: false collapsable: false
plurals: true plurals: true

View File

@ -364,8 +364,8 @@ profile:
description: '傳記' description: '傳記'
names: '名字' names: '名字'
pronouns: '代詞' pronouns: '代詞'
pronounsInfo: '您可以輸入代詞(例如“他”或“他/你”)或鏈接(例如“ http://zh.pronouns.page/佢” pronounsInfo: '您可以輸入代詞(例如“他”或“他/你”)或鏈接(例如“ http://zh.pronouns.page/佢”'
pronounsNotFound: '我們找不到這個代詞的鏈接" pronounsNotFound: '我們找不到這個代詞的鏈接'
words: '詞匯' words: '詞匯'
birthday: '嵗' birthday: '嵗'
birthdayInfo: '我們不發布您的生日,只發布計算出的年齡。' birthdayInfo: '我們不發布您的生日,只發布計算出的年齡。'
@ -423,16 +423,16 @@ confirm:
terms: terms:
header: '服務條款' header: '服務條款'
lastUpdate: '最近更新時間' lastUpdate: '最近更新時間'
consent: "通過註冊,您正在接受 {/terms=服務條款}.' consent: '通過註冊,您正在接受 {/terms=服務條款}.'
admin: admin:
header: '管理面板' header: '管理面板'
user: user:
user: '帳戶' user: '帳戶'
email: '電郵地址' email: '電郵地址'
roles: '角色' roles: '角色'
profiles: '個人資料' profiles: '個人資料'
confirmRole: 'Are you sure you want to switch @%username%''s role to "%role%"?' confirmRole: 'Are you sure you want to switch @%username%''s role to "%role%"?'
table: table:
empty: '空……' empty: '空……'

View File

@ -33,7 +33,7 @@
<section v-if="profile.age ||profile.description.trim().length"> <section v-if="profile.age ||profile.description.trim().length">
<p v-for="line in profile.description.split('\n')" class="mb-1"> <p v-for="line in profile.description.split('\n')" class="mb-1">
{{ line }} <Spelling>{{ line }}</Spelling>
</p> </p>
<p v-if="profile.age"> <p v-if="profile.age">
<Icon v="birthday-cake"/> <Icon v="birthday-cake"/>