Fix instances of double translation and guard translation calls using typescript (#11443)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
d13b6e1b41
commit
ac70f7ac9b
157 changed files with 554 additions and 780 deletions
|
@ -317,54 +317,39 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
|
|||
let subtitle: string;
|
||||
switch (this.state.nature) {
|
||||
case Nature.Disagreement:
|
||||
subtitle = _t(
|
||||
"What this user is writing is wrong.\n" + "This will be reported to the room moderators.",
|
||||
);
|
||||
subtitle = _t("What this user is writing is wrong.\nThis will be reported to the room moderators.");
|
||||
break;
|
||||
case Nature.Toxic:
|
||||
subtitle = _t(
|
||||
"This user is displaying toxic behaviour, " +
|
||||
"for instance by insulting other users or sharing " +
|
||||
"adult-only content in a family-friendly room " +
|
||||
"or otherwise violating the rules of this room.\n" +
|
||||
"This will be reported to the room moderators.",
|
||||
"This user is displaying toxic behaviour, for instance by insulting other users or sharing adult-only content in a family-friendly room or otherwise violating the rules of this room.\nThis will be reported to the room moderators.",
|
||||
);
|
||||
break;
|
||||
case Nature.Illegal:
|
||||
subtitle = _t(
|
||||
"This user is displaying illegal behaviour, " +
|
||||
"for instance by doxing people or threatening violence.\n" +
|
||||
"This will be reported to the room moderators who may escalate this to legal authorities.",
|
||||
"This user is displaying illegal behaviour, for instance by doxing people or threatening violence.\nThis will be reported to the room moderators who may escalate this to legal authorities.",
|
||||
);
|
||||
break;
|
||||
case Nature.Spam:
|
||||
subtitle = _t(
|
||||
"This user is spamming the room with ads, links to ads or to propaganda.\n" +
|
||||
"This will be reported to the room moderators.",
|
||||
"This user is spamming the room with ads, links to ads or to propaganda.\nThis will be reported to the room moderators.",
|
||||
);
|
||||
break;
|
||||
case NonStandardValue.Admin:
|
||||
if (client.isRoomEncrypted(this.props.mxEvent.getRoomId()!)) {
|
||||
subtitle = _t(
|
||||
"This room is dedicated to illegal or toxic content " +
|
||||
"or the moderators fail to moderate illegal or toxic content.\n" +
|
||||
"This will be reported to the administrators of %(homeserver)s. " +
|
||||
"The administrators will NOT be able to read the encrypted content of this room.",
|
||||
"This room is dedicated to illegal or toxic content or the moderators fail to moderate illegal or toxic content.\nThis will be reported to the administrators of %(homeserver)s. The administrators will NOT be able to read the encrypted content of this room.",
|
||||
{ homeserver: homeServerName },
|
||||
);
|
||||
} else {
|
||||
subtitle = _t(
|
||||
"This room is dedicated to illegal or toxic content " +
|
||||
"or the moderators fail to moderate illegal or toxic content.\n" +
|
||||
"This will be reported to the administrators of %(homeserver)s.",
|
||||
"This room is dedicated to illegal or toxic content or the moderators fail to moderate illegal or toxic content.\nThis will be reported to the administrators of %(homeserver)s.",
|
||||
{ homeserver: homeServerName },
|
||||
);
|
||||
}
|
||||
break;
|
||||
case Nature.Other:
|
||||
subtitle = _t(
|
||||
"Any other reason. Please describe the problem.\n" +
|
||||
"This will be reported to the room moderators.",
|
||||
"Any other reason. Please describe the problem.\nThis will be reported to the room moderators.",
|
||||
);
|
||||
break;
|
||||
default:
|
||||
|
@ -464,10 +449,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
|
|||
<div className="mx_ReportEventDialog" id="mx_ReportEventDialog">
|
||||
<p>
|
||||
{_t(
|
||||
"Reporting this message will send its unique 'event ID' to the administrator of " +
|
||||
"your homeserver. If messages in this room are encrypted, your homeserver " +
|
||||
"administrator will not be able to read the message text or view any files " +
|
||||
"or images.",
|
||||
"Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.",
|
||||
)}
|
||||
</p>
|
||||
{adminMessage}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue