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