Show text using i18n and modify existing usages
This commit is contained in:
parent
b739f23d29
commit
653be23a0d
2 changed files with 12 additions and 5 deletions
|
@ -10,6 +10,7 @@ import { PollAnswerSubevent, PollStartEvent } from "matrix-js-sdk/src/extensible
|
|||
import { RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import React from "react";
|
||||
|
||||
import { _t } from "../../../languageHandler";
|
||||
import Modal from "../../../Modal";
|
||||
import MemberAvatar from "../avatars/MemberAvatar";
|
||||
import { UserVote } from "../messages/MPollBody";
|
||||
|
@ -54,7 +55,7 @@ function AnswerEntry(props: {
|
|||
<div key={answer.id} className="mx_AnswerEntry">
|
||||
<div className="mx_AnswerEntry_Header">
|
||||
<span className="mx_AnswerEntry_Header_answerName">{answer.text}</span>
|
||||
<span>{votes.length} votes</span>
|
||||
<span>{_t("poll|result_dialog|count_of_votes", { count: votes.length })}</span>
|
||||
</div>
|
||||
{votes.length === 0 && <div>No one voted for this.</div>}
|
||||
{votes.map((vote) => {
|
||||
|
|
|
@ -1714,6 +1714,12 @@
|
|||
"options_heading": "Create options",
|
||||
"options_label": "Option %(number)s",
|
||||
"options_placeholder": "Write an option",
|
||||
"result_dialog": {
|
||||
"count_of_votes": {
|
||||
"one": "%(count)s vote",
|
||||
"other": "%(count)s votes"
|
||||
}
|
||||
},
|
||||
"topic_heading": "What is your poll question or topic?",
|
||||
"topic_label": "Question or topic",
|
||||
"topic_placeholder": "Write something…",
|
||||
|
@ -1723,8 +1729,8 @@
|
|||
"other": "%(count)s votes cast. Vote to see the results"
|
||||
},
|
||||
"total_n_votes_voted": {
|
||||
"one": "Based on %(count)s vote",
|
||||
"other": "Based on %(count)s votes"
|
||||
"one": "Based on %(count)s vote. Click here to see the results",
|
||||
"other": "Based on %(count)s votes. Click here to see the results"
|
||||
},
|
||||
"total_no_votes": "No votes cast",
|
||||
"total_not_ended": "Results will be visible when the poll is ended",
|
||||
|
@ -1875,8 +1881,8 @@
|
|||
"other": "There are no past polls for the past %(count)s days. Load more polls to view polls for previous months"
|
||||
},
|
||||
"final_result": {
|
||||
"one": "Final result based on %(count)s vote",
|
||||
"other": "Final result based on %(count)s votes"
|
||||
"one": "Final result based on %(count)s vote. Click here to see the results",
|
||||
"other": "Final result based on %(count)s votes. Click here to see the results"
|
||||
},
|
||||
"load_more": "Load more polls",
|
||||
"loading": "Loading polls",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue