Migrate more strings to translation keys (#11669)
This commit is contained in:
parent
0c6e56ca91
commit
5252361d1e
112 changed files with 4855 additions and 4542 deletions
|
@ -388,7 +388,7 @@ const defaultRendererFactory =
|
|||
);
|
||||
|
||||
export const defaultRoomsRenderer = defaultRendererFactory(_td("Rooms"));
|
||||
export const defaultSpacesRenderer = defaultRendererFactory(_td("Spaces"));
|
||||
export const defaultSpacesRenderer = defaultRendererFactory(_td("common|spaces"));
|
||||
export const defaultDmsRenderer = defaultRendererFactory(_td("Direct Messages"));
|
||||
|
||||
interface ISubspaceSelectorProps {
|
||||
|
@ -494,7 +494,7 @@ const AddExistingToSpaceDialog: React.FC<IProps> = ({ space, onCreateRoomClick,
|
|||
roomsRenderer={defaultRoomsRenderer}
|
||||
spacesRenderer={() => (
|
||||
<div className="mx_AddExistingToSpace_section">
|
||||
<h3>{_t("Spaces")}</h3>
|
||||
<h3>{_t("common|spaces")}</h3>
|
||||
<AccessibleButton
|
||||
kind="link"
|
||||
onClick={() => {
|
||||
|
|
|
@ -61,7 +61,7 @@ export default class ChangelogDialog extends React.Component<IProps, State> {
|
|||
const body = await res.json();
|
||||
this.setState({ [repo]: body.commits });
|
||||
} catch (err) {
|
||||
this.setState({ [repo]: err instanceof Error ? err.message : _t("Unknown error") });
|
||||
this.setState({ [repo]: err instanceof Error ? err.message : _t("error|unknown") });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -334,7 +334,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
|
|||
visibilitySection = (
|
||||
<LabelledCheckbox
|
||||
className="mx_CreateRoomDialog_labelledCheckbox"
|
||||
label={_t("Make this room visible in the public room directory.")}
|
||||
label={_t("room_settings|security|publish_room")}
|
||||
onChange={this.onIsPublicKnockRoomChange}
|
||||
value={this.state.isPublicKnockRoom}
|
||||
/>
|
||||
|
@ -417,7 +417,9 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
|
|||
<JoinRuleDropdown
|
||||
label={_t("create_room|room_visibility_label")}
|
||||
labelInvite={_t("create_room|join_rule_invite")}
|
||||
labelKnock={this.askToJoinEnabled ? _t("Ask to join") : undefined}
|
||||
labelKnock={
|
||||
this.askToJoinEnabled ? _t("room_settings|security|join_rule_knock") : undefined
|
||||
}
|
||||
labelPublic={_t("Public room")}
|
||||
labelRestricted={
|
||||
this.supportsRestricted ? _t("create_room|join_rule_restricted") : undefined
|
||||
|
@ -432,7 +434,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
|
|||
{aliasField}
|
||||
<details onToggle={this.onDetailsToggled} className="mx_CreateRoomDialog_details">
|
||||
<summary className="mx_CreateRoomDialog_details_summary">
|
||||
{this.state.detailsOpen ? _t("Hide advanced") : _t("Show advanced")}
|
||||
{this.state.detailsOpen ? _t("action|hide_advanced") : _t("action|show_advanced")}
|
||||
</summary>
|
||||
<LabelledToggleSwitch
|
||||
label={_t("create_room|unfederated", {
|
||||
|
|
|
@ -182,7 +182,7 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
|
|||
|
||||
let setupButtonCaption;
|
||||
if (this.state.backupStatus === BackupStatus.SERVER_BACKUP_BUT_DISABLED) {
|
||||
setupButtonCaption = _t("Connect this session to Key Backup");
|
||||
setupButtonCaption = _t("settings|security|key_backup_connect");
|
||||
} else {
|
||||
// if there's an error fetching the backup info, we'll just assume there's
|
||||
// no backup for the purpose of the button caption
|
||||
|
@ -203,7 +203,7 @@ export default class LogoutDialog extends React.Component<IProps, IState> {
|
|||
<button onClick={this.onLogoutConfirm}>{_t("I don't want my encrypted messages")}</button>
|
||||
</DialogButtons>
|
||||
<details>
|
||||
<summary>{_t("common|Advanced")}</summary>
|
||||
<summary>{_t("common|advanced")}</summary>
|
||||
<p>
|
||||
<button onClick={this.onExportE2eKeysClicked}>{_t("Manually export keys")}</button>
|
||||
</p>
|
||||
|
|
|
@ -134,7 +134,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
|
|||
tabs.push(
|
||||
new Tab(
|
||||
RoomSettingsTab.General,
|
||||
_td("General"),
|
||||
_td("common|general"),
|
||||
"mx_RoomSettingsDialog_settingsIcon",
|
||||
<GeneralRoomSettingsTab room={this.state.room} />,
|
||||
"RoomSettingsGeneral",
|
||||
|
@ -218,7 +218,7 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
|
|||
tabs.push(
|
||||
new Tab(
|
||||
RoomSettingsTab.Advanced,
|
||||
_td("common|Advanced"),
|
||||
_td("common|advanced"),
|
||||
"mx_RoomSettingsDialog_warningIcon",
|
||||
(
|
||||
<AdvancedRoomSettingsTab
|
||||
|
|
|
@ -55,13 +55,13 @@ const SpaceSettingsDialog: React.FC<IProps> = ({ matrixClient: cli, space, onFin
|
|||
return [
|
||||
new Tab(
|
||||
SpaceSettingsTab.General,
|
||||
_td("General"),
|
||||
_td("common|general"),
|
||||
"mx_SpaceSettingsDialog_generalIcon",
|
||||
<SpaceSettingsGeneralTab matrixClient={cli} space={space} />,
|
||||
),
|
||||
new Tab(
|
||||
SpaceSettingsTab.Visibility,
|
||||
_td("Visibility"),
|
||||
_td("room_settings|visibility|title"),
|
||||
"mx_SpaceSettingsDialog_visibilityIcon",
|
||||
<SpaceSettingsVisibilityTab matrixClient={cli} space={space} closeSettingsFn={onFinished} />,
|
||||
),
|
||||
|
@ -74,7 +74,7 @@ const SpaceSettingsDialog: React.FC<IProps> = ({ matrixClient: cli, space, onFin
|
|||
SettingsStore.getValue(UIFeature.AdvancedSettings)
|
||||
? new Tab(
|
||||
SpaceSettingsTab.Advanced,
|
||||
_td("common|Advanced"),
|
||||
_td("common|advanced"),
|
||||
"mx_RoomSettingsDialog_warningIcon",
|
||||
<AdvancedRoomSettingsTab room={space} closeSettingsFn={onFinished} />,
|
||||
)
|
||||
|
|
|
@ -77,7 +77,7 @@ export default class UserSettingsDialog extends React.Component<IProps, IState>
|
|||
tabs.push(
|
||||
new Tab(
|
||||
UserTab.General,
|
||||
_td("General"),
|
||||
_td("common|general"),
|
||||
"mx_UserSettingsDialog_settingsIcon",
|
||||
<GeneralUserSettingsTab closeSettingsFn={this.props.onFinished} />,
|
||||
"UserSettingsGeneral",
|
||||
|
|
|
@ -92,7 +92,7 @@ export function RoomResultContextMenus({ room }: Props): JSX.Element {
|
|||
const target = ev.target as HTMLElement;
|
||||
setGeneralMenuPosition(target.getBoundingClientRect());
|
||||
}}
|
||||
title={room.isSpaceRoom() ? _t("Space options") : _t("Room options")}
|
||||
title={room.isSpaceRoom() ? _t("space|context_menu|options") : _t("Room options")}
|
||||
isExpanded={generalMenuPosition !== null}
|
||||
/>
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue