From 61d65c4081e932f13643c59deb40aa626606e07c Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Sat, 11 Aug 2018 00:59:48 +0900
Subject: [PATCH] refs #151 Translate at new toot
---
src/config/locales/en/translation.json | 7 ++++
src/config/locales/ja/translation.json | 7 ++++
.../TimelineSpace/Modals/NewToot.vue | 33 +++++++++++++------
.../TimelineSpace/Modals/NewToot/Status.vue | 2 +-
.../store/TimelineSpace/Modals/NewToot.js | 12 -------
5 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json
index e4eb7c72..42fd1f18 100644
--- a/src/config/locales/en/translation.json
+++ b/src/config/locales/en/translation.json
@@ -101,5 +101,12 @@
"cancel": "Cancel",
"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"
}
}
diff --git a/src/config/locales/ja/translation.json b/src/config/locales/ja/translation.json
index 94dcee4b..7f736070 100644
--- a/src/config/locales/ja/translation.json
+++ b/src/config/locales/ja/translation.json
@@ -101,5 +101,12 @@
"cancel": "キャンセル",
"confirm_message": "本当に全ての連携を削除しますか?"
}
+ },
+ "new_toot": {
+ "title": "トゥート",
+ "cw": "ここに警告を書いてください",
+ "status": "今なにしてる?",
+ "cancel": "キャンセル",
+ "toot": "トゥート!"
}
}
diff --git a/src/renderer/components/TimelineSpace/Modals/NewToot.vue b/src/renderer/components/TimelineSpace/Modals/NewToot.vue
index 79273b41..f6bf884f 100644
--- a/src/renderer/components/TimelineSpace/Modals/NewToot.vue
+++ b/src/renderer/components/TimelineSpace/Modals/NewToot.vue
@@ -1,12 +1,12 @@
-
+
- Public
- Unlisted
- Private
- Direct
+
+
+ {{ visibilityList.Public.name }}
+
+
+
+ {{ visibilityList.Unlisted.name }}
+
+
+
+ {{ visibilityList.Private.name }}
+
+
+
+ {{ visibilityList.Direct.name }}
+
@@ -48,8 +60,8 @@
{{ 500 - status.length }}
- Cancel
- Toot
+ {{ $t('new_toot.cancel') }}
+ {{ $t('new_toot.toot') }}
@@ -67,7 +79,8 @@ export default {
},
data () {
return {
- showContentWarning: false
+ showContentWarning: false,
+ visibilityList: Visibility
}
},
computed: {
@@ -217,7 +230,7 @@ export default {
this.$store.commit('TimelineSpace/Modals/NewToot/removeMedia', media)
},
changeVisibility (level) {
- this.$store.dispatch('TimelineSpace/Modals/NewToot/changeVisibility', level)
+ this.$store.commit('TimelineSpace/Modals/NewToot/changeVisibilityValue', level)
},
changeSensitive () {
this.$store.commit('TimelineSpace/Modals/NewToot/changeSensitive', !this.sensitive)
diff --git a/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue b/src/renderer/components/TimelineSpace/Modals/NewToot/Status.vue
index 6900fad2..f10ad056 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="What is on your mind?"
+ :placeholder="$t('new_toot.status')"
autofocus>
{
- if (Visibility[key].name === level) {
- commit('changeVisibility', Visibility[key])
- }
- })
}
}
}