Migrate more strings to translation keys (#11613)
This commit is contained in:
parent
d46d4b3d04
commit
5cb8cbd893
111 changed files with 8214 additions and 6766 deletions
|
@ -99,7 +99,7 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
|
|||
mxEvent={this.props.mxEvent}
|
||||
mapId={this.mapId}
|
||||
onError={this.onError}
|
||||
tooltip={_t("Expand map")}
|
||||
tooltip={_t("location_sharing|expand_map")}
|
||||
onClick={this.onClick}
|
||||
/>
|
||||
);
|
||||
|
@ -108,11 +108,11 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
|
|||
|
||||
export const LocationBodyFallbackContent: React.FC<{ event: MatrixEvent; error: Error }> = ({ error, event }) => {
|
||||
const errorType = error?.message as LocationShareError;
|
||||
const message = `${_t("Unable to load map")}: ${getLocationShareErrorMessage(errorType)}`;
|
||||
const message = `${_t("location_sharing|failed_load_map")}: ${getLocationShareErrorMessage(errorType)}`;
|
||||
|
||||
const locationFallback = isSelfLocation(event.getContent())
|
||||
? _t("Shared their location: ") + event.getContent()?.body
|
||||
: _t("Shared a location: ") + event.getContent()?.body;
|
||||
? _t("timeline|m.location|self_location") + event.getContent()?.body
|
||||
: _t("timeline|m.location|location") + event.getContent()?.body;
|
||||
|
||||
return (
|
||||
<div className="mx_EventTile_body mx_MLocationBody">
|
||||
|
|
|
@ -125,7 +125,7 @@ export default class ReactionsRowButton extends React.PureComponent<IProps, ISta
|
|||
|
||||
const reactors = formatCommaSeparatedList(senders, 6);
|
||||
if (content) {
|
||||
label = _t("%(reactors)s reacted with %(content)s", {
|
||||
label = _t("timeline|reactions|label", {
|
||||
reactors,
|
||||
content: customReactionName || content,
|
||||
});
|
||||
|
|
|
@ -60,7 +60,7 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent<IProp
|
|||
tooltipLabel = (
|
||||
<div>
|
||||
{_t(
|
||||
"<reactors/><reactedWith>reacted with %(shortName)s</reactedWith>",
|
||||
"timeline|reactions|tooltip",
|
||||
{
|
||||
shortName,
|
||||
},
|
||||
|
|
|
@ -38,7 +38,7 @@ const RedactedBody = React.forwardRef<any, IBodyProps>(({ mxEvent }, ref) => {
|
|||
const fullDate = unsigned.redacted_because
|
||||
? formatFullDate(new Date(unsigned.redacted_because.origin_server_ts), showTwelveHour)
|
||||
: undefined;
|
||||
const titleText = fullDate ? _t("Message deleted on %(date)s", { date: fullDate }) : undefined;
|
||||
const titleText = fullDate ? _t("timeline|redacted|tooltip", { date: fullDate }) : undefined;
|
||||
|
||||
return (
|
||||
<span className="mx_RedactedBody" ref={ref} title={titleText}>
|
||||
|
|
|
@ -39,7 +39,7 @@ export default class RoomAvatarEvent extends React.Component<IProps> {
|
|||
if (!httpUrl) return;
|
||||
|
||||
const room = cli.getRoom(this.props.mxEvent.getRoomId());
|
||||
const text = _t("%(senderDisplayName)s changed the avatar for %(roomName)s", {
|
||||
const text = _t("timeline|m.room.avatar|lightbox_title", {
|
||||
senderDisplayName: ev.sender && ev.sender.name ? ev.sender.name : ev.getSender(),
|
||||
roomName: room ? room.name : "",
|
||||
});
|
||||
|
@ -56,11 +56,7 @@ export default class RoomAvatarEvent extends React.Component<IProps> {
|
|||
const senderDisplayName = ev.sender && ev.sender.name ? ev.sender.name : ev.getSender();
|
||||
|
||||
if (!ev.getContent().url || ev.getContent().url.trim().length === 0) {
|
||||
return (
|
||||
<div className="mx_TextualEvent">
|
||||
{_t("%(senderDisplayName)s removed the room avatar.", { senderDisplayName })}
|
||||
</div>
|
||||
);
|
||||
return <div className="mx_TextualEvent">{_t("timeline|m.room.avatar|removed", { senderDisplayName })}</div>;
|
||||
}
|
||||
|
||||
const room = MatrixClientPeg.safeGet().getRoom(ev.getRoomId());
|
||||
|
@ -73,7 +69,7 @@ export default class RoomAvatarEvent extends React.Component<IProps> {
|
|||
return (
|
||||
<>
|
||||
{_t(
|
||||
"%(senderDisplayName)s changed the room avatar to <img/>",
|
||||
"timeline|m.room.avatar|changed_img",
|
||||
{ senderDisplayName: senderDisplayName },
|
||||
{
|
||||
img: () => (
|
||||
|
|
|
@ -98,28 +98,22 @@ export const RoomPredecessorTile: React.FC<IProps> = ({ mxEvent, timestamp }) =>
|
|||
return (
|
||||
<EventTileBubble
|
||||
className="mx_CreateEvent"
|
||||
title={_t("This room is a continuation of another conversation.")}
|
||||
title={_t("timeline|m.room.create|continuation")}
|
||||
timestamp={timestamp}
|
||||
>
|
||||
<div className="mx_EventTile_body">
|
||||
<span className="mx_EventTile_tileError">
|
||||
{!!guessedLink ? (
|
||||
<>
|
||||
{_t(
|
||||
"Can't find the old version of this room (room ID: %(roomId)s), and we have not been provided with 'via_servers' to look for it. It's possible that guessing the server from the room ID will work. If you want to try, click this link:",
|
||||
{
|
||||
roomId: predecessor.roomId,
|
||||
},
|
||||
)}
|
||||
{_t("timeline|m.room.create|unknown_predecessor_guess_server", {
|
||||
roomId: predecessor.roomId,
|
||||
})}
|
||||
<a href={guessedLink}>{guessedLink}</a>
|
||||
</>
|
||||
) : (
|
||||
_t(
|
||||
"Can't find the old version of this room (room ID: %(roomId)s), and we have not been provided with 'via_servers' to look for it.",
|
||||
{
|
||||
roomId: predecessor.roomId,
|
||||
},
|
||||
)
|
||||
_t("timeline|m.room.create|unknown_predecessor", {
|
||||
roomId: predecessor.roomId,
|
||||
})
|
||||
)}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -136,14 +130,14 @@ export const RoomPredecessorTile: React.FC<IProps> = ({ mxEvent, timestamp }) =>
|
|||
|
||||
const link = (
|
||||
<a href={predecessorPermalink} onClick={onLinkClicked}>
|
||||
{_t("Click here to see older messages.")}
|
||||
{_t("timeline|m.room.create|see_older_messages")}
|
||||
</a>
|
||||
);
|
||||
|
||||
return (
|
||||
<EventTileBubble
|
||||
className="mx_CreateEvent"
|
||||
title={_t("This room is a continuation of another conversation.")}
|
||||
title={_t("timeline|m.room.create|continuation")}
|
||||
subtitle={link}
|
||||
timestamp={timestamp}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue