Merge branch 'develop' into germain-gg/fix-right-panel-member

This commit is contained in:
Germain 2023-08-31 11:37:41 +01:00
commit 870f40575c
97 changed files with 3236 additions and 2489 deletions

View file

@ -60,7 +60,7 @@ export function EmojiButton({ addEmoji, menuPosition, className }: IEmojiButtonP
className={computedClassName}
iconClassName="mx_EmojiButton_icon"
onClick={openMenu}
title={_t("Emoji")}
title={_t("common|emoji")}
inputRef={button}
/>

View file

@ -31,8 +31,8 @@ export enum PowerStatus {
}
const PowerLabel: Record<PowerStatus, TranslationKey> = {
[PowerStatus.Admin]: _td("Admin"),
[PowerStatus.Moderator]: _td("Mod"),
[PowerStatus.Admin]: _td("power_level|admin"),
[PowerStatus.Moderator]: _td("power_level|mod"),
};
export type PresenceState = "offline" | "online" | "unavailable";

View file

@ -64,6 +64,7 @@ import { SdkContextClass } from "../../../contexts/SDKContext";
import { VoiceBroadcastInfoState } from "../../../voice-broadcast";
import { createCantStartVoiceMessageBroadcastDialog } from "../dialogs/CantStartVoiceMessageBroadcastDialog";
import { UIFeature } from "../../../settings/UIFeature";
import { formatTimeLeft } from "../../../DateUtils";
let instanceCount = 0;
@ -569,11 +570,7 @@ export class MessageComposer extends React.Component<IProps, IState> {
if (this.state.recordingTimeLeftSeconds) {
const secondsLeft = Math.round(this.state.recordingTimeLeftSeconds);
recordingTooltip = (
<Tooltip
id={this.tooltipId}
label={_t("%(seconds)ss left", { seconds: secondsLeft })}
alignment={Alignment.Top}
/>
<Tooltip id={this.tooltipId} label={formatTimeLeft(secondsLeft)} alignment={Alignment.Top} />
);
}

View file

@ -54,7 +54,7 @@ export default class MessageComposerFormatBar extends React.PureComponent<IProps
return (
<Toolbar className={classes} ref={this.formatBarRef} aria-label={_t("Formatting")}>
<FormatButton
label={_t("Bold")}
label={_t("composer|format_bold")}
onClick={() => this.props.onAction(Formatting.Bold)}
icon="Bold"
shortcut={this.props.shortcuts.bold}
@ -68,13 +68,13 @@ export default class MessageComposerFormatBar extends React.PureComponent<IProps
visible={this.state.visible}
/>
<FormatButton
label={_t("Strikethrough")}
label={_t("composer|format_strikethrough")}
onClick={() => this.props.onAction(Formatting.Strikethrough)}
icon="Strikethrough"
visible={this.state.visible}
/>
<FormatButton
label={_t("Code block")}
label={_t("composer|format_code_block")}
onClick={() => this.props.onAction(Formatting.Code)}
icon="Code"
shortcut={this.props.shortcuts.code}

View file

@ -93,47 +93,47 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP
<div className="mx_FormattingButtons">
<Button
actionState={actionStates.bold}
label={_t("Bold")}
label={_t("composer|format_bold")}
keyCombo={{ ctrlOrCmdKey: true, key: "b" }}
onClick={() => composer.bold()}
icon={<BoldIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.italic}
label={_t("Italic")}
label={_t("composer|format_italic")}
keyCombo={{ ctrlOrCmdKey: true, key: "i" }}
onClick={() => composer.italic()}
icon={<ItalicIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.underline}
label={_t("Underline")}
label={_t("composer|format_underline")}
keyCombo={{ ctrlOrCmdKey: true, key: "u" }}
onClick={() => composer.underline()}
icon={<UnderlineIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.strikeThrough}
label={_t("Strikethrough")}
label={_t("composer|format_strikethrough")}
onClick={() => composer.strikeThrough()}
icon={<StrikeThroughIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.unorderedList}
label={_t("Bulleted list")}
label={_t("composer|format_unordered_list")}
onClick={() => composer.unorderedList()}
icon={<BulletedListIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.orderedList}
label={_t("Numbered list")}
label={_t("composer|format_ordered_list")}
onClick={() => composer.orderedList()}
icon={<NumberedListIcon className="mx_FormattingButtons_Icon" />}
/>
{isInList && (
<Button
actionState={actionStates.indent}
label={_t("Indent increase")}
label={_t("composer|format_increase_indent")}
onClick={() => composer.indent()}
icon={<IndentIcon className="mx_FormattingButtons_Icon" />}
/>
@ -141,7 +141,7 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP
{isInList && (
<Button
actionState={actionStates.unindent}
label={_t("Indent decrease")}
label={_t("composer|format_decrease_indent")}
onClick={() => composer.unindent()}
icon={<UnIndentIcon className="mx_FormattingButtons_Icon" />}
/>
@ -154,20 +154,20 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP
/>
<Button
actionState={actionStates.inlineCode}
label={_t("Code")}
label={_t("composer|format_inline_code")}
keyCombo={{ ctrlOrCmdKey: true, key: "e" }}
onClick={() => composer.inlineCode()}
icon={<InlineCodeIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.codeBlock}
label={_t("Code block")}
label={_t("composer|format_code_block")}
onClick={() => composer.codeBlock()}
icon={<CodeBlockIcon className="mx_FormattingButtons_Icon" />}
/>
<Button
actionState={actionStates.link}
label={_t("Link")}
label={_t("composer|format_link")}
onClick={() => openLinkModal(composer, composerContext, actionStates.link === "reversed")}
icon={<LinkIcon className="mx_FormattingButtons_Icon" />}
/>