Migrate more strings to translation keys (#11498)
This commit is contained in:
parent
9329b896b3
commit
6b3243b27b
89 changed files with 1495 additions and 1491 deletions
|
@ -247,7 +247,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
|
|||
{},
|
||||
{ idserver: (sub) => <b>{abbreviateUrl(this.state.currentClientIdServer)}</b> },
|
||||
),
|
||||
button: _t("Disconnect"),
|
||||
button: _t("action|disconnect"),
|
||||
});
|
||||
if (confirmed) {
|
||||
this.disconnectIdServer();
|
||||
|
@ -404,7 +404,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
|
|||
|
||||
let discoSection;
|
||||
if (idServerUrl) {
|
||||
let discoButtonContent: React.ReactNode = _t("Disconnect");
|
||||
let discoButtonContent: React.ReactNode = _t("action|disconnect");
|
||||
let discoBodyText = _t(
|
||||
"Disconnecting from your identity server will mean you won't be discoverable by other users and you won't be able to invite others by email or phone.",
|
||||
);
|
||||
|
@ -448,7 +448,7 @@ export default class SetIdServer extends React.Component<IProps, IState> {
|
|||
onClick={this.checkIdServer}
|
||||
disabled={!this.idServerChangeEnabled()}
|
||||
>
|
||||
{_t("Change")}
|
||||
{_t("action|change")}
|
||||
</AccessibleButton>
|
||||
{discoSection}
|
||||
</form>
|
||||
|
|
|
@ -139,7 +139,7 @@ export const DeviceDetailHeading: React.FC<Props> = ({ device, saveDeviceName })
|
|||
className="mx_DeviceDetailHeading_renameCta"
|
||||
data-testid="device-heading-rename-cta"
|
||||
>
|
||||
{_t("Rename")}
|
||||
{_t("action|rename")}
|
||||
</AccessibleButton>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -160,7 +160,7 @@ const NoResults: React.FC<NoResultsProps> = ({ filter, clearFilter }) => (
|
|||
<>
|
||||
|
||||
<AccessibleButton kind="link_inline" onClick={clearFilter} data-testid="devices-clear-filter-btn">
|
||||
{_t("Show all")}
|
||||
{_t("action|show_all")}
|
||||
</AccessibleButton>
|
||||
</>
|
||||
)
|
||||
|
@ -353,7 +353,7 @@ export const FilteredDeviceList = forwardRef(
|
|||
value={filter || ALL_FILTER_ID}
|
||||
onOptionChange={onFilterOptionChange}
|
||||
options={options}
|
||||
selectedLabel={_t("Show")}
|
||||
selectedLabel={_t("action|show")}
|
||||
/>
|
||||
)}
|
||||
</FilteredDeviceListHeader>
|
||||
|
|
|
@ -74,7 +74,7 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
|
|||
onClick={() => goToFilteredList(DeviceSecurityVariation.Unverified)}
|
||||
data-testid="unverified-devices-cta"
|
||||
>
|
||||
{_t("View all") + ` (${unverifiedDevicesCount})`}
|
||||
{_t("action|view_all") + ` (${unverifiedDevicesCount})`}
|
||||
</AccessibleButton>
|
||||
</DeviceSecurityCard>
|
||||
)}
|
||||
|
@ -99,7 +99,7 @@ const SecurityRecommendations: React.FC<Props> = ({ devices, currentDeviceId, go
|
|||
onClick={() => goToFilteredList(DeviceSecurityVariation.Inactive)}
|
||||
data-testid="inactive-devices-cta"
|
||||
>
|
||||
{_t("View all") + ` (${inactiveDevicesCount})`}
|
||||
{_t("action|view_all") + ` (${inactiveDevicesCount})`}
|
||||
</AccessibleButton>
|
||||
</DeviceSecurityCard>
|
||||
</>
|
||||
|
|
|
@ -185,7 +185,7 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
|
|||
onClick={this.onContinueClick}
|
||||
disabled={this.state.continueDisabled}
|
||||
>
|
||||
{_t("Complete")}
|
||||
{_t("action|complete")}
|
||||
</AccessibleButton>
|
||||
</span>
|
||||
);
|
||||
|
@ -197,7 +197,7 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
|
|||
onClick={this.onRevokeClick}
|
||||
disabled={this.props.disabled}
|
||||
>
|
||||
{_t("Revoke")}
|
||||
{_t("action|revoke")}
|
||||
</AccessibleButton>
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -205,7 +205,7 @@ export class PhoneNumber extends React.Component<IPhoneNumberProps, IPhoneNumber
|
|||
onClick={this.onRevokeClick}
|
||||
disabled={this.props.disabled}
|
||||
>
|
||||
{_t("Revoke")}
|
||||
{_t("action|revoke")}
|
||||
</AccessibleButton>
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -106,7 +106,7 @@ export default function NotificationSettings2(): JSX.Element {
|
|||
{hasPendingChanges && model !== null && (
|
||||
<SettingsBanner
|
||||
icon={<img src={NewAndImprovedIcon} alt="" width={12} />}
|
||||
action={_t("Proceed")}
|
||||
action={_t("action|proceed")}
|
||||
onAction={() => reconcile(model!)}
|
||||
>
|
||||
{_t(
|
||||
|
|
|
@ -94,7 +94,7 @@ const Knock: VFC<{
|
|||
disabled={!canKick || disabled}
|
||||
kind="icon_primary_outline"
|
||||
onClick={() => handleDeny(roomMember.userId)}
|
||||
title={_t("Deny")}
|
||||
title={_t("action|deny")}
|
||||
>
|
||||
<XIcon width={18} height={18} />
|
||||
</AccessibleButton>
|
||||
|
@ -103,7 +103,7 @@ const Knock: VFC<{
|
|||
disabled={!canInvite || disabled}
|
||||
kind="icon_primary"
|
||||
onClick={() => handleApprove(roomMember.userId)}
|
||||
title={_t("Approve")}
|
||||
title={_t("action|approve")}
|
||||
>
|
||||
<CheckIcon width={18} height={18} />
|
||||
</AccessibleButton>
|
||||
|
|
|
@ -121,7 +121,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
}
|
||||
|
||||
return (
|
||||
<SettingsSubsection heading={_t("Legal")}>
|
||||
<SettingsSubsection heading={_t("common|legal")}>
|
||||
<SettingsSubsectionText>{legalLinks}</SettingsSubsectionText>
|
||||
</SettingsSubsection>
|
||||
);
|
||||
|
@ -131,7 +131,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
// Note: This is not translated because it is legal text.
|
||||
// Also, is ugly but necessary.
|
||||
return (
|
||||
<SettingsSubsection heading={_t("Credits")}>
|
||||
<SettingsSubsection heading={_t("common|credits")}>
|
||||
<SettingsSubsectionText>
|
||||
<ul>
|
||||
<li>
|
||||
|
@ -308,7 +308,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
<SettingsTab>
|
||||
<SettingsSection heading={_t("Help & About")}>
|
||||
{bugReportingSection}
|
||||
<SettingsSubsection heading={_t("FAQ")} description={faqText} />
|
||||
<SettingsSubsection heading={_t("common|faq")} description={faqText} />
|
||||
<SettingsSubsection heading={_t("Versions")}>
|
||||
<SettingsSubsectionText>
|
||||
<CopyableText getTextToCopy={this.getVersionTextToCopy}>
|
||||
|
@ -349,7 +349,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
)}
|
||||
<SettingsSubsectionText>
|
||||
<details>
|
||||
<summary>{_t("Access Token")}</summary>
|
||||
<summary>{_t("common|access_token")}</summary>
|
||||
<b>
|
||||
{_t(
|
||||
"Your access token gives full access to your account. Do not share it with anyone.",
|
||||
|
|
|
@ -225,7 +225,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
|
|||
onClick={() => this.unsubscribeFromList(list)}
|
||||
disabled={this.state.busy}
|
||||
>
|
||||
{_t("Unsubscribe")}
|
||||
{_t("action|unsubscribe")}
|
||||
</AccessibleButton>
|
||||
|
||||
<AccessibleButton
|
||||
|
@ -326,7 +326,7 @@ export default class MjolnirUserSettingsTab extends React.Component<{}, IState>
|
|||
onClick={this.onSubscribeList}
|
||||
disabled={this.state.busy}
|
||||
>
|
||||
{_t("Subscribe")}
|
||||
{_t("action|subscribe")}
|
||||
</AccessibleButton>
|
||||
</form>
|
||||
</SettingsSubsection>
|
||||
|
|
|
@ -145,7 +145,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
|||
|
||||
return (
|
||||
<SettingsTab data-testid="mx_PreferencesUserSettingsTab">
|
||||
<SettingsSection heading={_t("Preferences")}>
|
||||
<SettingsSection heading={_t("common|preferences")}>
|
||||
{roomListSettings.length > 0 && (
|
||||
<SettingsSubsection heading={_t("Room list")}>
|
||||
{this.renderGroup(roomListSettings)}
|
||||
|
@ -178,7 +178,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
|||
</SettingsSubsection>
|
||||
|
||||
<SettingsSubsection
|
||||
heading={_t("Presence")}
|
||||
heading={_t("common|presence")}
|
||||
description={_t("Share your activity and status with others.")}
|
||||
>
|
||||
{this.renderGroup(PreferencesUserSettingsTab.PRESENCE_SETTINGS)}
|
||||
|
@ -196,7 +196,7 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
|
|||
{this.renderGroup(PreferencesUserSettingsTab.IMAGES_AND_VIDEOS_SETTINGS)}
|
||||
</SettingsSubsection>
|
||||
|
||||
<SettingsSubsection heading={_t("Timeline")}>
|
||||
<SettingsSubsection heading={_t("common|timeline")}>
|
||||
{this.renderGroup(PreferencesUserSettingsTab.TIMELINE_SETTINGS)}
|
||||
</SettingsSubsection>
|
||||
|
||||
|
|
|
@ -317,7 +317,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
});
|
||||
};
|
||||
privacySection = (
|
||||
<SettingsSection heading={_t("Privacy")}>
|
||||
<SettingsSection heading={_t("common|privacy")}>
|
||||
<SettingsSubsection
|
||||
heading={_t("common|analytics")}
|
||||
description={_t(
|
||||
|
|
|
@ -169,10 +169,10 @@ export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
|
|||
speakerDropdown = this.renderDropdown(MediaDeviceKindEnum.AudioOutput, _t("Audio Output")) || (
|
||||
<p>{_t("No Audio Outputs detected")}</p>
|
||||
);
|
||||
microphoneDropdown = this.renderDropdown(MediaDeviceKindEnum.AudioInput, _t("Microphone")) || (
|
||||
microphoneDropdown = this.renderDropdown(MediaDeviceKindEnum.AudioInput, _t("common|microphone")) || (
|
||||
<p>{_t("No Microphones detected")}</p>
|
||||
);
|
||||
webcamDropdown = this.renderDropdown(MediaDeviceKindEnum.VideoInput, _t("Camera")) || (
|
||||
webcamDropdown = this.renderDropdown(MediaDeviceKindEnum.VideoInput, _t("common|camera")) || (
|
||||
<p>{_t("No Webcams detected")}</p>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue