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

@ -14,13 +14,14 @@
<x-note-column v-else-if="temporaryColumn.type == 'note'" :note-id="temporaryColumn.noteId" :key="temporaryColumn.noteId"/>
<x-hashtag-column v-else-if="temporaryColumn.type == 'tag'" :tag="temporaryColumn.tag" :key="temporaryColumn.tag"/>
</template>
<button ref="add" @click="add" title="%i18n:common.deck.add-column%"><fa icon="plus"/></button>
<button ref="add" @click="add" :title="$t('@deck.add-column')"><fa icon="plus"/></button>
</div>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../../../../i18n';
import XColumnCore from './deck.column-core.vue';
import Menu from '../../../../common/views/components/menu.vue';
import MkUserListsWindow from '../../components/user-lists-window.vue';
@ -31,6 +32,7 @@ import XHashtagColumn from './deck.hashtag-column.vue';
import * as uuid from 'uuid';
export default Vue.extend({
i18n: i18n('deck'),
components: {
XColumnCore,
XUserColumn,
@ -183,7 +185,7 @@ export default Vue.extend({
compact: true,
items: [{
icon: 'home',
text: '%i18n:common.deck.home%',
text: this.$t('@deck.home'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -192,7 +194,7 @@ export default Vue.extend({
}
}, {
icon: ['far', 'comments'],
text: '%i18n:common.deck.local%',
text: this.$t('@deck.local'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -201,7 +203,7 @@ export default Vue.extend({
}
}, {
icon: 'share-alt',
text: '%i18n:common.deck.hybrid%',
text: this.$t('@deck.hybrid'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -210,7 +212,7 @@ export default Vue.extend({
}
}, {
icon: 'globe',
text: '%i18n:common.deck.global%',
text: this.$t('@deck.global'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -219,7 +221,7 @@ export default Vue.extend({
}
}, {
icon: 'at',
text: '%i18n:common.deck.mentions%',
text: this.$t('@deck.mentions'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -228,7 +230,7 @@ export default Vue.extend({
}
}, {
icon: ['far', 'envelope'],
text: '%i18n:common.deck.direct%',
text: this.$t('@deck.direct'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -237,7 +239,7 @@ export default Vue.extend({
}
}, {
icon: 'list',
text: '%i18n:common.deck.list%',
text: this.$t('@deck.list'),
action: () => {
const w = (this as any).os.new(MkUserListsWindow);
w.$once('choosen', list => {
@ -251,10 +253,10 @@ export default Vue.extend({
}
}, {
icon: 'hashtag',
text: '%i18n:common.deck.hashtag%',
text: this.$t('@deck.hashtag'),
action: () => {
(this as any).apis.input({
title: '%i18n:@enter-hashtag-tl-title%'
title: this.$t('enter-hashtag-tl-title')
}).then(title => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -265,7 +267,7 @@ export default Vue.extend({
}
}, {
icon: ['far', 'bell'],
text: '%i18n:common.deck.notifications%',
text: this.$t('@deck.notifications'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),
@ -274,7 +276,7 @@ export default Vue.extend({
}
}, {
icon: 'calculator',
text: '%i18n:common.deck.widgets%',
text: this.$t('@deck.widgets'),
action: () => {
this.$store.dispatch('settings/addDeckColumn', {
id: uuid(),