Migrate more strings to translation keys (#11680)
This commit is contained in:
parent
8014cebb20
commit
6af4335db1
101 changed files with 6739 additions and 5973 deletions
|
@ -180,10 +180,8 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
.catch((err) => {
|
||||
logger.error(err);
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Error updating main address"),
|
||||
description: _t(
|
||||
"There was an error updating the room's main address. It may not be allowed by the server or a temporary failure occurred.",
|
||||
),
|
||||
title: _t("room_settings|general|error_updating_canonical_alias_title"),
|
||||
description: _t("room_settings|general|error_updating_canonical_alias_description"),
|
||||
});
|
||||
this.setState({ canonicalAlias: oldAlias });
|
||||
})
|
||||
|
@ -219,10 +217,8 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
// TODO: Add error handling based upon server validation
|
||||
logger.error(err);
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Error updating main address"),
|
||||
description: _t(
|
||||
"There was an error updating the room's alternative addresses. It may not be allowed by the server or a temporary failure occurred.",
|
||||
),
|
||||
title: _t("room_settings|general|error_updating_canonical_alias_title"),
|
||||
description: _t("room_settings|general|error_updating_alias_description"),
|
||||
});
|
||||
})
|
||||
.finally(() => {
|
||||
|
@ -254,10 +250,8 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
.catch((err) => {
|
||||
logger.error(err);
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Error creating address"),
|
||||
description: _t(
|
||||
"There was an error creating that address. It may not be allowed by the server or a temporary failure occurred.",
|
||||
),
|
||||
title: _t("room_settings|general|error_creating_alias_title"),
|
||||
description: _t("room_settings|general|error_creating_alias_description"),
|
||||
});
|
||||
});
|
||||
};
|
||||
|
@ -280,14 +274,12 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
logger.error(err);
|
||||
let description;
|
||||
if (err.errcode === "M_FORBIDDEN") {
|
||||
description = _t("You don't have permission to delete the address.");
|
||||
description = _t("room_settings|general|error_deleting_alias_description_forbidden");
|
||||
} else {
|
||||
description = _t(
|
||||
"There was an error removing that address. It may no longer exist or a temporary error occurred.",
|
||||
);
|
||||
description = _t("room_settings|general|error_deleting_alias_description");
|
||||
}
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Error removing address"),
|
||||
title: _t("room_settings|general|error_deleting_alias_title"),
|
||||
description,
|
||||
});
|
||||
});
|
||||
|
@ -350,7 +342,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
disabled={this.state.updatingCanonicalAlias || !this.props.canSetCanonicalAlias}
|
||||
element="select"
|
||||
id="canonicalAlias"
|
||||
label={_t("Main address")}
|
||||
label={_t("room_settings|general|canonical_alias_field_label")}
|
||||
>
|
||||
<option value="" key="unset">
|
||||
{_t("not specified")}
|
||||
|
@ -388,9 +380,11 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
onItemAdded={this.onLocalAliasAdded}
|
||||
onItemRemoved={this.onLocalAliasDeleted}
|
||||
noItemsLabel={
|
||||
isSpaceRoom ? _t("This space has no local addresses") : _t("This room has no local addresses")
|
||||
isSpaceRoom
|
||||
? _t("room_settings|general|no_aliases_space")
|
||||
: _t("room_settings|general|no_aliases_room")
|
||||
}
|
||||
placeholder={_t("Local address")}
|
||||
placeholder={_t("room_settings|general|local_alias_field_label")}
|
||||
domain={localDomain}
|
||||
/>
|
||||
);
|
||||
|
@ -400,14 +394,14 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
<>
|
||||
<SettingsFieldset
|
||||
data-testid="published-address-fieldset"
|
||||
legend={_t("Published Addresses")}
|
||||
legend={_t("room_settings|general|published_aliases_section")}
|
||||
description={
|
||||
<>
|
||||
{isSpaceRoom
|
||||
? _t("Published addresses can be used by anyone on any server to join your space.")
|
||||
: _t("Published addresses can be used by anyone on any server to join your room.")}
|
||||
? _t("room_settings|general|published_aliases_explainer_space")
|
||||
: _t("room_settings|general|published_aliases_explainer_room")}
|
||||
|
||||
{_t("To publish an address, it needs to be set as a local address first.")}
|
||||
{_t("room_settings|general|published_aliases_description")}
|
||||
</>
|
||||
}
|
||||
>
|
||||
|
@ -434,30 +428,24 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
onItemAdded={this.onAltAliasAdded}
|
||||
onItemRemoved={this.onAltAliasDeleted}
|
||||
suggestionsListId="mx_AliasSettings_altRecommendations"
|
||||
itemsLabel={_t("Other published addresses:")}
|
||||
noItemsLabel={_t("No other published addresses yet, add one below")}
|
||||
placeholder={_t("New published address (e.g. #alias:server)")}
|
||||
itemsLabel={_t("room_settings|general|aliases_items_label")}
|
||||
noItemsLabel={_t("room_settings|general|aliases_no_items_label")}
|
||||
placeholder={_t("room_settings|general|new_alias_placeholder")}
|
||||
roomId={this.props.roomId}
|
||||
/>
|
||||
</SettingsFieldset>
|
||||
<SettingsFieldset
|
||||
data-testid="local-address-fieldset"
|
||||
legend={_t("Local Addresses")}
|
||||
legend={_t("room_settings|general|local_aliases_section")}
|
||||
description={
|
||||
isSpaceRoom
|
||||
? _t(
|
||||
"Set addresses for this space so users can find this space through your homeserver (%(localDomain)s)",
|
||||
{ localDomain },
|
||||
)
|
||||
: _t(
|
||||
"Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)",
|
||||
{ localDomain },
|
||||
)
|
||||
? _t("room_settings|general|local_aliases_explainer_space", { localDomain })
|
||||
: _t("room_settings|general|local_aliases_explainer_room", { localDomain })
|
||||
}
|
||||
>
|
||||
<details onToggle={this.onLocalAliasesToggled} open={this.state.detailsOpen}>
|
||||
<summary className="mx_AliasSettings_localAddresses">
|
||||
{this.state.detailsOpen ? _t("room_list|show_less") : _t("Show more")}
|
||||
{this.state.detailsOpen ? _t("room_list|show_less") : _t("common|show_more")}
|
||||
</summary>
|
||||
{localAliasesList}
|
||||
</details>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue