From 1bb0c5d2e03ed1909cb7b5661ae71784d069b44d Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sun, 12 Aug 2018 21:26:44 +0900 Subject: [PATCH] refs #151 Fix nested translation for moadls, cards, and side_bar --- src/config/locales/en/translation.json | 40 ++++++++++--------- src/config/locales/ja/translation.json | 40 ++++++++++--------- .../TimelineSpace/Contents/Cards/Toot.vue | 16 ++++---- .../components/TimelineSpace/Modals/Jump.vue | 2 +- .../TimelineSpace/Modals/NewToot.vue | 8 ++-- .../TimelineSpace/Modals/NewToot/Status.vue | 2 +- 6 files changed, 58 insertions(+), 50 deletions(-) diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json index 331d77c2..9d014a66 100644 --- a/src/config/locales/en/translation.json +++ b/src/config/locales/en/translation.json @@ -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": { diff --git a/src/config/locales/ja/translation.json b/src/config/locales/ja/translation.json index dc8f5f74..69dba3c0 100644 --- a/src/config/locales/ja/translation.json +++ b/src/config/locales/ja/translation.json @@ -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": { diff --git a/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue b/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue index 816b5710..db7aa3bb 100644 --- a/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue +++ b/src/renderer/components/TimelineSpace/Contents/Cards/Toot.vue @@ -22,17 +22,17 @@
{{ originalMessage(message).spoiler_text }} - {{ $t('toot.show_more') }} + {{ $t('cards.toot.show_more') }} - {{ $t('toot.hide')}} + {{ $t('cards.toot.hide')}}
- {{ $t('toot.sensitive') }} + {{ $t('cards.toot.sensitive') }}
@@ -76,16 +76,16 @@
@@ -95,7 +95,7 @@
- {{ $t('toot.via', { application: application(message) }) }} + {{ $t('cards.toot.via', { application: application(message) }) }}
diff --git a/src/renderer/components/TimelineSpace/Modals/Jump.vue b/src/renderer/components/TimelineSpace/Modals/Jump.vue index 4ce8d0ba..1db33d8d 100644 --- a/src/renderer/components/TimelineSpace/Modals/Jump.vue +++ b/src/renderer/components/TimelineSpace/Modals/Jump.vue @@ -8,7 +8,7 @@
- +
{{ 500 - status.length }} - {{ $t('new_toot.cancel') }} - {{ $t('new_toot.toot') }} + {{ $t('modals.new_toot.cancel') }} + {{ $t('modals.new_toot.toot') }}
diff --git a/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue b/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue index f10ad056..ab657325 100644 --- a/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue +++ b/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue @@ -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>