refs #874 Use translation for polls
This commit is contained in:
parent
46e541c5ed
commit
1a8d49b6d6
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"side_menu": {
|
"side_menu": {
|
||||||
|
"mention": "Mention",
|
||||||
"direct": "Direct messages",
|
"direct": "Direct messages",
|
||||||
"follow_requests": "Follow Requests"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"switch_streaming": "Use websocket for streaming. If the timeline does not update with streaming, please try it.",
|
"switch_streaming": "Use websocket for streaming. If the timeline does not update with streaming, please try it.",
|
||||||
"follow_requests": "Follow Requests",
|
"follow_requests": "Follow Requests",
|
||||||
|
"mention": "Mention",
|
||||||
"direct_messages": "Direct Messages"
|
"direct_messages": "Direct Messages"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
@ -49,6 +51,16 @@
|
||||||
"accept": "Accept",
|
"accept": "Accept",
|
||||||
"reject": "Reject"
|
"reject": "Reject"
|
||||||
},
|
},
|
||||||
|
"cards": {
|
||||||
|
"toot": {
|
||||||
|
"poll": {
|
||||||
|
"vote": "Vote",
|
||||||
|
"votes_count": "votes",
|
||||||
|
"until": "until {{datetime}}",
|
||||||
|
"left": "{{datetime}} left"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
"message": {
|
"message": {
|
||||||
"follow_request_accept_error": "Failed to accept the request",
|
"follow_request_accept_error": "Failed to accept the request",
|
||||||
"follow_reuqest_reject_error": "failed to reject the request",
|
"follow_reuqest_reject_error": "failed to reject the request",
|
||||||
|
|
|
@ -280,7 +280,13 @@
|
||||||
"reblog": "Reblog",
|
"reblog": "Reblog",
|
||||||
"fav": "Favourite",
|
"fav": "Favourite",
|
||||||
"detail": "Toot details",
|
"detail": "Toot details",
|
||||||
"pinned": "Pinned toot"
|
"pinned": "Pinned toot",
|
||||||
|
"poll": {
|
||||||
|
"vote": "Vote",
|
||||||
|
"votes_count": "votes",
|
||||||
|
"until": "until {{datetime}}",
|
||||||
|
"left": "{{datetime}} left"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"side_bar": {
|
"side_bar": {
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
"header_menu": {
|
"header_menu": {
|
||||||
"home": "Accueil",
|
"home": "Accueil",
|
||||||
"notification": "Notifications",
|
"notification": "Notifications",
|
||||||
|
"direct_messages": "Messages Privés",
|
||||||
"favourite": "Favoris",
|
"favourite": "Favoris",
|
||||||
"local": "Fil public local",
|
"local": "Fil public local",
|
||||||
"public": "Fil public global",
|
"public": "Fil public global",
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
"side_menu": {
|
"side_menu": {
|
||||||
|
"mention": "Mention",
|
||||||
"follow_requests": "Follow Requests"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
"header_menu": {
|
"header_menu": {
|
||||||
"follow_requests": "Follow Requests",
|
"mention": "Mention",
|
||||||
"direct_messages": "Direct Messages"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
"preferences": {
|
"preferences": {
|
||||||
"appearance": {
|
"appearance": {
|
||||||
|
@ -15,6 +16,16 @@
|
||||||
"accept": "Accept",
|
"accept": "Accept",
|
||||||
"reject": "Reject"
|
"reject": "Reject"
|
||||||
},
|
},
|
||||||
|
"cards": {
|
||||||
|
"toot": {
|
||||||
|
"poll": {
|
||||||
|
"vote": "Vote",
|
||||||
|
"votes_count": "votes",
|
||||||
|
"until": "until {{datetime}}",
|
||||||
|
"left": "{{datetime}} left"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"follow_request_accept_error": "Failed to accept the request",
|
"follow_request_accept_error": "Failed to accept the request",
|
||||||
"follow_reuqest_reject_error": "failed to reject the request",
|
"follow_reuqest_reject_error": "failed to reject the request",
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
"home": "Pagina Iniziale",
|
"home": "Pagina Iniziale",
|
||||||
"notification": "Notifiche",
|
"notification": "Notifiche",
|
||||||
"mention": "Menzioni",
|
"mention": "Menzioni",
|
||||||
|
"direct_messages": "Messaggi diretti",
|
||||||
"favourite": "Preferiti",
|
"favourite": "Preferiti",
|
||||||
"local": "Timeline locale",
|
"local": "Timeline locale",
|
||||||
"public": "Timeline pubblica",
|
"public": "Timeline pubblica",
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
"follow_requests": "Follow Requests"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
"header_menu": {
|
"header_menu": {
|
||||||
"follow_requests": "Follow Requests",
|
"follow_requests": "Follow Requests"
|
||||||
"direct_messages": "Direct Messages"
|
|
||||||
},
|
},
|
||||||
"preferences": {
|
"preferences": {
|
||||||
"appearance": {
|
"appearance": {
|
||||||
|
@ -15,6 +14,16 @@
|
||||||
"accept": "Accept",
|
"accept": "Accept",
|
||||||
"reject": "Reject"
|
"reject": "Reject"
|
||||||
},
|
},
|
||||||
|
"cards": {
|
||||||
|
"toot": {
|
||||||
|
"poll": {
|
||||||
|
"vote": "Vote",
|
||||||
|
"votes_count": "votes",
|
||||||
|
"until": "until {{datetime}}",
|
||||||
|
"left": "{{datetime}} left"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
"message": {
|
"message": {
|
||||||
"follow_request_accept_error": "Failed to accept the request",
|
"follow_request_accept_error": "Failed to accept the request",
|
||||||
"follow_reuqest_reject_error": "failed to reject the request",
|
"follow_reuqest_reject_error": "failed to reject the request",
|
||||||
|
|
|
@ -47,7 +47,8 @@
|
||||||
"expand": "拡大",
|
"expand": "拡大",
|
||||||
"home": "ホーム",
|
"home": "ホーム",
|
||||||
"notification": "通知",
|
"notification": "通知",
|
||||||
"direct": "ダイレクトメッセージ",
|
"mention": "返信",
|
||||||
|
"direct": "DM",
|
||||||
"follow_requests": "フォローリクエスト",
|
"follow_requests": "フォローリクエスト",
|
||||||
"favourite": "お気に入り",
|
"favourite": "お気に入り",
|
||||||
"local": "ローカル",
|
"local": "ローカル",
|
||||||
|
@ -59,6 +60,7 @@
|
||||||
"header_menu": {
|
"header_menu": {
|
||||||
"home": "ホーム",
|
"home": "ホーム",
|
||||||
"notification": "通知",
|
"notification": "通知",
|
||||||
|
"mention": "返信",
|
||||||
"favourite": "お気に入り",
|
"favourite": "お気に入り",
|
||||||
"follow_requests": "フォローリクエスト",
|
"follow_requests": "フォローリクエスト",
|
||||||
"direct_messages": "ダイレクトメッセージ",
|
"direct_messages": "ダイレクトメッセージ",
|
||||||
|
@ -271,7 +273,13 @@
|
||||||
"reblog": "ブースト",
|
"reblog": "ブースト",
|
||||||
"fav": "お気に入り",
|
"fav": "お気に入り",
|
||||||
"detail": "詳細",
|
"detail": "詳細",
|
||||||
"pinned": "固定されたトゥート"
|
"pinned": "固定されたトゥート",
|
||||||
|
"poll": {
|
||||||
|
"vote": "投票",
|
||||||
|
"votes_count": "投票数",
|
||||||
|
"until": "{{datetime}}まで",
|
||||||
|
"left": "{{datetime}}まで"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"side_bar": {
|
"side_bar": {
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
"home": "홈",
|
"home": "홈",
|
||||||
"notification": "알림",
|
"notification": "알림",
|
||||||
"favourite": "즐겨찾기",
|
"favourite": "즐겨찾기",
|
||||||
|
"direct_messages": "메세지",
|
||||||
"local": "로컬",
|
"local": "로컬",
|
||||||
"public": "연합",
|
"public": "연합",
|
||||||
"hashtag": "해시태그",
|
"hashtag": "해시태그",
|
||||||
|
|
|
@ -14,16 +14,27 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"side_menu": {
|
"side_menu": {
|
||||||
|
"mention": "Mentions",
|
||||||
"follow_requests": "Follow Requests"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
"header_menu": {
|
"header_menu": {
|
||||||
"follow_requests": "Follow Requests",
|
"mention": "Mentions",
|
||||||
"direct_messages": "Direct Messages"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
"follow_requests": {
|
"follow_requests": {
|
||||||
"accept": "Accept",
|
"accept": "Accept",
|
||||||
"reject": "Reject"
|
"reject": "Reject"
|
||||||
},
|
},
|
||||||
|
"cards": {
|
||||||
|
"toot": {
|
||||||
|
"poll": {
|
||||||
|
"vote": "Vote",
|
||||||
|
"votes_count": "votes",
|
||||||
|
"until": "until {{datetime}}",
|
||||||
|
"left": "{{datetime}} left"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"follow_request_accept_error": "Failed to accept the request",
|
"follow_request_accept_error": "Failed to accept the request",
|
||||||
"follow_reuqest_reject_error": "failed to reject the request",
|
"follow_reuqest_reject_error": "failed to reject the request",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"side_menu": {
|
"side_menu": {
|
||||||
|
"mention": "Mentions",
|
||||||
"direct": "Direct messages",
|
"direct": "Direct messages",
|
||||||
"follow_requests": "Follow Requests"
|
"follow_requests": "Follow Requests"
|
||||||
},
|
},
|
||||||
|
@ -7,6 +8,7 @@
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
"switch_streaming": "Use websocket for streaming. If the timeline does not update with streaming, please try it.",
|
"switch_streaming": "Use websocket for streaming. If the timeline does not update with streaming, please try it.",
|
||||||
"follow_requests": "Follow Requests",
|
"follow_requests": "Follow Requests",
|
||||||
|
"mention": "Mentions",
|
||||||
"direct_messages": "Direct Messages"
|
"direct_messages": "Direct Messages"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
@ -49,6 +51,16 @@
|
||||||
"accept": "Accept",
|
"accept": "Accept",
|
||||||
"reject": "Reject"
|
"reject": "Reject"
|
||||||
},
|
},
|
||||||
|
"cards": {
|
||||||
|
"toot": {
|
||||||
|
"poll": {
|
||||||
|
"vote": "Vote",
|
||||||
|
"votes_count": "votes",
|
||||||
|
"until": "until {{datetime}}",
|
||||||
|
"left": "{{datetime}} left"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"follow_request_accept_error": "Failed to accept the request",
|
"follow_request_accept_error": "Failed to accept the request",
|
||||||
"follow_reuqest_reject_error": "failed to reject the request",
|
"follow_reuqest_reject_error": "failed to reject the request",
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
</ul>
|
</ul>
|
||||||
<el-button type="success" size="small" @click="vote" v-if="!poll.voted" :disabled="pollRadio === null">Vote</el-button>
|
<el-button type="success" size="small" @click="vote" v-if="!poll.voted" :disabled="pollRadio === null">{{ $t('cards.toot.poll.vote') }}</el-button>
|
||||||
<span class="votes-count">{{ poll.votes_count }} votes,</span>
|
<span class="votes-count">{{ poll.votes_count }} {{ $t('cards.toot.poll.votes_count') }},</span>
|
||||||
<span class="until">until {{ parseDatetime(poll.expires_at, now) }}</span>
|
<span class="until">{{ parseDatetime(poll.expires_at, now) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -50,10 +50,10 @@ export default {
|
||||||
parseDatetime(datetime, epoch) {
|
parseDatetime(datetime, epoch) {
|
||||||
switch (this.timeFormat) {
|
switch (this.timeFormat) {
|
||||||
case TimeFormat.Absolute.value:
|
case TimeFormat.Absolute.value:
|
||||||
return moment(datetime).format('YYYY-MM-DD HH:mm:ss')
|
return this.$t('cards.toot.poll.until', { datetime: moment(datetime).format('YYYY-MM-DD HH:mm:ss') })
|
||||||
case TimeFormat.Relative.value:
|
case TimeFormat.Relative.value:
|
||||||
moment.locale(this.language)
|
moment.locale(this.language)
|
||||||
return moment(datetime).from(epoch)
|
return this.$t('cards.toot.poll.left', { datetime: moment(datetime).from(epoch) })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
vote() {
|
vote() {
|
||||||
|
|
Loading…
Reference in New Issue