Refactoring of i18n (#3165)

Refactoring of i18n
This commit is contained in:
syuilo
2018-11-09 03:44:35 +09:00
committed by GitHub
parent 21303bd06a
commit 25a69ec1b6
211 changed files with 1825 additions and 1624 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div class="mkw-polls">
<mk-widget-container :show-header="!props.compact">
<template slot="header"><fa icon="chart-pie"/>%i18n:@title%</template>
<button slot="func" title="%i18n:@refresh%" @click="fetch"><fa icon="sync"/></button>
<template slot="header"><fa icon="chart-pie"/>{{ $t('title') }}</template>
<button slot="func" :title="$t('title')" @click="fetch"><fa icon="sync"/></button>
<div class="mkw-polls--body">
<div class="poll" v-if="!fetching && poll != null">
@@ -10,8 +10,8 @@
<p v-if="!poll.text"><router-link :to="poll | notePage"><fa icon="link"/></router-link></p>
<mk-poll :note="poll"/>
</div>
<p class="empty" v-if="!fetching && poll == null">%i18n:@nothing%</p>
<p class="fetching" v-if="fetching"><fa icon="spinner .pulse" fixed-width/>%i18n:common.loading%<mk-ellipsis/></p>
<p class="empty" v-if="!fetching && poll == null">{{ $t('nothing') }}</p>
<p class="fetching" v-if="fetching"><fa icon="spinner .pulse" fixed-width/>{{ $t('@.loading') }}<mk-ellipsis/></p>
</div>
</mk-widget-container>
</div>
@@ -19,6 +19,7 @@
<script lang="ts">
import define from '../../../common/define-widget';
import i18n from '../../../i18n';
export default define({
name: 'polls',
@@ -26,6 +27,7 @@ export default define({
compact: false
})
}).extend({
i18n: i18n('desktop/views/widgets/polls.vue'),
data() {
return {
poll: null,