refs #151 Fix nested translation for moadls, cards, and side_bar

This commit is contained in:
AkiraFukushima 2018-08-12 21:26:44 +09:00
parent cab5a98287
commit 1bb0c5d2e0
6 changed files with 58 additions and 50 deletions

View File

@ -104,25 +104,29 @@
"confirm_message": "Are you sure to remove all associations?"
}
},
"new_toot": {
"title": "New Toot",
"cw": "Write your waring here",
"status": "What is on your mind?",
"cancel": "Cancel",
"toot": "Toot"
"modals": {
"new_toot": {
"title": "New Toot",
"cw": "Write your waring here",
"status": "What is on your mind?",
"cancel": "Cancel",
"toot": "Toot"
},
"jump": {
"jump_to": "Jump to..."
}
},
"jump": {
"jump_to": "Jump to..."
},
"toot": {
"show_more": "Show more",
"hide": "Hide",
"sensitive": "Show sensitive content",
"view_toot_detail": "View Toot Detail",
"open_in_browser": "Open in Browser",
"copy_link_to_toot": "Copy Link to Toot",
"delete": "Delete",
"via": "via {{application}}"
"cards": {
"toot": {
"show_more": "Show more",
"hide": "Hide",
"sensitive": "Show sensitive content",
"view_toot_detail": "View Toot Detail",
"open_in_browser": "Open in Browser",
"copy_link_to_toot": "Copy Link to Toot",
"delete": "Delete",
"via": "via {{application}}"
}
},
"side_bar": {
"account_profile": {

View File

@ -104,25 +104,29 @@
"confirm_message": "本当に全ての連携を削除しますか?"
}
},
"new_toot": {
"title": "トゥート",
"cw": "ここに警告を書いてください",
"status": "今なにしてる?",
"cancel": "キャンセル",
"toot": "トゥート!"
"modals": {
"new_toot": {
"title": "トゥート",
"cw": "ここに警告を書いてください",
"status": "今なにしてる?",
"cancel": "キャンセル",
"toot": "トゥート!"
},
"jump": {
"jump_to": "移動..."
}
},
"jump": {
"jump_to": "移動..."
},
"toot": {
"show_more": "続きを見る",
"hide": "隠す",
"sensitive": "表示する",
"view_toot_detail": "詳細",
"open_in_browser": "ブラウザで開く",
"copy_link_to_toot": "コピー",
"delete": "削除する",
"via": "{{application}} より"
"cards": {
"toot": {
"show_more": "続きを見る",
"hide": "隠す",
"sensitive": "表示する",
"view_toot_detail": "詳細",
"open_in_browser": "ブラウザで開く",
"copy_link_to_toot": "コピー",
"delete": "削除する",
"via": "{{application}} より"
}
},
"side_bar": {
"account_profile": {

View File

@ -22,17 +22,17 @@
<div class="spoiler" v-show="spoilered(message)">
{{ originalMessage(message).spoiler_text }}
<el-button v-show="!isShowContent(message)" type="text" @click="showContent = true">
{{ $t('toot.show_more') }}
{{ $t('cards.toot.show_more') }}
</el-button>
<el-button v-show="isShowContent(message)" type="text" @click="showContent = false">
{{ $t('toot.hide')}}
{{ $t('cards.toot.hide')}}
</el-button>
</div>
<div class="content" v-show="isShowContent(message)" v-html="originalMessage(message).content" @click.capture.prevent="tootClick"></div>
</div>
<div class="attachments">
<el-button v-show="sensitive(message) && !isShowAttachments(message)" class="show-sensitive" type="info" @click="showAttachments = true">
{{ $t('toot.sensitive') }}
{{ $t('cards.toot.sensitive') }}
</el-button>
<div v-show="isShowAttachments(message)">
<el-button v-show="sensitive(message) && isShowAttachments(message)" class="hide-sensitive" type="text" @click="showAttachments = false">
@ -76,16 +76,16 @@
<div class="popper toot-menu">
<ul class="menu-list">
<li role="button" @click="openDetail(message)">
{{ $t('toot.view_toot_detail') }}
{{ $t('cards.toot.view_toot_detail') }}
</li>
<li role="button" @click="openBrowser(originalMessage(message))">
{{ $t('toot.open_in_browser') }}
{{ $t('cards.toot.open_in_browser') }}
</li>
<li role="button" @click="copyLink(originalMessage(message))">
{{ $t('toot.copy_link_to_toot') }}
{{ $t('cards.toot.copy_link_to_toot') }}
</li>
<li role="button" class="separate" @click="deleteToot(message)" v-show="isMyMessage(message)">
{{ $t('toot.delete') }}
{{ $t('cards.toot.delete') }}
</li>
</ul>
</div>
@ -95,7 +95,7 @@
</popper>
</div>
<div class="application" v-show="application(message) !== null">
{{ $t('toot.via', { application: application(message) }) }}
{{ $t('cards.toot.via', { application: application(message) }) }}
</div>
</div>
<div class="clearfix"></div>

View File

@ -8,7 +8,7 @@
<input
type="text"
v-model="channel"
:placeholder="$t('jump.jump_to')"
:placeholder="$t('modals.jump.jump_to')"
ref="channel"
v-shortkey="{next: ['arrowdown'], prev: ['arrowup'], select: ['enter']}"
@shortkey="handleKey"

View File

@ -1,12 +1,12 @@
<template>
<el-dialog
:title="$t('new_toot.title')"
:title="$t('modals.new_toot.title')"
:visible.sync="newTootModal"
width="400px"
class="new-toot-modal">
<el-form v-on:submit.prevent="toot">
<div class="spoiler" v-show="showContentWarning">
<el-input :placeholder="$t('new_toot.cw')" v-model="spoiler"></el-input>
<el-input :placeholder="$t('modals.new_toot.cw')" v-model="spoiler"></el-input>
</div>
<Status
v-model="status"
@ -60,8 +60,8 @@
</el-button>
</div>
<span class="text-count">{{ 500 - status.length }}</span>
<el-button @click="close">{{ $t('new_toot.cancel') }}</el-button>
<el-button type="primary" @click="toot" v-loading="blockSubmit">{{ $t('new_toot.toot') }}</el-button>
<el-button @click="close">{{ $t('modals.new_toot.cancel') }}</el-button>
<el-button type="primary" @click="toot" v-loading="blockSubmit">{{ $t('modals.new_toot.toot') }}</el-button>
<div class="clearfix"></div>
</div>
</el-dialog>

View File

@ -6,7 +6,7 @@
v-shortkey="openSuggest ? {up: ['arrowup'], down: ['arrowdown'], enter: ['enter']} : {linux: ['ctrl', 'enter'], mac: ['meta', 'enter']}"
@shortkey="handleKey"
v-on:input="startSuggest"
:placeholder="$t('new_toot.status')"
:placeholder="$t('modals.new_toot.status')"
autofocus>
</textarea>
<el-popover