Create more common_*
common strings (#11439)
This commit is contained in:
parent
df4a2218d7
commit
aa6e3654b8
106 changed files with 1121 additions and 1069 deletions
|
@ -256,7 +256,7 @@ export const RoomSearchView = forwardRef<ScrollPanel, Props>(
|
|||
ret.push(
|
||||
<li key={mxEv.getId() + "-room"}>
|
||||
<h2>
|
||||
{_t("Room")}: {room.name}
|
||||
{_t("common|room")}: {room.name}
|
||||
</h2>
|
||||
</li>,
|
||||
);
|
||||
|
|
|
@ -112,7 +112,7 @@ export const ThreadPanelHeader: React.FC<{
|
|||
return (
|
||||
<div className="mx_BaseCard_header_title">
|
||||
<Heading size="4" className="mx_BaseCard_header_title_heading">
|
||||
{_t("Threads")}
|
||||
{_t("common|threads")}
|
||||
</Heading>
|
||||
{!empty && (
|
||||
<>
|
||||
|
|
|
@ -369,7 +369,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
|||
return (
|
||||
<div className="mx_BaseCard_header_title">
|
||||
<Heading size="4" className="mx_BaseCard_header_title_heading">
|
||||
{_t("Thread")}
|
||||
{_t("common|thread")}
|
||||
</Heading>
|
||||
<ThreadListContextMenu mxEvent={this.props.mxEvent} permalinkCreator={this.props.permalinkCreator} />
|
||||
</div>
|
||||
|
|
|
@ -327,7 +327,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
|||
homeButton = (
|
||||
<IconizedContextMenuOption
|
||||
iconClassName="mx_UserMenu_iconHome"
|
||||
label={_t("Home")}
|
||||
label={_t("common|home")}
|
||||
onClick={this.onHomeClick}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -61,12 +61,12 @@ export const BetaPill: React.FC<IBetaPillProps> = ({
|
|||
}
|
||||
onClick={onClick}
|
||||
>
|
||||
{_t("Beta")}
|
||||
{_t("common|beta")}
|
||||
</AccessibleTooltipButton>
|
||||
);
|
||||
}
|
||||
|
||||
return <span className="mx_BetaCard_betaPill">{_t("Beta")}</span>;
|
||||
return <span className="mx_BetaCard_betaPill">{_t("common|beta")}</span>;
|
||||
};
|
||||
|
||||
const BetaCard: React.FC<IProps> = ({ title: titleOverride, featureId }) => {
|
||||
|
|
|
@ -179,7 +179,7 @@ const SpaceContextMenu: React.FC<IProps> = ({ space, hideHeader, onFinished, ...
|
|||
<IconizedContextMenuOption
|
||||
data-testid="new-room-option"
|
||||
iconClassName="mx_SpacePanel_iconPlus"
|
||||
label={_t("Room")}
|
||||
label={_t("common|room")}
|
||||
onClick={onNewRoomClick}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -359,7 +359,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
|
|||
<div className="mx_Dialog_content">
|
||||
<Field
|
||||
ref={this.nameField}
|
||||
label={_t("Name")}
|
||||
label={_t("common|name")}
|
||||
onChange={this.onNameChange}
|
||||
onValidate={this.onNameValidate}
|
||||
value={this.state.name}
|
||||
|
|
|
@ -41,7 +41,7 @@ enum Category {
|
|||
}
|
||||
|
||||
const categoryLabels: Record<Category, TranslationKey> = {
|
||||
[Category.Room]: _td("Room"),
|
||||
[Category.Room]: _td("common|room"),
|
||||
[Category.Other]: _td("Other"),
|
||||
};
|
||||
|
||||
|
@ -106,7 +106,7 @@ const DevtoolsDialog: React.FC<IProps> = ({ roomId, threadRootId, onFinished })
|
|||
</div>
|
||||
))}
|
||||
<div>
|
||||
<h3>{_t("Options")}</h3>
|
||||
<h3>{_t("common|options")}</h3>
|
||||
<SettingsFlag name="developerMode" level={SettingLevel.ACCOUNT} />
|
||||
<SettingsFlag name="showHiddenEventsInTimeline" level={SettingLevel.DEVICE} />
|
||||
<SettingsFlag name="enableWidgetScreenshots" level={SettingLevel.ACCOUNT} />
|
||||
|
|
|
@ -304,7 +304,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
|||
// Display cancel warning
|
||||
return (
|
||||
<BaseDialog
|
||||
title={_t("Warning")}
|
||||
title={_t("common|warning")}
|
||||
className="mx_ExportDialog"
|
||||
contentId="mx_Dialog_content"
|
||||
onFinished={onFinished}
|
||||
|
|
|
@ -75,7 +75,7 @@ const SpacePreferencesDialog: React.FC<IProps> = ({ space, initialTabId, onFinis
|
|||
const tabs: NonEmptyArray<Tab<SpacePreferenceTab>> = [
|
||||
new Tab(
|
||||
SpacePreferenceTab.Appearance,
|
||||
_td("Appearance"),
|
||||
_td("common|appearance"),
|
||||
"mx_SpacePreferencesDialog_appearanceIcon",
|
||||
<SpacePreferencesAppearanceTab space={space} />,
|
||||
),
|
||||
|
|
|
@ -86,7 +86,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
|
|||
tabs.push(
|
||||
new Tab(
|
||||
UserTab.Appearance,
|
||||
_td("Appearance"),
|
||||
_td("common|appearance"),
|
||||
"mx_UserSettingsDialog_appearanceIcon",
|
||||
<AppearanceUserSettingsTab />,
|
||||
"UserSettingsAppearance",
|
||||
|
@ -168,7 +168,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
|
|||
tabs.push(
|
||||
new Tab(
|
||||
UserTab.Labs,
|
||||
_td("Labs"),
|
||||
_td("common|labs"),
|
||||
"mx_UserSettingsDialog_labsIcon",
|
||||
<LabsUserSettingsTab />,
|
||||
"UserSettingsLabs",
|
||||
|
|
|
@ -785,7 +785,7 @@ export default class AppTile extends React.Component<IProps, IState> {
|
|||
{this.state.hasContextMenuOptions && (
|
||||
<ContextMenuButton
|
||||
className="mx_AppTileMenuBar_widgets_button"
|
||||
label={_t("Options")}
|
||||
label={_t("common|options")}
|
||||
isExpanded={this.state.menuDisplayed}
|
||||
inputRef={this.contextMenuButton}
|
||||
onClick={this.onContextMenuClick}
|
||||
|
|
|
@ -504,7 +504,7 @@ export default class ImageView extends React.Component<IProps, IState> {
|
|||
contextMenuButton = (
|
||||
<ContextMenuTooltipButton
|
||||
className="mx_ImageView_button mx_ImageView_button_more"
|
||||
title={_t("Options")}
|
||||
title={_t("common|options")}
|
||||
onClick={this.onOpenContextMenu}
|
||||
inputRef={this.contextMenuButton}
|
||||
isExpanded={this.state.contextMenuDisplayed}
|
||||
|
|
|
@ -95,9 +95,13 @@ const ServerPicker: React.FC<IProps> = ({ title, dialogTitle, serverConfig, onSe
|
|||
|
||||
return (
|
||||
<div className="mx_ServerPicker">
|
||||
<h2>{title || _t("Homeserver")}</h2>
|
||||
<h2>{title || _t("common|homeserver")}</h2>
|
||||
{!disableCustomUrls ? (
|
||||
<AccessibleButton className="mx_ServerPicker_help" onClick={onHelpClick} aria-label={_t("Help")} />
|
||||
<AccessibleButton
|
||||
className="mx_ServerPicker_help"
|
||||
onClick={onHelpClick}
|
||||
aria-label={_t("common|help")}
|
||||
/>
|
||||
) : null}
|
||||
<span className="mx_ServerPicker_server" title={typeof serverName === "string" ? serverName : undefined}>
|
||||
{serverName}
|
||||
|
|
|
@ -133,7 +133,7 @@ export default class MFileBody extends React.Component<IProps, IState> {
|
|||
}
|
||||
|
||||
private get fileName(): string {
|
||||
return this.content.body && this.content.body.length > 0 ? this.content.body : _t("Attachment");
|
||||
return this.content.body && this.content.body.length > 0 ? this.content.body : _t("common|attachment");
|
||||
}
|
||||
|
||||
private get linkText(): string {
|
||||
|
@ -205,9 +205,9 @@ export default class MFileBody extends React.Component<IProps, IState> {
|
|||
placeholder = (
|
||||
<AccessibleButton className="mx_MediaBody mx_MFileBody_info" onClick={this.onPlaceholderClick}>
|
||||
<span className="mx_MFileBody_info_icon" />
|
||||
<TextWithTooltip tooltip={presentableTextForFile(this.content, _t("Attachment"), true)}>
|
||||
<TextWithTooltip tooltip={presentableTextForFile(this.content, _t("common|attachment"), true)}>
|
||||
<span className="mx_MFileBody_info_filename">
|
||||
{presentableTextForFile(this.content, _t("Attachment"), true, true)}
|
||||
{presentableTextForFile(this.content, _t("common|attachment"), true, true)}
|
||||
</span>
|
||||
</TextWithTooltip>
|
||||
</AccessibleButton>
|
||||
|
@ -284,7 +284,7 @@ export default class MFileBody extends React.Component<IProps, IState> {
|
|||
*/}
|
||||
<iframe
|
||||
aria-hidden
|
||||
title={presentableTextForFile(this.content, _t("Attachment"), true, true)}
|
||||
title={presentableTextForFile(this.content, _t("common|attachment"), true, true)}
|
||||
src={url}
|
||||
onLoad={() => this.downloadFile(this.fileName, this.linkText)}
|
||||
ref={this.iframe}
|
||||
|
|
|
@ -107,7 +107,7 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
|||
if (!httpUrl) return;
|
||||
const params: Omit<ComponentProps<typeof ImageView>, "onFinished"> = {
|
||||
src: httpUrl,
|
||||
name: content.body && content.body.length > 0 ? content.body : _t("Attachment"),
|
||||
name: content.body && content.body.length > 0 ? content.body : _t("common|attachment"),
|
||||
mxEvent: this.props.mxEvent,
|
||||
permalinkCreator: this.props.permalinkCreator,
|
||||
};
|
||||
|
|
|
@ -116,7 +116,7 @@ const OptionsButton: React.FC<IOptionsButtonProps> = ({
|
|||
<React.Fragment>
|
||||
<ContextMenuTooltipButton
|
||||
className="mx_MessageActionBar_iconButton mx_MessageActionBar_optionsButton"
|
||||
title={_t("Options")}
|
||||
title={_t("common|options")}
|
||||
onClick={onOptionsClick}
|
||||
onContextMenu={onOptionsClick}
|
||||
isExpanded={menuDisplayed}
|
||||
|
|
|
@ -300,7 +300,7 @@ export default class LegacyRoomHeaderButtons extends HeaderButtons<IProps> {
|
|||
key={RightPanelPhases.ThreadPanel}
|
||||
name="threadsButton"
|
||||
data-testid="threadsButton"
|
||||
title={_t("Threads")}
|
||||
title={_t("common|threads")}
|
||||
onClick={this.onThreadsPanelClicked}
|
||||
isHighlighted={this.isPhase(LegacyRoomHeaderButtons.THREAD_PHASES)}
|
||||
isUnread={this.state.threadNotificationColor > NotificationColor.None}
|
||||
|
|
|
@ -196,7 +196,7 @@ const AppRow: React.FC<IAppRowProps> = ({ app, room }) => {
|
|||
className="mx_RoomSummaryCard_app_options"
|
||||
isExpanded={menuDisplayed}
|
||||
onClick={openMenu}
|
||||
title={_t("Options")}
|
||||
title={_t("common|options")}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
@ -502,7 +502,7 @@ export const UserOptionsSection: React.FC<{
|
|||
|
||||
return (
|
||||
<div className="mx_UserInfo_container">
|
||||
<h3>{_t("Options")}</h3>
|
||||
<h3>{_t("common|options")}</h3>
|
||||
<div>
|
||||
{directMessageButton}
|
||||
{readReceiptButton}
|
||||
|
|
|
@ -81,7 +81,7 @@ const WidgetCard: React.FC<IProps> = ({ room, widgetId, onClose }) => {
|
|||
inputRef={handle}
|
||||
onClick={openMenu}
|
||||
isExpanded={menuDisplayed}
|
||||
label={_t("Options")}
|
||||
label={_t("common|options")}
|
||||
/>
|
||||
{contextMenu}
|
||||
</div>
|
||||
|
|
|
@ -246,7 +246,7 @@ const UploadButton: React.FC = () => {
|
|||
className="mx_MessageComposer_button"
|
||||
iconClassName="mx_MessageComposer_upload"
|
||||
onClick={onClick}
|
||||
title={_t("Attachment")}
|
||||
title={_t("common|attachment")}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -392,7 +392,7 @@ const TAG_AESTHETICS: TagAestheticsMap = {
|
|||
defaultHidden: false,
|
||||
},
|
||||
[DefaultTagID.Favourite]: {
|
||||
sectionLabel: _td("Favourites"),
|
||||
sectionLabel: _td("common|favourites"),
|
||||
isInvite: false,
|
||||
defaultHidden: false,
|
||||
},
|
||||
|
|
|
@ -578,7 +578,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
|
|||
<React.Fragment>
|
||||
<hr />
|
||||
<fieldset>
|
||||
<legend className="mx_RoomSublist_contextMenu_title">{_t("Appearance")}</legend>
|
||||
<legend className="mx_RoomSublist_contextMenu_title">{_t("common|appearance")}</legend>
|
||||
<StyledMenuItemCheckbox
|
||||
onClose={this.onCloseMenu}
|
||||
onChange={this.onUnreadFirstChanged}
|
||||
|
|
|
@ -167,7 +167,7 @@ const JoinRuleSettings: React.FC<JoinRuleSettingsProps> = ({
|
|||
},
|
||||
{
|
||||
value: JoinRule.Public,
|
||||
label: _t("Public"),
|
||||
label: _t("common|public"),
|
||||
description: (
|
||||
<>
|
||||
{_t("Anyone can find and join.")}
|
||||
|
|
|
@ -246,7 +246,7 @@ export default class ThemeChoicePanel extends React.Component<IProps, IState> {
|
|||
|
||||
const orderedThemes = getOrderedThemes();
|
||||
return (
|
||||
<SettingsSubsection heading={_t("Theme")} data-testid="mx_ThemeChoicePanel">
|
||||
<SettingsSubsection heading={_t("common|theme")} data-testid="mx_ThemeChoicePanel">
|
||||
{systemThemeSection}
|
||||
<div className="mx_ThemeChoicePanel_themeSelectors" data-testid="theme-choice-panel-selectors">
|
||||
<StyledRadioGroup
|
||||
|
|
|
@ -79,7 +79,7 @@ const CurrentDeviceSectionHeading: React.FC<CurrentDeviceSectionHeadingProps> =
|
|||
<SettingsSubsectionHeading heading={_t("Current session")}>
|
||||
<KebabContextMenu
|
||||
disabled={disabled}
|
||||
title={_t("Options")}
|
||||
title={_t("common|options")}
|
||||
options={menuOptions}
|
||||
data-testid="current-session-menu"
|
||||
/>
|
||||
|
|
|
@ -76,7 +76,7 @@ const DeviceDetails: React.FC<Props> = ({
|
|||
id: "application",
|
||||
heading: _t("Application"),
|
||||
values: [
|
||||
{ label: _t("Name"), value: device.appName },
|
||||
{ label: _t("common|name"), value: device.appName },
|
||||
{ label: _t("Version"), value: device.appVersion },
|
||||
{ label: _t("URL"), value: device.url },
|
||||
],
|
||||
|
|
|
@ -52,7 +52,7 @@ export const OtherSessionsSectionHeading: React.FC<Props> = ({
|
|||
{!!menuOptions.length && (
|
||||
<KebabContextMenu
|
||||
disabled={disabled}
|
||||
title={_t("Options")}
|
||||
title={_t("common|options")}
|
||||
options={menuOptions}
|
||||
data-testid="other-sessions-menu"
|
||||
/>
|
||||
|
|
|
@ -540,7 +540,7 @@ export default class GeneralUserSettingsTab extends React.Component<IProps, ISta
|
|||
height="18"
|
||||
// override icon default values
|
||||
aria-hidden={false}
|
||||
aria-label={_t("Warning")}
|
||||
aria-label={_t("common|warning")}
|
||||
/>
|
||||
) : null;
|
||||
const heading = (
|
||||
|
|
|
@ -79,7 +79,7 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
>
|
||||
<SettingsSubsectionText>
|
||||
<HomeIcon />
|
||||
{_t("Home")}
|
||||
{_t("common|home")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Home is useful for getting an overview of everything.")}
|
||||
|
@ -106,7 +106,7 @@ const SidebarUserSettingsTab: React.FC = () => {
|
|||
>
|
||||
<SettingsSubsectionText>
|
||||
<FavoriteIcon />
|
||||
{_t("Favourites")}
|
||||
{_t("common|favourites")}
|
||||
</SettingsSubsectionText>
|
||||
<SettingsSubsectionText>
|
||||
{_t("Group all your favourite rooms and people in one place.")}
|
||||
|
|
|
@ -99,7 +99,7 @@ const QuickSettingsButton: React.FC<{
|
|||
onChange={onMetaSpaceChangeFactory(MetaSpace.Favourites, "WebQuickSettingsPinToSidebarCheckbox")}
|
||||
>
|
||||
<FavoriteIcon className="mx_QuickSettingsButton_icon" />
|
||||
{_t("Favourites")}
|
||||
{_t("common|favourites")}
|
||||
</StyledCheckbox>
|
||||
<StyledCheckbox
|
||||
className="mx_QuickSettingsButton_peopleCheckbox"
|
||||
|
|
|
@ -80,7 +80,7 @@ const QuickThemeSwitcher: React.FC<Props> = ({ requestClose }) => {
|
|||
|
||||
return (
|
||||
<div className="mx_QuickThemeSwitcher">
|
||||
<h4 className="mx_QuickThemeSwitcher_heading">{_t("Theme")}</h4>
|
||||
<h4 className="mx_QuickThemeSwitcher_heading">{_t("common|theme")}</h4>
|
||||
<Dropdown
|
||||
id="mx_QuickSettingsButton_themePickerDropdown"
|
||||
onOptionChange={onOptionChange}
|
||||
|
|
|
@ -133,7 +133,7 @@ const SpaceBasicSettings: React.FC<IProps> = ({
|
|||
|
||||
<Field
|
||||
name="spaceName"
|
||||
label={_t("Name")}
|
||||
label={_t("common|name")}
|
||||
autoFocus={true}
|
||||
value={name}
|
||||
onChange={(ev: ChangeEvent<HTMLInputElement>) => setName(ev.target.value)}
|
||||
|
@ -143,7 +143,7 @@ const SpaceBasicSettings: React.FC<IProps> = ({
|
|||
<Field
|
||||
name="spaceTopic"
|
||||
element="textarea"
|
||||
label={_t("Description")}
|
||||
label={_t("common|description")}
|
||||
value={topic}
|
||||
onChange={(ev: ChangeEvent<HTMLTextAreaElement>) => setTopic(ev.target.value)}
|
||||
rows={3}
|
||||
|
|
|
@ -169,7 +169,7 @@ export const SpaceCreateForm: React.FC<ISpaceCreateFormProps> = ({
|
|||
|
||||
<Field
|
||||
name="spaceName"
|
||||
label={_t("Name")}
|
||||
label={_t("common|name")}
|
||||
autoFocus={true}
|
||||
value={name}
|
||||
onChange={(ev: ChangeEvent<HTMLInputElement>) => {
|
||||
|
@ -203,7 +203,7 @@ export const SpaceCreateForm: React.FC<ISpaceCreateFormProps> = ({
|
|||
<Field
|
||||
name="spaceTopic"
|
||||
element="textarea"
|
||||
label={_t("Description")}
|
||||
label={_t("common|description")}
|
||||
value={topic ?? ""}
|
||||
onChange={(ev) => setTopic(ev.target.value)}
|
||||
rows={3}
|
||||
|
@ -292,13 +292,13 @@ const SpaceCreateMenu: React.FC<{
|
|||
</p>
|
||||
|
||||
<SpaceCreateMenuType
|
||||
title={_t("Public")}
|
||||
title={_t("common|public")}
|
||||
description={_t("Open space for anyone, best for communities")}
|
||||
className="mx_SpaceCreateMenuType_public"
|
||||
onClick={() => setVisibility(Visibility.Public)}
|
||||
/>
|
||||
<SpaceCreateMenuType
|
||||
title={_t("Private")}
|
||||
title={_t("common|private")}
|
||||
description={_t("Invite only, best for yourself or teams")}
|
||||
className="mx_SpaceCreateMenuType_private"
|
||||
onClick={() => setVisibility(Visibility.Private)}
|
||||
|
|
|
@ -97,7 +97,7 @@ export const HomeButtonContextMenu: React.FC<ComponentProps<typeof SpaceContextM
|
|||
|
||||
return (
|
||||
<IconizedContextMenu {...props} onFinished={onFinished} className="mx_SpacePanel_contextMenu" compact>
|
||||
{!hideHeader && <div className="mx_SpacePanel_contextMenu_header">{_t("Home")}</div>}
|
||||
{!hideHeader && <div className="mx_SpacePanel_contextMenu_header">{_t("common|home")}</div>}
|
||||
<IconizedContextMenuOptionList first>
|
||||
<IconizedContextMenuCheckbox
|
||||
iconClassName="mx_SpacePanel_noIcon"
|
||||
|
@ -159,7 +159,7 @@ const HomeButton: React.FC<MetaSpaceButtonProps> = ({ selected, isPanelCollapsed
|
|||
label={getMetaSpaceName(MetaSpace.Home, allRoomsInHome)}
|
||||
notificationState={notificationState}
|
||||
ContextMenuComponent={HomeButtonContextMenu}
|
||||
contextMenuTooltip={_t("Options")}
|
||||
contextMenuTooltip={_t("common|options")}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue