Migrate more strings to translation keys (#11530)
This commit is contained in:
parent
d34dc0c307
commit
9eda619395
59 changed files with 4011 additions and 3255 deletions
|
@ -63,13 +63,13 @@ function tooltipText(variant: Icon): string | undefined {
|
|||
case Icon.Globe:
|
||||
return _t("This room is public");
|
||||
case Icon.PresenceOnline:
|
||||
return _t("Online");
|
||||
return _t("presence|online");
|
||||
case Icon.PresenceAway:
|
||||
return _t("Away");
|
||||
return _t("presence|away");
|
||||
case Icon.PresenceOffline:
|
||||
return _t("common|offline");
|
||||
return _t("presence|offline");
|
||||
case Icon.PresenceBusy:
|
||||
return _t("Busy");
|
||||
return _t("presence|busy");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ export default class DialPadBackspaceButton extends React.PureComponent<IProps>
|
|||
<AccessibleButton
|
||||
className="mx_DialPadBackspaceButton"
|
||||
onClick={this.props.onBackspacePress}
|
||||
aria-label={_t("Backspace")}
|
||||
aria-label={_t("keyboard|backspace")}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -25,13 +25,13 @@ import { IBodyProps } from "./IBodyProps";
|
|||
|
||||
const RedactedBody = React.forwardRef<any, IBodyProps>(({ mxEvent }, ref) => {
|
||||
const cli: MatrixClient = useContext(MatrixClientContext);
|
||||
let text = _t("Message deleted");
|
||||
let text = _t("timeline|self_redaction");
|
||||
const unsigned = mxEvent.getUnsigned();
|
||||
const redactedBecauseUserId = unsigned && unsigned.redacted_because && unsigned.redacted_because.sender;
|
||||
if (redactedBecauseUserId && redactedBecauseUserId !== mxEvent.getSender()) {
|
||||
const room = cli.getRoom(mxEvent.getRoomId());
|
||||
const sender = room && room.getMember(redactedBecauseUserId);
|
||||
text = _t("Message deleted by %(name)s", { name: sender ? sender.name : redactedBecauseUserId });
|
||||
text = _t("timeline|redaction", { name: sender ? sender.name : redactedBecauseUserId });
|
||||
}
|
||||
|
||||
const showTwelveHour = SettingsStore.getValue("showTwelveHourTimestamps");
|
||||
|
|
|
@ -42,19 +42,19 @@ export default class PresenceLabel extends React.Component<IProps> {
|
|||
// for busy presence, we ignore the 'currentlyActive' flag: they're busy whether
|
||||
// they're active or not. It can be set while the user is active in which case
|
||||
// the 'active ago' ends up being 0.
|
||||
if (presence && BUSY_PRESENCE_NAME.matches(presence)) return _t("Busy");
|
||||
if (presence && BUSY_PRESENCE_NAME.matches(presence)) return _t("presence|busy");
|
||||
|
||||
if (!currentlyActive && activeAgo !== undefined && activeAgo > 0) {
|
||||
const duration = formatDuration(activeAgo);
|
||||
if (presence === "online") return _t("Online for %(duration)s", { duration: duration });
|
||||
if (presence === "unavailable") return _t("Idle for %(duration)s", { duration: duration }); // XXX: is this actually right?
|
||||
if (presence === "offline") return _t("Offline for %(duration)s", { duration: duration });
|
||||
return _t("Unknown for %(duration)s", { duration: duration });
|
||||
if (presence === "online") return _t("presence|online_for", { duration: duration });
|
||||
if (presence === "unavailable") return _t("presence|idle_for", { duration: duration }); // XXX: is this actually right?
|
||||
if (presence === "offline") return _t("presence|offline_for", { duration: duration });
|
||||
return _t("presence|unknown_for", { duration: duration });
|
||||
} else {
|
||||
if (presence === "online") return _t("Online");
|
||||
if (presence === "unavailable") return _t("Idle"); // XXX: is this actually right?
|
||||
if (presence === "offline") return _t("common|offline");
|
||||
return _t("Unknown");
|
||||
if (presence === "online") return _t("presence|online");
|
||||
if (presence === "unavailable") return _t("presence|idle"); // XXX: is this actually right?
|
||||
if (presence === "offline") return _t("presence|offline");
|
||||
return _t("presence|unknown");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue