From e1cfde0c6ed000edafaa750704ea9aed6d0c289e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 3 Oct 2023 19:17:26 +0100 Subject: [PATCH] Migrate more strings to translation keys (#11694) --- .../security/CreateSecretStorageDialog.tsx | 6 +- src/components/structures/MatrixChat.tsx | 4 +- src/components/structures/RoomStatusBar.tsx | 2 +- src/components/structures/SpaceHierarchy.tsx | 8 +- src/components/structures/SpaceRoomView.tsx | 6 +- src/components/structures/auth/Login.tsx | 12 +- .../structures/auth/SetupEncryptionBody.tsx | 2 +- src/components/structures/auth/SoftLogout.tsx | 2 +- .../auth/forgot-password/EnterEmail.tsx | 2 +- .../auth/forgot-password/VerifyEmailModal.tsx | 2 +- src/components/views/auth/PasswordLogin.tsx | 2 +- .../views/auth/RegistrationForm.tsx | 4 +- .../views/beacon/BeaconListItem.tsx | 2 +- src/components/views/beacon/BeaconStatus.tsx | 14 +- .../views/beacon/BeaconViewDialog.tsx | 6 +- src/components/views/beacon/DialogSidebar.tsx | 6 +- .../beacon/LeftPanelLiveShareWarning.tsx | 6 +- .../views/beacon/OwnBeaconStatus.tsx | 2 +- .../views/beacon/RoomLiveShareWarning.tsx | 6 +- .../views/beacon/ShareLatestLocation.tsx | 2 +- .../views/context_menus/DeviceContextMenu.tsx | 6 +- .../context_menus/LegacyCallContextMenu.tsx | 4 +- .../context_menus/MessageContextMenu.tsx | 6 +- .../views/context_menus/SpaceContextMenu.tsx | 2 +- .../context_menus/ThreadListContextMenu.tsx | 2 +- .../views/context_menus/WidgetContextMenu.tsx | 5 +- .../dialogs/AddExistingSubspaceDialog.tsx | 8 +- .../dialogs/AddExistingToSpaceDialog.tsx | 20 +- .../views/dialogs/AskInviteAnywayDialog.tsx | 10 +- src/components/views/dialogs/BaseDialog.tsx | 2 +- .../views/dialogs/BetaFeedbackDialog.tsx | 4 +- .../views/dialogs/BugReportDialog.tsx | 19 +- .../views/dialogs/BulkRedactDialog.tsx | 27 +- .../CantStartVoiceMessageBroadcastDialog.tsx | 10 +- .../views/dialogs/ChangelogDialog.tsx | 10 +- .../dialogs/ConfirmAndWaitRedactDialog.tsx | 4 +- .../views/dialogs/ConfirmRedactDialog.tsx | 10 +- .../views/dialogs/ConfirmWipeDeviceDialog.tsx | 10 +- .../views/dialogs/CreateSubspaceDialog.tsx | 20 +- .../views/dialogs/CryptoStoreTooNewDialog.tsx | 14 +- .../views/dialogs/DeactivateAccountDialog.tsx | 44 +- .../views/dialogs/EndPollDialog.tsx | 16 +- src/components/views/dialogs/ErrorDialog.tsx | 2 +- src/components/views/dialogs/ExportDialog.tsx | 2 +- .../views/dialogs/FeedbackDialog.tsx | 2 +- .../views/dialogs/ForwardDialog.tsx | 16 +- .../dialogs/GenericFeatureFeedbackDialog.tsx | 4 +- .../views/dialogs/IncomingSasDialog.tsx | 28 +- .../dialogs/IntegrationsDisabledDialog.tsx | 4 +- .../dialogs/IntegrationsImpossibleDialog.tsx | 9 +- .../views/dialogs/InteractiveAuthDialog.tsx | 6 +- src/components/views/dialogs/InviteDialog.tsx | 95 +- .../KeySignatureUploadFailedDialog.tsx | 22 +- .../dialogs/LazyLoadingDisabledDialog.tsx | 24 +- .../views/dialogs/LazyLoadingResyncDialog.tsx | 7 +- .../views/dialogs/LeaveSpaceDialog.tsx | 22 +- src/components/views/dialogs/LogoutDialog.tsx | 22 +- .../ManageRestrictedJoinRuleDialog.tsx | 22 +- .../ManualDeviceKeyVerificationDialog.tsx | 13 +- .../dialogs/MessageEditHistoryDialog.tsx | 8 +- .../views/dialogs/ModalWidgetDialog.tsx | 4 +- .../dialogs/RegistrationEmailPromptDialog.tsx | 6 +- .../views/dialogs/ReportEventDialog.tsx | 38 +- .../views/dialogs/RoomSettingsDialog.tsx | 2 +- .../views/dialogs/RoomUpgradeDialog.tsx | 31 +- .../dialogs/RoomUpgradeWarningDialog.tsx | 30 +- .../views/dialogs/ScrollableBaseModal.tsx | 2 +- .../views/dialogs/ServerOfflineDialog.tsx | 28 +- .../views/dialogs/SeshatResetDialog.tsx | 10 +- .../dialogs/SessionRestoreErrorDialog.tsx | 21 +- .../views/dialogs/SetEmailDialog.tsx | 18 +- src/components/views/dialogs/ShareDialog.tsx | 12 +- .../views/dialogs/SlashCommandHelpDialog.tsx | 2 +- .../dialogs/SlidingSyncOptionsDialog.tsx | 4 +- .../views/dialogs/SpacePreferencesDialog.tsx | 11 +- .../views/dialogs/StorageEvictedDialog.tsx | 12 +- src/components/views/dialogs/TermsDialog.tsx | 4 +- .../views/dialogs/UntrustedDeviceDialog.tsx | 14 +- .../views/dialogs/UploadConfirmDialog.tsx | 6 +- .../views/dialogs/UploadFailureDialog.tsx | 12 +- .../dialogs/VerificationRequestDialog.tsx | 4 +- .../WidgetCapabilitiesPromptDialog.tsx | 8 +- .../dialogs/WidgetOpenIDPermissionsDialog.tsx | 6 +- .../views/dialogs/devtools/Event.tsx | 2 +- .../views/dialogs/devtools/FilteredList.tsx | 6 +- .../dialogs/devtools/SettingExplorer.tsx | 2 +- .../dialogs/devtools/VerificationExplorer.tsx | 2 +- .../views/dialogs/oidc/OidcLogoutDialog.tsx | 2 +- .../security/AccessSecretStorageDialog.tsx | 38 +- .../ConfirmDestroyCrossSigningDialog.tsx | 10 +- .../security/CreateCrossSigningDialog.tsx | 8 +- .../security/RestoreKeyBackupDialog.tsx | 76 +- .../spotlight/PublicRoomResultDetails.tsx | 2 +- .../dialogs/spotlight/SpotlightDialog.tsx | 56 +- .../views/directory/NetworkDropdown.tsx | 27 +- src/components/views/elements/InfoTooltip.tsx | 2 +- .../views/elements/LanguageDropdown.tsx | 2 +- src/components/views/elements/Pill.tsx | 4 +- .../views/elements/PowerSelector.tsx | 4 +- src/components/views/elements/ReplyChain.tsx | 8 +- .../views/elements/RoomAliasField.tsx | 20 +- .../views/elements/RoomFacePile.tsx | 10 +- .../views/elements/SearchWarning.tsx | 12 +- .../views/elements/ServerPicker.tsx | 11 +- .../views/elements/SettingsFlag.tsx | 2 +- .../elements/SpellCheckLanguagesDropdown.tsx | 4 +- .../views/elements/TruncatedList.tsx | 2 +- .../views/elements/UseCaseSelection.tsx | 6 +- .../views/elements/UseCaseSelectionButton.tsx | 6 +- src/components/views/emojipicker/Search.tsx | 2 +- .../views/location/LocationButton.tsx | 2 +- .../views/location/LocationPicker.tsx | 2 +- src/components/views/location/Map.tsx | 2 +- src/components/views/location/ShareType.tsx | 8 +- .../views/location/shareLocation.ts | 10 +- src/components/views/messages/CallEvent.tsx | 2 +- .../views/messages/DateSeparator.tsx | 4 +- .../messages/MKeyVerificationRequest.tsx | 8 +- src/components/views/messages/MPollBody.tsx | 2 +- .../views/messages/ReactionsRow.tsx | 2 +- .../views/messages/ReactionsRowButton.tsx | 2 +- src/components/views/messages/TextualBody.tsx | 15 +- .../views/messages/TileErrorBoundary.tsx | 4 +- .../views/messages/ViewSourceEvent.tsx | 2 +- src/components/views/polls/PollOption.tsx | 2 +- src/components/views/right_panel/UserInfo.tsx | 4 +- .../views/room_settings/AliasSettings.tsx | 2 +- src/components/views/rooms/EventTile.tsx | 2 +- .../views/rooms/LegacyRoomHeader.tsx | 2 +- .../views/rooms/LiveContentSummary.tsx | 2 +- src/components/views/rooms/MemberList.tsx | 2 +- .../views/rooms/ReadReceiptGroup.tsx | 20 +- src/components/views/rooms/RoomHeader.tsx | 2 +- src/components/views/rooms/RoomInfoLine.tsx | 4 +- src/components/views/rooms/RoomKnocksBar.tsx | 2 +- src/components/views/rooms/RoomPreviewBar.tsx | 2 +- .../views/rooms/RoomPreviewCard.tsx | 2 +- src/components/views/rooms/ThreadSummary.tsx | 2 +- src/i18n/strings/ar.json | 150 ++- src/i18n/strings/az.json | 28 +- src/i18n/strings/bg.json | 622 +++++---- src/i18n/strings/ca.json | 164 ++- src/i18n/strings/cs.json | 1192 +++++++++-------- src/i18n/strings/da.json | 46 +- src/i18n/strings/de_DE.json | 1192 +++++++++-------- src/i18n/strings/el.json | 1070 ++++++++------- src/i18n/strings/en_EN.json | 1185 ++++++++-------- src/i18n/strings/en_US.json | 90 +- src/i18n/strings/eo.json | 910 +++++++------ src/i18n/strings/es.json | 1174 ++++++++-------- src/i18n/strings/et.json | 1192 +++++++++-------- src/i18n/strings/eu.json | 552 ++++---- src/i18n/strings/fa.json | 802 ++++++----- src/i18n/strings/fi.json | 1060 ++++++++------- src/i18n/strings/fr.json | 1192 +++++++++-------- src/i18n/strings/ga.json | 70 +- src/i18n/strings/gl.json | 1136 ++++++++-------- src/i18n/strings/he.json | 762 ++++++----- src/i18n/strings/hi.json | 22 +- src/i18n/strings/hu.json | 1182 ++++++++-------- src/i18n/strings/id.json | 1192 +++++++++-------- src/i18n/strings/is.json | 940 +++++++------ src/i18n/strings/it.json | 1192 +++++++++-------- src/i18n/strings/ja.json | 1164 ++++++++-------- src/i18n/strings/jbo.json | 74 +- src/i18n/strings/kab.json | 590 ++++---- src/i18n/strings/ko.json | 402 +++--- src/i18n/strings/lo.json | 1074 ++++++++------- src/i18n/strings/lt.json | 726 +++++----- src/i18n/strings/lv.json | 546 ++++---- src/i18n/strings/ml.json | 22 +- src/i18n/strings/nb_NO.json | 410 +++--- src/i18n/strings/nl.json | 1140 ++++++++-------- src/i18n/strings/nn.json | 230 ++-- src/i18n/strings/oc.json | 50 +- src/i18n/strings/pl.json | 1190 ++++++++-------- src/i18n/strings/pt.json | 114 +- src/i18n/strings/pt_BR.json | 824 ++++++------ src/i18n/strings/ro.json | 4 +- src/i18n/strings/ru.json | 1152 ++++++++-------- src/i18n/strings/sk.json | 1192 +++++++++-------- src/i18n/strings/sq.json | 1180 ++++++++-------- src/i18n/strings/sr.json | 232 ++-- src/i18n/strings/sr_Latn.json | 8 +- src/i18n/strings/sv.json | 1186 ++++++++-------- src/i18n/strings/ta.json | 22 +- src/i18n/strings/te.json | 26 +- src/i18n/strings/th.json | 98 +- src/i18n/strings/tr.json | 448 ++++--- src/i18n/strings/tzm.json | 12 +- src/i18n/strings/uk.json | 1192 +++++++++-------- src/i18n/strings/vi.json | 1080 ++++++++------- src/i18n/strings/vls.json | 318 +++-- src/i18n/strings/zh_Hans.json | 1110 +++++++-------- src/i18n/strings/zh_Hant.json | 1192 +++++++++-------- src/utils/AutoDiscoveryUtils.tsx | 60 +- .../components/structures/auth/Login-test.tsx | 8 +- .../__snapshots__/DialogSidebar-test.tsx.snap | 4 +- .../views/rooms/ReadReceiptGroup-test.tsx | 38 +- test/languageHandler-test.tsx | 2 +- test/utils/AutoDiscoveryUtils-test.tsx | 6 +- 201 files changed, 21074 insertions(+), 18552 deletions(-) diff --git a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx index 026c0720e7..780d304249 100644 --- a/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx +++ b/src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx @@ -324,13 +324,13 @@ export default class CreateSecretStorageDialog extends React.PureComponent { const isSpace = roomToLeave?.isSpaceRoom(); Modal.createDialog(QuestionDialog, { - title: isSpace ? _t("Leave space") : _t("action|leave_room"), + title: isSpace ? _t("space|leave_dialog_action") : _t("action|leave_room"), description: ( {isSpace @@ -1271,7 +1271,7 @@ export default class MatrixChat extends React.PureComponent { if (room) RoomListStore.instance.manualRoomUpdate(room, RoomUpdateCause.RoomRemoved); }) .catch((err) => { - const errCode = err.errcode || _td("unknown error code"); + const errCode = err.errcode || _td("error|unknown_error_code"); Modal.createDialog(ErrorDialog, { title: _t("error_dialog|forget_room_failed", { errCode }), description: err && err.message ? err.message : _t("invite|failed_generic"), diff --git a/src/components/structures/RoomStatusBar.tsx b/src/components/structures/RoomStatusBar.tsx index 657823fc96..311f6b89b5 100644 --- a/src/components/structures/RoomStatusBar.tsx +++ b/src/components/structures/RoomStatusBar.tsx @@ -246,7 +246,7 @@ export default class RoomStatusBar extends React.PureComponent { <> {/* span for css */} - {_t("Sending")} + {_t("forward|sending")} ); } diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx index 691f99d5be..aa57114e5a 100644 --- a/src/components/structures/SpaceHierarchy.tsx +++ b/src/components/structures/SpaceHierarchy.tsx @@ -206,9 +206,9 @@ const Tile: React.FC = ({ ); } - let description = _t("%(count)s members", { count: room.num_joined_members ?? 0 }); + let description = _t("common|n_members", { count: room.num_joined_members ?? 0 }); if (numChildRooms !== undefined) { - description += " · " + _t("%(count)s rooms", { count: numChildRooms }); + description += " · " + _t("common|n_rooms", { count: numChildRooms }); } let topic: ReactNode | string | null; @@ -713,7 +713,7 @@ const ManageButtons: React.FC = ({ hierarchy, selected, set kind="danger_outline" disabled={disabled} > - {removing ? _t("Removing…") : _t("action|remove")} + {removing ? _t("redact|ongoing") : _t("action|remove")} diff --git a/src/components/views/dialogs/BaseDialog.tsx b/src/components/views/dialogs/BaseDialog.tsx index ca9f44e0e9..03e19f2881 100644 --- a/src/components/views/dialogs/BaseDialog.tsx +++ b/src/components/views/dialogs/BaseDialog.tsx @@ -127,7 +127,7 @@ export default class BaseDialog extends React.Component { ); } diff --git a/src/components/views/dialogs/BetaFeedbackDialog.tsx b/src/components/views/dialogs/BetaFeedbackDialog.tsx index 00bb7cd7f6..ffa97ef62a 100644 --- a/src/components/views/dialogs/BetaFeedbackDialog.tsx +++ b/src/components/views/dialogs/BetaFeedbackDialog.tsx @@ -37,7 +37,7 @@ const BetaFeedbackDialog: React.FC = ({ featureId, onFinished }) => { return ( = ({ featureId, onFinished }) => { }); }} > - {_t("To leave the beta, visit your settings.")} + {_t("labs|beta_feedback_leave_button")} ); diff --git a/src/components/views/dialogs/BugReportDialog.tsx b/src/components/views/dialogs/BugReportDialog.tsx index d2074c5cd4..bf0464ae95 100644 --- a/src/components/views/dialogs/BugReportDialog.tsx +++ b/src/components/views/dialogs/BugReportDialog.tsx @@ -98,7 +98,7 @@ export default class BugReportDialog extends React.Component { private onSubmit = (): void => { if ((!this.state.text || !this.state.text.trim()) && (!this.state.issueUrl || !this.state.issueUrl.trim())) { this.setState({ - err: _t("Please tell us what went wrong or, better, create a GitHub issue that describes the problem."), + err: _t("bug_reporting|error_empty"), }); return; } @@ -109,7 +109,7 @@ export default class BugReportDialog extends React.Component { (this.state.issueUrl.length > 0 ? this.state.issueUrl : "No issue link given"); this.setState({ busy: true, progress: null, err: null }); - this.sendProgressCallback(_t("Preparing to send logs")); + this.sendProgressCallback(_t("bug_reporting|preparing_logs")); sendBugReport(SdkConfig.get().bug_report_endpoint_url, { userText, @@ -121,8 +121,8 @@ export default class BugReportDialog extends React.Component { if (!this.unmounted) { this.props.onFinished(false); Modal.createDialog(QuestionDialog, { - title: _t("Logs sent"), - description: _t("Thank you!"), + title: _t("bug_reporting|logs_sent"), + description: _t("bug_reporting|thank_you"), hasCancelButton: false, }); } @@ -132,7 +132,7 @@ export default class BugReportDialog extends React.Component { this.setState({ busy: false, progress: null, - err: _t("Failed to send logs: ") + `${err.message}`, + err: _t("bug_reporting|failed_send_logs") + `${err.message}`, }); } }, @@ -143,7 +143,7 @@ export default class BugReportDialog extends React.Component { private onDownload = async (): Promise => { this.setState({ downloadBusy: true }); - this.downloadProgressCallback(_t("Preparing to download logs")); + this.downloadProgressCallback(_t("bug_reporting|preparing_download")); try { await downloadBugReport({ @@ -160,7 +160,8 @@ export default class BugReportDialog extends React.Component { if (!this.unmounted) { this.setState({ downloadBusy: false, - downloadProgress: _t("Failed to send logs: ") + `${err instanceof Error ? err.message : ""}`, + downloadProgress: + _t("bug_reporting|failed_send_logs") + `${err instanceof Error ? err.message : ""}`, }); } } @@ -208,7 +209,7 @@ export default class BugReportDialog extends React.Component { if (window.Modernizr && Object.values(window.Modernizr).some((support) => support === false)) { warning = (

- {_t("Reminder: Your browser is unsupported, so your experience may be unpredictable.")} + {_t("bug_reporting|unsupported_browser")}

); } @@ -261,7 +262,7 @@ export default class BugReportDialog extends React.Component { = (props) => { return ( -

{_t("Try scrolling up in the timeline to see if there are any earlier ones.")}

+

{_t("user_info|redact|no_recent_messages_description")}

} /> @@ -108,32 +108,21 @@ const BulkRedactDialog: React.FC = (props) => {
-

- {_t( - "You are about to remove %(count)s messages by %(user)s. This will remove them permanently for everyone in the conversation. Do you wish to continue?", - { count, user }, - )} -

-

- {_t( - "For a large amount of messages, this might take some time. Please don't refresh your client in the meantime.", - )} -

+

{_t("user_info|redact|confirm_description_1", { count, user })}

+

{_t("user_info|redact|confirm_description_2")}

setKeepStateEvents(e.target.checked)}> - {_t("Preserve system messages")} + {_t("user_info|redact|confirm_keep_state_label")}
- {_t( - "Uncheck if you also want to remove system messages on this user (e.g. membership change, profile change…)", - )} + {_t("user_info|redact|confirm_keep_state_explainer")}
{ diff --git a/src/components/views/dialogs/CantStartVoiceMessageBroadcastDialog.tsx b/src/components/views/dialogs/CantStartVoiceMessageBroadcastDialog.tsx index 9a76edd26c..36737a3786 100644 --- a/src/components/views/dialogs/CantStartVoiceMessageBroadcastDialog.tsx +++ b/src/components/views/dialogs/CantStartVoiceMessageBroadcastDialog.tsx @@ -22,14 +22,8 @@ import InfoDialog from "./InfoDialog"; export const createCantStartVoiceMessageBroadcastDialog = (): void => { Modal.createDialog(InfoDialog, { - title: _t("Can't start voice message"), - description: ( -

- {_t( - "You can't start a voice message as you are currently recording a live broadcast. Please end your live broadcast in order to start recording a voice message.", - )} -

- ), + title: _t("voice_message|cant_start_broadcast_title"), + description:

{_t("voice_message|cant_start_broadcast_description")}

, hasCloseButton: true, }); }; diff --git a/src/components/views/dialogs/ChangelogDialog.tsx b/src/components/views/dialogs/ChangelogDialog.tsx index 2651e655a4..ca110aa16f 100644 --- a/src/components/views/dialogs/ChangelogDialog.tsx +++ b/src/components/views/dialogs/ChangelogDialog.tsx @@ -93,7 +93,7 @@ export default class ChangelogDialog extends React.Component { if (this.state[repo] == null) { content = ; } else if (typeof this.state[repo] === "string") { - content = _t("Unable to load commit detail: %(msg)s", { + content = _t("update|error_unable_load_commit", { msg: this.state[repo], }); } else { @@ -111,13 +111,17 @@ export default class ChangelogDialog extends React.Component { const content = (
- {this.props.version == null || this.props.newVersion == null ?

{_t("Unavailable")}

: logs} + {this.props.version == null || this.props.newVersion == null ? ( +

{_t("update|unavailable")}

+ ) : ( + logs + )}
); return ( ); } else { return ( - + ); diff --git a/src/components/views/dialogs/ConfirmRedactDialog.tsx b/src/components/views/dialogs/ConfirmRedactDialog.tsx index 6df3059411..fe50d750ad 100644 --- a/src/components/views/dialogs/ConfirmRedactDialog.tsx +++ b/src/components/views/dialogs/ConfirmRedactDialog.tsx @@ -36,17 +36,17 @@ interface IProps { */ export default class ConfirmRedactDialog extends React.Component { public render(): React.ReactNode { - let description = _t("Are you sure you wish to remove (delete) this event?"); + let description = _t("redact|confirm_description"); if (this.props.event.isState()) { - description += " " + _t("Note that removing room changes like this could undo the change."); + description += " " + _t("redact|confirm_description_state"); } return ( @@ -105,7 +105,7 @@ export function createRedactEventDialog({ // display error message stating you couldn't delete this. Modal.createDialog(ErrorDialog, { title: _t("common|error"), - description: _t("You cannot delete this message. (%(code)s)", { code }), + description: _t("redact|error", { code }), }); } } diff --git a/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx b/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx index e2743c37b0..d095fd1925 100644 --- a/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx +++ b/src/components/views/dialogs/ConfirmWipeDeviceDialog.tsx @@ -39,17 +39,13 @@ export default class ConfirmWipeDeviceDialog extends React.Component { className="mx_ConfirmWipeDeviceDialog" hasCancel={true} onFinished={this.props.onFinished} - title={_t("Clear all data in this session?")} + title={_t("auth|soft_logout|clear_data_title")} >
-

- {_t( - "Clearing all data from this session is permanent. Encrypted messages will be lost unless their keys have been backed up.", - )} -

+

{_t("auth|soft_logout|clear_data_description")}

= ({ space, onAddExistingSpaceClick joinRuleMicrocopy = (

{_t( - "Anyone in will be able to find and join.", + "create_space|subspace_join_rule_restricted_description", {}, { SpaceName: () => {parentSpace.name}, @@ -112,7 +112,7 @@ const CreateSubspaceDialog: React.FC = ({ space, onAddExistingSpaceClick joinRuleMicrocopy = (

{_t( - "Anyone will be able to find and join this space, not just members of .", + "create_space|subspace_join_rule_public_description", {}, { SpaceName: () => {parentSpace.name}, @@ -121,14 +121,14 @@ const CreateSubspaceDialog: React.FC = ({ space, onAddExistingSpaceClick

); } else if (joinRule === JoinRule.Invite) { - joinRuleMicrocopy =

{_t("Only people invited will be able to find and join this space.")}

; + joinRuleMicrocopy =

{_t("create_space|subspace_join_rule_invite_description")}

; } return ( = ({ space, onAddExistingSpaceClick
- {_t("Add a space to a space you manage.")} + {_t("create_space|subspace_beta_notice")}
= ({ space, onAddExistingSpaceClick aliasFieldRef={spaceAliasField} > = ({ space, onAddExistingSpaceClick
-
{_t("Want to add an existing space instead?")}
+
{_t("create_space|subspace_existing_space_prompt")}
{ @@ -183,7 +183,7 @@ const CreateSubspaceDialog: React.FC = ({ space, onAddExistingSpaceClick onFinished(); }} > - {_t("Add existing space")} + {_t("space|add_existing_subspace|space_dropdown_title")}
@@ -191,7 +191,7 @@ const CreateSubspaceDialog: React.FC = ({ space, onAddExistingSpaceClick {_t("action|cancel")} - {busy ? _t("Adding…") : _t("action|add")} + {busy ? _t("create_space|subspace_adding") : _t("action|add")}
diff --git a/src/components/views/dialogs/CryptoStoreTooNewDialog.tsx b/src/components/views/dialogs/CryptoStoreTooNewDialog.tsx index 07754d1567..9539bcb49c 100644 --- a/src/components/views/dialogs/CryptoStoreTooNewDialog.tsx +++ b/src/components/views/dialogs/CryptoStoreTooNewDialog.tsx @@ -35,10 +35,7 @@ const CryptoStoreTooNewDialog: React.FC = (props: IProps) => { const _onLogoutClicked = (): void => { Modal.createDialog(QuestionDialog, { title: _t("action|sign_out"), - description: _t( - "To avoid losing your chat history, you must export your room keys before logging out. You will need to go back to the newer version of %(brand)s to do this", - { brand }, - ), + description: _t("encryption|incompatible_database_sign_out_description", { brand }), button: _t("action|sign_out"), focus: false, onFinished: (doLogout) => { @@ -50,16 +47,13 @@ const CryptoStoreTooNewDialog: React.FC = (props: IProps) => { }); }; - const description = _t( - "You've previously used a newer version of %(brand)s with this session. To use this version again with end to end encryption, you will need to sign out and back in again.", - { brand }, - ); + const description = _t("encryption|incompatible_database_description", { brand }); return ( @@ -67,7 +61,7 @@ const CryptoStoreTooNewDialog: React.FC = (props: IProps) => { {description}
props.onFinished(false)} > diff --git a/src/components/views/dialogs/DeactivateAccountDialog.tsx b/src/components/views/dialogs/DeactivateAccountDialog.tsx index 7001253631..4af05a6d1a 100644 --- a/src/components/views/dialogs/DeactivateAccountDialog.tsx +++ b/src/components/views/dialogs/DeactivateAccountDialog.tsx @@ -73,13 +73,13 @@ export default class DeactivateAccountDialog extends React.Component { const dialogAesthetics = { [SSOAuthEntry.PHASE_PREAUTH]: { - body: _t("Confirm your account deactivation by using Single Sign On to prove your identity."), + body: _t("settings|general|deactivate_confirm_body_sso"), continueText: _t("auth|sso"), continueKind: "danger", }, [SSOAuthEntry.PHASE_POSTAUTH]: { - body: _t("Are you sure you want to deactivate your account? This is irreversible."), - continueText: _t("Confirm account deactivation"), + body: _t("settings|general|deactivate_confirm_body"), + continueText: _t("settings|general|deactivate_confirm_continue"), continueKind: "danger", }, }; @@ -90,7 +90,7 @@ export default class DeactivateAccountDialog extends React.Component { @@ -138,7 +138,7 @@ export default class DeactivateAccountDialog extends React.Component { logger.error(e); - this.setState({ errStr: _t("There was a problem communicating with the server. Please try again.") }); + this.setState({ errStr: _t("settings|general|error_deactivate_communication") }); }); }; @@ -170,14 +170,14 @@ export default class DeactivateAccountDialog extends React.Component { if (e && e.httpStatus === 401 && e.data) { // Valid UIA response this.setState({ authData: e.data, authEnabled: true }); } else { - this.setState({ errStr: _t("Server did not return valid authentication information.") }); + this.setState({ errStr: _t("settings|general|error_deactivate_invalid_auth") }); } }); } @@ -218,32 +218,20 @@ export default class DeactivateAccountDialog extends React.Component
-

{_t("Confirm that you would like to deactivate your account. If you proceed:")}

+

{_t("settings|general|deactivate_confirm_content")}

    -
  • {_t("You will not be able to reactivate your account")}
  • -
  • {_t("You will no longer be able to log in")}
  • -
  • - {_t( - "No one will be able to reuse your username (MXID), including you: this username will remain unavailable", - )} -
  • -
  • {_t("You will leave all rooms and DMs that you are in")}
  • -
  • - {_t( - "You will be removed from the identity server: your friends will no longer be able to find you with your email or phone number", - )} -
  • +
  • {_t("settings|general|deactivate_confirm_content_1")}
  • +
  • {_t("settings|general|deactivate_confirm_content_2")}
  • +
  • {_t("settings|general|deactivate_confirm_content_3")}
  • +
  • {_t("settings|general|deactivate_confirm_content_4")}
  • +
  • {_t("settings|general|deactivate_confirm_content_5")}
-

- {_t( - "Your old messages will still be visible to people who received them, just like emails you sent in the past. Would you like to hide your sent messages from people who join rooms in the future?", - )} -

+

{_t("settings|general|deactivate_confirm_content_6")}

- {_t("Hide my messages from new joiners")} + {_t("settings|general|deactivate_confirm_erase_label")}

{error} diff --git a/src/components/views/dialogs/EndPollDialog.tsx b/src/components/views/dialogs/EndPollDialog.tsx index d3bfacdabe..cc68e80191 100644 --- a/src/components/views/dialogs/EndPollDialog.tsx +++ b/src/components/views/dialogs/EndPollDialog.tsx @@ -47,9 +47,7 @@ export default class EndPollDialog extends React.Component { const topAnswer = findTopAnswer(this.props.event, responses); const message = - topAnswer === "" - ? _t("The poll has ended. No votes were cast.") - : _t("The poll has ended. Top answer: %(topAnswer)s", { topAnswer }); + topAnswer === "" ? _t("poll|end_message_no_votes") : _t("poll|end_message", { topAnswer }); const endEvent = PollEndEvent.from(this.props.event.getId()!, message).serialize(); @@ -57,8 +55,8 @@ export default class EndPollDialog extends React.Component { } catch (e) { console.error("Failed to submit poll response event:", e); Modal.createDialog(ErrorDialog, { - title: _t("Failed to end poll"), - description: _t("Sorry, the poll did not end. Please try again."), + title: _t("poll|error_ending_title"), + description: _t("poll|error_ending_description"), }); } } @@ -68,11 +66,9 @@ export default class EndPollDialog extends React.Component { public render(): React.ReactNode { return ( this.onFinished(endPoll)} /> ); diff --git a/src/components/views/dialogs/ErrorDialog.tsx b/src/components/views/dialogs/ErrorDialog.tsx index 59bd46d4e4..ed343f9cba 100644 --- a/src/components/views/dialogs/ErrorDialog.tsx +++ b/src/components/views/dialogs/ErrorDialog.tsx @@ -79,7 +79,7 @@ export default class ErrorDialog extends React.Component { contentId="mx_Dialog_content" >
- {this.props.description || _t("An error has occurred.")} + {this.props.description || _t("error|dialog_description_default")}
+
{_t("common|advanced")}

- +

@@ -215,7 +207,7 @@ export default class LogoutDialog extends React.Component { // confirms the action. return ( { diff --git a/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx b/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx index f01ff6d362..0799ff88f1 100644 --- a/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx +++ b/src/components/views/dialogs/ManageRestrictedJoinRuleDialog.tsx @@ -43,10 +43,10 @@ const Entry: React.FC<{ let description; if (localRoom) { - description = _t("%(count)s members", { count: room.getJoinedMemberCount() }); + description = _t("common|n_members", { count: room.getJoinedMemberCount() }); const numChildRooms = SpaceStore.instance.getChildRooms(room.roomId).length; if (numChildRooms > 0) { - description += " · " + _t("%(count)s rooms", { count: numChildRooms }); + description += " · " + _t("common|n_rooms", { count: numChildRooms }); } } @@ -132,7 +132,7 @@ const ManageRestrictedJoinRuleDialog: React.FC = ({ room, selected = [], if (newSelected.size < 1) { inviteOnlyWarning = (
- {_t("You're removing all spaces. Access will default to invite only")} + {_t("room_settings|security|join_rule_restricted_dialog_empty_warning")}
); } @@ -141,14 +141,14 @@ const ManageRestrictedJoinRuleDialog: React.FC = ({ room, selected = [], filteredSpacesContainingRoom.length + filteredOtherJoinedSpaces.length + filteredOtherEntries.length; return (

{_t( - "Decide which spaces can access this room. If a space is selected, its members can find and join .", + "room_settings|security|join_rule_restricted_dialog_description", {}, { RoomName: () => {room.name}, @@ -158,7 +158,7 @@ const ManageRestrictedJoinRuleDialog: React.FC = ({ room, selected = [], @@ -167,8 +167,8 @@ const ManageRestrictedJoinRuleDialog: React.FC = ({ room, selected = [],

{room.isSpaceRoom() - ? _t("Spaces you know that contain this space") - : _t("Spaces you know that contain this room")} + ? _t("room_settings|security|join_rule_restricted_dialog_heading_space") + : _t("room_settings|security|join_rule_restricted_dialog_heading_room")}

{filteredSpacesContainingRoom.map((space) => { return ( @@ -187,9 +187,9 @@ const ManageRestrictedJoinRuleDialog: React.FC = ({ room, selected = [], {filteredOtherEntries.length > 0 ? (
-

{_t("Other spaces or rooms you might not know")}

+

{_t("room_settings|security|join_rule_restricted_dialog_heading_other")}

-
{_t("These are likely ones other room admins are a part of.")}
+
{_t("room_settings|security|join_rule_restricted_dialog_heading_unknown")}
{filteredOtherEntries.map((space) => { return ( @@ -208,7 +208,7 @@ const ManageRestrictedJoinRuleDialog: React.FC = ({ room, selected = [], {filteredOtherJoinedSpaces.length > 0 ? (
-

{_t("Other spaces you know")}

+

{_t("room_settings|security|join_rule_restricted_dialog_heading_known")}

{filteredOtherJoinedSpaces.map((space) => { return (
  • - {device.displayName} + {" "} + {device.displayName}
  • - {" "} + {" "} {device.deviceId}
  • - {" "} + {" "} {key} @@ -82,7 +83,7 @@ export function ManualDeviceKeyVerificationDialog({
-

{_t("If they don't match, the security of your communication may be compromised.")}

+

{_t("encryption|verification|manual_device_verification_footer")}

); diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.tsx b/src/components/views/dialogs/MessageEditHistoryDialog.tsx index d561284272..900765e52e 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.tsx +++ b/src/components/views/dialogs/MessageEditHistoryDialog.tsx @@ -154,11 +154,7 @@ export default class MessageEditHistoryDialog extends React.PureComponent - {_t("Your homeserver doesn't seem to support this feature.")} -

- ); + content =

{_t("error|edit_history_unsupported")}

; } else if (error.errcode) { // some kind of error from the homeserver content =

{_t("error|something_went_wrong")}

; @@ -190,7 +186,7 @@ export default class MessageEditHistoryDialog extends React.PureComponent {content} diff --git a/src/components/views/dialogs/ModalWidgetDialog.tsx b/src/components/views/dialogs/ModalWidgetDialog.tsx index 1e1300b281..3b3d599121 100644 --- a/src/components/views/dialogs/ModalWidgetDialog.tsx +++ b/src/components/views/dialogs/ModalWidgetDialog.tsx @@ -187,7 +187,7 @@ export default class ModalWidgetDialog extends React.PureComponent - {_t("Data on this screen is shared with %(widgetDomain)s", { + {_t("widget|modal_data_warning", { widgetDomain: parsed.hostname, })}
diff --git a/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx b/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx index 22a80ccd33..0a51a18a67 100644 --- a/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx +++ b/src/components/views/dialogs/RegistrationEmailPromptDialog.tsx @@ -50,7 +50,7 @@ const RegistrationEmailPromptDialog: React.FC = ({ onFinished }) => { return ( onFinished(false)} @@ -59,7 +59,7 @@ const RegistrationEmailPromptDialog: React.FC = ({ onFinished }) => {

{_t( - "Just a heads up, if you don't add an email and forget your password, you could permanently lose access to your account.", + "auth|registration|continue_without_email_description", {}, { b: (sub) => {sub}, @@ -70,7 +70,7 @@ const RegistrationEmailPromptDialog: React.FC = ({ onFinished }) => { { const target = ev.target as HTMLInputElement; diff --git a/src/components/views/dialogs/ReportEventDialog.tsx b/src/components/views/dialogs/ReportEventDialog.tsx index 357abfc44f..52859c55f6 100644 --- a/src/components/views/dialogs/ReportEventDialog.tsx +++ b/src/components/views/dialogs/ReportEventDialog.tsx @@ -246,7 +246,7 @@ export default class ReportEventDialog extends React.Component { // as configured in the room's state events. const dmRoomId = await ensureDMExists(client, this.moderation.moderationBotUserId); if (!dmRoomId) { - throw new UserFriendlyError("Unable to create room with moderation bot"); + throw new UserFriendlyError("report_content|error_create_room_moderation_bot"); } await client.sendEvent(dmRoomId, ABUSE_EVENT_TYPE, { @@ -320,37 +320,25 @@ export default class ReportEventDialog extends React.Component { subtitle = _t("report_content|nature_disagreement"); break; case Nature.Toxic: - subtitle = _t( - "This user is displaying toxic behaviour, for instance by insulting other users or sharing adult-only content in a family-friendly room or otherwise violating the rules of this room.\nThis will be reported to the room moderators.", - ); + subtitle = _t("report_content|nature_toxic"); break; case Nature.Illegal: - subtitle = _t( - "This user is displaying illegal behaviour, for instance by doxing people or threatening violence.\nThis will be reported to the room moderators who may escalate this to legal authorities.", - ); + subtitle = _t("report_content|nature_illegal"); break; case Nature.Spam: - subtitle = _t( - "This user is spamming the room with ads, links to ads or to propaganda.\nThis will be reported to the room moderators.", - ); + subtitle = _t("report_content|nature_spam"); break; case NonStandardValue.Admin: if (client.isRoomEncrypted(this.props.mxEvent.getRoomId()!)) { - subtitle = _t( - "This room is dedicated to illegal or toxic content or the moderators fail to moderate illegal or toxic content.\nThis will be reported to the administrators of %(homeserver)s. The administrators will NOT be able to read the encrypted content of this room.", - { homeserver: homeServerName }, - ); + subtitle = _t("report_content|nature_nonstandard_admin_encrypted", { + homeserver: homeServerName, + }); } else { - subtitle = _t( - "This room is dedicated to illegal or toxic content or the moderators fail to moderate illegal or toxic content.\nThis will be reported to the administrators of %(homeserver)s.", - { homeserver: homeServerName }, - ); + subtitle = _t("report_content|nature_nonstandard_admin", { homeserver: homeServerName }); } break; case Nature.Other: - subtitle = _t( - "Any other reason. Please describe the problem.\nThis will be reported to the room moderators.", - ); + subtitle = _t("report_content|nature_other"); break; default: subtitle = _t("report_content|nature"); @@ -411,7 +399,7 @@ export default class ReportEventDialog extends React.Component { checked={this.state.nature == Nature.Other} onChange={this.onNatureChosen} > - {_t("Other")} + {_t("report_content|other_label")}

{subtitle}

{ contentId="mx_ReportEventDialog" >
-

- {_t( - "Reporting this message will send its unique 'event ID' to the administrator of your homeserver. If messages in this room are encrypted, your homeserver administrator will not be able to read the message text or view any files or images.", - )} -

+

{_t("report_content|description")}

{adminMessage} { className="mx_RoomSettingsDialog" hasCancel={true} onFinished={this.props.onFinished} - title={_t("Room Settings - %(roomName)s", { roomName })} + title={_t("room_settings|title", { roomName })} >
{ }) .catch((err) => { Modal.createDialog(ErrorDialog, { - title: _t("Failed to upgrade room"), - description: err && err.message ? err.message : _t("The room upgrade could not be completed"), + title: _t("room_settings|advanced|error_upgrade_title"), + description: + err && err.message ? err.message : _t("room_settings|advanced|error_upgrade_description"), }); }) .finally(() => { @@ -75,7 +76,7 @@ export default class RoomUpgradeDialog extends React.Component { } else { buttons = ( { -

- {_t( - "Upgrading this room requires closing down the current instance of the room and creating a new room in its place. To give room members the best possible experience, we will:", - )} -

+

{_t("room_settings|advanced|upgrade_dialog_description")}

    -
  1. {_t("Create a new room with the same name, description and avatar")}
  2. -
  3. {_t("Update any local room aliases to point to the new room")}
  4. -
  5. - {_t( - "Stop users from speaking in the old version of the room, and post a message advising users to move to the new room", - )} -
  6. -
  7. - {_t( - "Put a link back to the old room at the start of the new room so people can see old messages", - )} -
  8. +
  9. {_t("room_settings|advanced|upgrade_dialog_description_1")}
  10. +
  11. {_t("room_settings|advanced|upgrade_dialog_description_2")}
  12. +
  13. {_t("room_settings|advanced|upgrade_dialog_description_3")}
  14. +
  15. {_t("room_settings|advanced|upgrade_dialog_description_4")}
{buttons}
diff --git a/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx b/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx index cc074f47d2..e5b5fde691 100644 --- a/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx +++ b/src/components/views/dialogs/RoomUpgradeWarningDialog.tsx @@ -115,7 +115,7 @@ export default class RoomUpgradeWarningDialog extends React.Component ); } @@ -123,28 +123,21 @@ export default class RoomUpgradeWarningDialog extends React.Component - {_t( - "This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.", - { brand }, - )} -

- ); + let bugReports =

{_t("room_settings|advanced|upgrade_warning_dialog_report_bug_prompt", { brand })}

; if (SdkConfig.get().bug_report_endpoint_url) { bugReports = (

{_t( - "This usually only affects how the room is processed on the server. If you're having problems with your %(brand)s, please report a bug.", + "room_settings|advanced|upgrade_warning_dialog_report_bug_prompt_link", { brand, }, @@ -190,15 +183,10 @@ export default class RoomUpgradeWarningDialog extends React.Component

-

- {this.props.description || - _t( - "Upgrading a room is an advanced action and is usually recommended when a room is unstable due to bugs, missing features or security vulnerabilities.", - )} -

+

{this.props.description || _t("room_settings|advanced|upgrade_warning_dialog_description")}

{_t( - "Please note upgrading will make a new version of the room. All current messages will stay in this archived room.", + "room_settings|advanced|upgrade_warning_dialog_explainer", {}, { b: (sub) => {sub}, @@ -208,7 +196,7 @@ export default class RoomUpgradeWarningDialog extends React.Component {_t( - "You'll upgrade this room from to .", + "room_settings|advanced|upgrade_warning_dialog_footer", {}, { oldVersion: () => {this.currentVersion}, diff --git a/src/components/views/dialogs/ScrollableBaseModal.tsx b/src/components/views/dialogs/ScrollableBaseModal.tsx index 21da033da4..8fa9fa3f64 100644 --- a/src/components/views/dialogs/ScrollableBaseModal.tsx +++ b/src/components/views/dialogs/ScrollableBaseModal.tsx @@ -97,7 +97,7 @@ export default abstract class ScrollableBaseModal<

diff --git a/src/components/views/dialogs/ServerOfflineDialog.tsx b/src/components/views/dialogs/ServerOfflineDialog.tsx index 9c5da6a9d4..458b57ddd6 100644 --- a/src/components/views/dialogs/ServerOfflineDialog.tsx +++ b/src/components/views/dialogs/ServerOfflineDialog.tsx @@ -92,36 +92,32 @@ export default class ServerOfflineDialog extends React.PureComponent { public render(): React.ReactNode { let timeline = this.renderTimeline().filter((c) => !!c); // remove nulls for next check if (timeline.length === 0) { - timeline = [
{_t("You're all caught up.")}
]; + timeline = [
{_t("server_offline|empty_timeline")}
]; } const serverName = MatrixClientPeg.getHomeserverName(); return (
-

- {_t( - "Your server isn't responding to some of your requests. Below are some of the most likely reasons.", - )} -

+

{_t("server_offline|description")}

    -
  • {_t("The server (%(serverName)s) took too long to respond.", { serverName })}
  • -
  • {_t("Your firewall or anti-virus is blocking the request.")}
  • -
  • {_t("A browser extension is preventing the request.")}
  • -
  • {_t("The server is offline.")}
  • -
  • {_t("The server has denied your request.")}
  • -
  • {_t("Your area is experiencing difficulties connecting to the internet.")}
  • -
  • {_t("A connection error occurred while trying to contact the server.")}
  • -
  • {_t("The server is not configured to indicate what the problem is (CORS).")}
  • +
  • {_t("server_offline|description_1", { serverName })}
  • +
  • {_t("server_offline|description_2")}
  • +
  • {_t("server_offline|description_3")}
  • +
  • {_t("server_offline|description_4")}
  • +
  • {_t("server_offline|description_5")}
  • +
  • {_t("server_offline|description_6")}
  • +
  • {_t("server_offline|description_7")}
  • +
  • {_t("server_offline|description_8")}

-

{_t("Recent changes that have not yet been received")}

+

{_t("server_offline|recent_changes_heading")}

{timeline}
diff --git a/src/components/views/dialogs/SeshatResetDialog.tsx b/src/components/views/dialogs/SeshatResetDialog.tsx index 32e61c4b35..1dec25246c 100644 --- a/src/components/views/dialogs/SeshatResetDialog.tsx +++ b/src/components/views/dialogs/SeshatResetDialog.tsx @@ -30,19 +30,17 @@ export default class SeshatResetDialog extends React.PureComponent {

- {_t("You most likely do not want to reset your event index store")} + {_t("seshat|reset_description")}
- {_t( - "If you do, please note that none of your messages will be deleted, but the search experience might be degraded for a few moments whilst the index is recreated", - )} + {_t("seshat|reset_explainer")}

{ private onClearStorageClick = (): void => { Modal.createDialog(QuestionDialog, { title: _t("action|sign_out"), - description:
{_t("Sign out and remove encryption keys?")}
, + description:
{_t("error|session_restore|clear_storage_description")}
, button: _t("action|sign_out"), danger: true, onFinished: this.props.onFinished, @@ -59,7 +59,7 @@ export default class SessionRestoreErrorDialog extends React.Component { const clearStorageButton = ( ); @@ -92,25 +92,16 @@ export default class SessionRestoreErrorDialog extends React.Component {
-

{_t("We encountered an error trying to restore your previous session.")}

+

{_t("error|session_restore|description_1")}

-

- {_t( - "If you have previously used a more recent version of %(brand)s, your session may be incompatible with this version. Close this window and return to the more recent version.", - { brand }, - )} -

+

{_t("error|session_restore|description_2", { brand })}

-

- {_t( - "Clearing your browser's storage may fix the problem, but will sign you out and cause any encrypted chat history to become unreadable.", - )} -

+

{_t("error|session_restore|description_3")}

{dialogButtons}
diff --git a/src/components/views/dialogs/SetEmailDialog.tsx b/src/components/views/dialogs/SetEmailDialog.tsx index 2470f6d333..eb491e1eba 100644 --- a/src/components/views/dialogs/SetEmailDialog.tsx +++ b/src/components/views/dialogs/SetEmailDialog.tsx @@ -76,10 +76,8 @@ export default class SetEmailDialog extends React.Component { this.addThreepid.addEmailAddress(emailAddress).then( () => { Modal.createDialog(QuestionDialog, { - title: _t("Verification Pending"), - description: _t( - "Please check your email and click on the link it contains. Once this is done, click continue.", - ), + title: _t("auth|set_email|verification_pending_title"), + description: _t("auth|set_email|verification_pending_description"), button: _t("action|continue"), onFinished: this.onEmailDialogFinished, }); @@ -125,11 +123,9 @@ export default class SetEmailDialog extends React.Component { const message = _t("settings|general|error_email_verification") + " " + - _t( - "Please check your email and click on the link it contains. Once this is done, click continue.", - ); + _t("auth|set_email|verification_pending_description"); Modal.createDialog(QuestionDialog, { - title: _t("Verification Pending"), + title: _t("auth|set_email|verification_pending_title"), description: message, button: _t("action|continue"), onFinished: this.onEmailDialogFinished, @@ -152,7 +148,7 @@ export default class SetEmailDialog extends React.Component { { contentId="mx_Dialog_content" >
-

- {_t("This will allow you to reset your password and receive notifications.")} -

+

{_t("auth|set_email|description")}

{emailInput}
diff --git a/src/components/views/dialogs/ShareDialog.tsx b/src/components/views/dialogs/ShareDialog.tsx index 57b243359f..aba35e70e2 100644 --- a/src/components/views/dialogs/ShareDialog.tsx +++ b/src/components/views/dialogs/ShareDialog.tsx @@ -130,7 +130,7 @@ export default class ShareDialog extends React.PureComponent 0) { @@ -140,22 +140,22 @@ export default class ShareDialog extends React.PureComponent - {_t("Link to most recent message")} + {_t("share|permalink_most_recent")}
); } } else if (this.props.target instanceof User || this.props.target instanceof RoomMember) { - title = _t("Share User"); + title = _t("share|title_user"); } else if (this.props.target instanceof MatrixEvent) { - title = _t("Share Room Message"); + title = _t("share|title_message"); checkbox = (
- {_t("Link to selected message")} + {_t("share|permalink_message")}
); @@ -208,7 +208,7 @@ export default class ShareDialog extends React.PureComponent
matrixToUrl}> - + {matrixToUrl} diff --git a/src/components/views/dialogs/SlashCommandHelpDialog.tsx b/src/components/views/dialogs/SlashCommandHelpDialog.tsx index e59c3178a5..3f8e4d9fa5 100644 --- a/src/components/views/dialogs/SlashCommandHelpDialog.tsx +++ b/src/components/views/dialogs/SlashCommandHelpDialog.tsx @@ -64,7 +64,7 @@ const SlashCommandHelpDialog: React.FC = ({ onFinished }) => { return ( {body} diff --git a/src/components/views/dialogs/SlidingSyncOptionsDialog.tsx b/src/components/views/dialogs/SlidingSyncOptionsDialog.tsx index 7a86e5ce53..5419f749e6 100644 --- a/src/components/views/dialogs/SlidingSyncOptionsDialog.tsx +++ b/src/components/views/dialogs/SlidingSyncOptionsDialog.tsx @@ -77,7 +77,7 @@ export const SlidingSyncOptionsDialog: React.FC<{ onFinished(enabled: boolean): let nativeSupport: string; if (hasNativeSupport === null) { - nativeSupport = _t("Checking…"); + nativeSupport = _t("labs|sliding_sync_checking"); } else { nativeSupport = hasNativeSupport ? _t("labs|sliding_sync_server_support") @@ -103,7 +103,7 @@ export const SlidingSyncOptionsDialog: React.FC<{ onFinished(enabled: boolean): key: "working", final: true, test: async (_, { error }) => !error, - valid: () => _t("Looks good"), + valid: () => _t("spotlight|public_rooms|network_dropdown_available_valid"), invalid: ({ error }) => (error instanceof Error ? error.message : null), }, ], diff --git a/src/components/views/dialogs/SpacePreferencesDialog.tsx b/src/components/views/dialogs/SpacePreferencesDialog.tsx index fec82bf931..8e8e4ce398 100644 --- a/src/components/views/dialogs/SpacePreferencesDialog.tsx +++ b/src/components/views/dialogs/SpacePreferencesDialog.tsx @@ -42,7 +42,7 @@ const SpacePreferencesAppearanceTab: React.FC> = ({ space return ( - + > = ({ space {_t("common|people")} - {_t( - "This groups your chats with members of this space. Turning this off will hide those chats from your view of %(spaceName)s.", - { - spaceName: space.name, - }, - )} + {_t("space|preferences|show_people_in_space", { + spaceName: space.name, + })} diff --git a/src/components/views/dialogs/StorageEvictedDialog.tsx b/src/components/views/dialogs/StorageEvictedDialog.tsx index 59a9b668bb..d3bd341603 100644 --- a/src/components/views/dialogs/StorageEvictedDialog.tsx +++ b/src/components/views/dialogs/StorageEvictedDialog.tsx @@ -42,7 +42,7 @@ export default class StorageEvictedDialog extends React.Component { let logRequest; if (SdkConfig.get().bug_report_endpoint_url) { logRequest = _t( - "To help us prevent this in future, please send us logs.", + "bug_reporting|log_request", {}, { a: (text) => ( @@ -58,18 +58,14 @@ export default class StorageEvictedDialog extends React.Component {
+

{_t("error|storage_evicted_description_1")}

- {_t( - "Some session data, including encrypted message keys, is missing. Sign out and sign in to fix this, restoring keys from backup.", - )} -

-

- {_t("Your browser likely removed this data when running low on disk space.")} {logRequest} + {_t("error|storage_evicted_description_2")} {logRequest}

- {_t("Find others by phone or email")} + {_t("terms|summary_identity_server_1")}
- {_t("Be found by phone or email")} + {_t("terms|summary_identity_server_2")}
); case SERVICE_TYPES.IM: diff --git a/src/components/views/dialogs/UntrustedDeviceDialog.tsx b/src/components/views/dialogs/UntrustedDeviceDialog.tsx index 8ad0cb10c3..dadb199a1e 100644 --- a/src/components/views/dialogs/UntrustedDeviceDialog.tsx +++ b/src/components/views/dialogs/UntrustedDeviceDialog.tsx @@ -35,14 +35,14 @@ const UntrustedDeviceDialog: React.FC = ({ device, user, onFinished }) = let newSessionText: string; if (MatrixClientPeg.safeGet().getUserId() === user.userId) { - newSessionText = _t("You signed in to a new session without verifying it:"); - askToVerifyText = _t("Verify your other session using one of the options below."); + newSessionText = _t("encryption|udd|own_new_session_text"); + askToVerifyText = _t("encryption|udd|own_ask_verify_text"); } else { - newSessionText = _t("%(name)s (%(userId)s) signed in to a new session without verifying it:", { + newSessionText = _t("encryption|udd|other_new_session_text", { name: user.displayName, userId: user.userId, }); - askToVerifyText = _t("Ask this user to verify their session, or manually verify it below."); + askToVerifyText = _t("encryption|udd|other_ask_verify_text"); } return ( @@ -52,7 +52,7 @@ const UntrustedDeviceDialog: React.FC = ({ device, user, onFinished }) = title={ <> - {_t("Not Trusted")} + {_t("encryption|udd|title")} } > @@ -65,10 +65,10 @@ const UntrustedDeviceDialog: React.FC = ({ device, user, onFinished }) =
onFinished("legacy")}> - {_t("Manually verify by text")} + {_t("encryption|udd|manual_verification_button")} onFinished("sas")}> - {_t("Interactively verify by emoji")} + {_t("encryption|udd|interactive_verification_button")} onFinished(false)}> {_t("action|done")} diff --git a/src/components/views/dialogs/UploadConfirmDialog.tsx b/src/components/views/dialogs/UploadConfirmDialog.tsx index a98752ef32..b82e87c4aa 100644 --- a/src/components/views/dialogs/UploadConfirmDialog.tsx +++ b/src/components/views/dialogs/UploadConfirmDialog.tsx @@ -69,12 +69,12 @@ export default class UploadConfirmDialog extends React.Component { public render(): React.ReactNode { let title: string; if (this.props.totalFiles > 1 && this.props.currentIndex !== undefined) { - title = _t("Upload files (%(current)s of %(total)s)", { + title = _t("upload_file|title_progress", { current: this.props.currentIndex + 1, total: this.props.totalFiles, }); } else { - title = _t("Upload files"); + title = _t("upload_file|title"); } const fileId = `mx-uploadconfirmdialog-${this.props.file.name}`; @@ -99,7 +99,7 @@ export default class UploadConfirmDialog extends React.Component { let uploadAllButton: JSX.Element | undefined; if (this.props.currentIndex + 1 < this.props.totalFiles) { - uploadAllButton = ; + uploadAllButton = ; } return ( diff --git a/src/components/views/dialogs/UploadFailureDialog.tsx b/src/components/views/dialogs/UploadFailureDialog.tsx index 7a677acb62..3b6d2b797a 100644 --- a/src/components/views/dialogs/UploadFailureDialog.tsx +++ b/src/components/views/dialogs/UploadFailureDialog.tsx @@ -49,7 +49,7 @@ export default class UploadFailureDialog extends React.Component { let buttons; if (this.props.totalFiles === 1 && this.props.badFiles.length === 1) { message = _t( - "This file is too large to upload. The file size limit is %(limit)s but this file is %(sizeOfThisFile)s.", + "upload_file|error_file_too_large", { limit: fileSize(this.props.contentMessages.getUploadLimit()!), sizeOfThisFile: fileSize(this.props.badFiles[0].size), @@ -68,7 +68,7 @@ export default class UploadFailureDialog extends React.Component { ); } else if (this.props.totalFiles === this.props.badFiles.length) { message = _t( - "These files are too large to upload. The file size limit is %(limit)s.", + "upload_file|error_files_too_large", { limit: fileSize(this.props.contentMessages.getUploadLimit()!), }, @@ -86,7 +86,7 @@ export default class UploadFailureDialog extends React.Component { ); } else { message = _t( - "Some files are too large to be uploaded. The file size limit is %(limit)s.", + "upload_file|error_some_files_too_large", { limit: fileSize(this.props.contentMessages.getUploadLimit()!), }, @@ -97,10 +97,10 @@ export default class UploadFailureDialog extends React.Component { const howManyOthers = this.props.totalFiles - this.props.badFiles.length; buttons = ( @@ -111,7 +111,7 @@ export default class UploadFailureDialog extends React.Component {
diff --git a/src/components/views/dialogs/VerificationRequestDialog.tsx b/src/components/views/dialogs/VerificationRequestDialog.tsx index e98ce97280..c6a86ae3e1 100644 --- a/src/components/views/dialogs/VerificationRequestDialog.tsx +++ b/src/components/views/dialogs/VerificationRequestDialog.tsx @@ -49,7 +49,9 @@ export default class VerificationRequestDialog extends React.Component
-
{_t("This widget would like to:")}
+
{_t("widget|capabilities_dialog|content_starting_text")}
{checkboxRows} } /> diff --git a/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx b/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx index de1ec0a587..490ca5260f 100644 --- a/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx +++ b/src/components/views/dialogs/WidgetOpenIDPermissionsDialog.tsx @@ -79,10 +79,10 @@ export default class WidgetOpenIDPermissionsDialog extends React.PureComponent
-

{_t("The widget will verify your user ID, but won't be able to perform actions for you:")}

+

{_t("widget|open_id_permissions_dialog|starting_text")}

{/* cheap trim to just get the path */} {this.props.widget.templateUrl.split("?")[0].split("#")[0]} @@ -97,7 +97,7 @@ export default class WidgetOpenIDPermissionsDialog extends React.PureComponent } /> diff --git a/src/components/views/dialogs/devtools/Event.tsx b/src/components/views/dialogs/devtools/Event.tsx index 6a7749e5d8..d740b95b35 100644 --- a/src/components/views/dialogs/devtools/Event.tsx +++ b/src/components/views/dialogs/devtools/Event.tsx @@ -117,7 +117,7 @@ export const EventEditor: React.FC = ({ fieldDefs, defaultCon }; return ( - +

{fields}
= ({ children, query, onChange }) => { return ( ); }; @@ -67,7 +67,7 @@ const FilteredList: React.FC = ({ children, query, onChange }) => { return ( <> = ({ children, query, onChange }) => { /> {filteredChildren.length < 1 ? ( - _t("No results found") + _t("common|no_results_found") ) : ( = ({ onBack, onView, onEdit }) return ( = { - [Phase.Unsent]: _td("Unsent"), + [Phase.Unsent]: _td("common|unsent"), [Phase.Requested]: _td("devtools|phase_requested"), [Phase.Ready]: _td("devtools|phase_ready"), [Phase.Done]: _td("action|done"), diff --git a/src/components/views/dialogs/oidc/OidcLogoutDialog.tsx b/src/components/views/dialogs/oidc/OidcLogoutDialog.tsx index b15051ba52..47376c5c68 100644 --- a/src/components/views/dialogs/oidc/OidcLogoutDialog.tsx +++ b/src/components/views/dialogs/oidc/OidcLogoutDialog.tsx @@ -45,7 +45,7 @@ export const OidcLogoutDialog: React.FC = ({ return (
- {_t("You will be redirected to your server's authentication provider to complete sign out.")} + {_t("auth|oidc|logout_redirect_warning")}
{hasOpenedLogoutLink ? ( diff --git a/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx b/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx index f947a0d02b..3d114abc30 100644 --- a/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx +++ b/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx @@ -263,15 +263,15 @@ export default class AccessSecretStorageDialog extends React.PureComponent - {_t("Forgotten or lost all recovery methods? Reset all", undefined, { + {_t("encryption|reset_all_button", undefined, { a: (sub) => ( -

{_t("Only do this if you have no other device to complete verification with.")}

-

- {_t( - "If you reset everything, you will restart with no trusted sessions, no trusted users, and might not be able to see past messages.", - )} -

+

{_t("encryption|access_secret_storage_dialog|reset_warning_1")}

+

{_t("encryption|access_secret_storage_dialog|reset_warning_2")}

); } else if (hasPassphrase && !this.state.forceRecoveryKey) { - title = _t("Security Phrase"); + title = _t("encryption|access_secret_storage_dialog|security_phrase_title"); titleClass = ["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_securePhraseTitle"]; let keyStatus; @@ -327,9 +323,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent {"\uD83D\uDC4E "} - {_t( - "Unable to access secret storage. Please verify that you entered the correct Security Phrase.", - )} + {_t("encryption|access_secret_storage_dialog|security_phrase_incorrect_error")}
); } else { @@ -340,7 +334,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent

{_t( - "Enter your Security Phrase or to continue.", + "encryption|access_secret_storage_dialog|enter_phrase_or_key_prompt", {}, { button: (s) => ( @@ -358,7 +352,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent ); } else { - title = _t("Security Key"); + title = _t("encryption|access_secret_storage_dialog|security_key_title"); titleClass = ["mx_AccessSecretStorageDialog_titleWithIcon mx_AccessSecretStorageDialog_secureBackupTitle"]; const feedbackClasses = classNames({ @@ -390,7 +384,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent -

{_t("Use your Security Key to continue.")}

+

{_t("encryption|access_secret_storage_dialog|use_security_key_prompt")}

- {_t("%(securityKey)s or %(recoveryFile)s", { + {_t("encryption|access_secret_storage_dialog|separator", { recoveryFile: "", securityKey: "", })} diff --git a/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx b/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx index 027dd7705d..568b1755a3 100644 --- a/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx +++ b/src/components/views/dialogs/security/ConfirmDestroyCrossSigningDialog.tsx @@ -39,17 +39,13 @@ export default class ConfirmDestroyCrossSigningDialog extends React.Component
-

- {_t( - "Deleting cross-signing keys is permanent. Anyone you have verified with will see security alerts. You almost certainly don't want to do this, unless you've lost every device you can cross-sign from.", - )} -

+

{_t("encryption|destroy_cross_signing_dialog|warning")}

-

{_t("Unable to set up keys")}

+

{_t("encryption|unable_to_setup_keys_error")}

@@ -339,49 +339,41 @@ export default class RestoreKeyBackupDialog extends React.PureComponent -

- {_t( - "Backup could not be decrypted with this Security Key: please verify that you entered the correct Security Key.", - )} -

+

{_t("restore_key_backup_dialog|recovery_key_mismatch_description")}

); } else { - title = _t("Incorrect Security Phrase"); + title = _t("restore_key_backup_dialog|incorrect_security_phrase_title"); content = (
-

- {_t( - "Backup could not be decrypted with this Security Phrase: please verify that you entered the correct Security Phrase.", - )} -

+

{_t("restore_key_backup_dialog|incorrect_security_phrase_dialog")}

); } } else { title = _t("common|error"); - content = _t("Unable to restore backup"); + content = _t("restore_key_backup_dialog|restore_failed_error"); } } else if (this.state.backupInfo === null) { title = _t("common|error"); - content = _t("No backup found!"); + content = _t("restore_key_backup_dialog|no_backup_error"); } else if (this.state.recoverInfo) { - title = _t("Keys restored"); + title = _t("restore_key_backup_dialog|keys_restored_title"); let failedToDecrypt; if (this.state.recoverInfo.total > this.state.recoverInfo.imported) { failedToDecrypt = (

- {_t("Failed to decrypt %(failedCount)s sessions!", { + {_t("restore_key_backup_dialog|count_of_decryption_failures", { failedCount: this.state.recoverInfo.total - this.state.recoverInfo.imported, })}

@@ -390,7 +382,7 @@ export default class RestoreKeyBackupDialog extends React.PureComponent

- {_t("Successfully restored %(sessionCount)s keys", { + {_t("restore_key_backup_dialog|count_of_successfully_restored_keys", { sessionCount: this.state.recoverInfo.imported, })}

@@ -404,21 +396,11 @@ export default class RestoreKeyBackupDialog extends React.PureComponent ); } else if (backupHasPassphrase && !this.state.forceRecoveryKey) { - title = _t("Enter Security Phrase"); + title = _t("restore_key_backup_dialog|enter_phrase_title"); content = (
-

- {_t( - "Warning: you should only set up key backup from a trusted computer.", - {}, - { b: (sub) => {sub} }, - )} -

-

- {_t( - "Access your secure message history and set up secure messaging by entering your Security Phrase.", - )} -

+

{_t("restore_key_backup_dialog|key_backup_warning", {}, { b: (sub) => {sub} })}

+

{_t("restore_key_backup_dialog|enter_phrase_description")}

{_t( - "If you've forgotten your Security Phrase you can use your Security Key or set up new recovery options", + "restore_key_backup_dialog|phrase_forgotten_text", {}, { button1: (s) => ( @@ -456,7 +438,7 @@ export default class RestoreKeyBackupDialog extends React.PureComponent ); } else { - title = _t("Enter Security Key"); + title = _t("restore_key_backup_dialog|enter_key_title"); let keyStatus; if (this.state.recoveryKey.length === 0) { @@ -465,32 +447,22 @@ export default class RestoreKeyBackupDialog extends React.PureComponent {"\uD83D\uDC4D "} - {_t("This looks like a valid Security Key!")} + {_t("restore_key_backup_dialog|key_is_valid")}
); } else { keyStatus = (
{"\uD83D\uDC4E "} - {_t("Not a valid Security Key")} + {_t("restore_key_backup_dialog|key_is_invalid")}
); } content = (
-

- {_t( - "Warning: you should only set up key backup from a trusted computer.", - {}, - { b: (sub) => {sub} }, - )} -

-

- {_t( - "Access your secure message history and set up secure messaging by entering your Security Key.", - )} -

+

{_t("restore_key_backup_dialog|key_backup_warning", {}, { b: (sub) => {sub} })}

+

{_t("restore_key_backup_dialog|enter_key_description")}

{_t( - "If you've forgotten your Security Key you can ", + "restore_key_backup_dialog|key_forgotten_text", {}, { button: (s) => ( diff --git a/src/components/views/dialogs/spotlight/PublicRoomResultDetails.tsx b/src/components/views/dialogs/spotlight/PublicRoomResultDetails.tsx index 82cd7d8a44..66ec82d4a6 100644 --- a/src/components/views/dialogs/spotlight/PublicRoomResultDetails.tsx +++ b/src/components/views/dialogs/spotlight/PublicRoomResultDetails.tsx @@ -60,7 +60,7 @@ export function PublicRoomResultDetails({ room, labelId, descriptionId, detailsI
- {_t("%(count)s Members", { + {_t("spotlight_dialog|count_of_members", { count: room.num_joined_members, })} diff --git a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx index 393ca19e27..4771cd29d9 100644 --- a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx +++ b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx @@ -123,9 +123,9 @@ function filterToLabel(filter: Filter): string { case Filter.People: return _t("common|people"); case Filter.PublicRooms: - return _t("Public rooms"); + return _t("spotlight_dialog|public_rooms_label"); case Filter.PublicSpaces: - return _t("Public spaces"); + return _t("spotlight_dialog|public_spaces_label"); } } @@ -571,7 +571,9 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n aria-labelledby="mx_SpotlightDialog_section_otherSearches" >

- {trimmedQuery ? _t('Use "%(query)s" to search', { query }) : _t("Search for")} + {trimmedQuery + ? _t("spotlight_dialog|heading_with_query", { query }) + : _t("spotlight_dialog|heading_without_query")}

{filter !== Filter.PublicSpaces && supportsSpaceFiltering && ( @@ -760,7 +762,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n role="group" aria-labelledby="mx_SpotlightDialog_section_people" > -

{_t("Recent Conversations")}

+

{_t("invite|recents_section")}

{results[Section.People].slice(0, SECTION_LIMIT).map(resultMapper)}
); @@ -802,7 +804,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n role="group" aria-labelledby="mx_SpotlightDialog_section_spaces" > -

{_t("Spaces you're in")}

+

{_t("spotlight_dialog|spaces_title")}

{results[Section.Spaces].slice(0, SECTION_LIMIT).map(resultMapper)}
); @@ -815,8 +817,8 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n content = (
{filter === Filter.PublicRooms - ? _t("Failed to query public rooms") - : _t("Failed to query public spaces")} + ? _t("spotlight_dialog|failed_querying_public_rooms") + : _t("spotlight_dialog|failed_querying_public_spaces")}
); } else { @@ -849,7 +851,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n aria-labelledby="mx_SpotlightDialog_section_spaceRooms" >

- {_t("Other rooms in %(spaceName)s", { spaceName: activeSpace.name })} + {_t("spotlight_dialog|other_rooms_in_space", { spaceName: activeSpace.name })}

{spaceResults.slice(0, SECTION_LIMIT).map( @@ -909,7 +911,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n onFinished(); }} > - {_t("Join %(roomAddress)s", { + {_t("spotlight_dialog|join_button_text", { roomAddress: trimmedQuery, })} @@ -922,9 +924,9 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n if (filter === Filter.People) { hiddenResultsSection = (
-

{_t("Some results may be hidden for privacy")}

+

{_t("spotlight_dialog|result_may_be_hidden_privacy_warning")}

- {_t("If you can't see who you're looking for, send them your invite link.")} + {_t("spotlight_dialog|cant_find_person_helpful_hint")}
= ({ initialText = "", initialFilter = n title={inviteLinkCopied ? _t("common|copied") : _t("action|copy")} > - {_t("Copy invite link")} + {_t("spotlight_dialog|copy_link_text")}
@@ -945,9 +947,9 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n } else if (trimmedQuery && (filter === Filter.PublicRooms || filter === Filter.PublicSpaces)) { hiddenResultsSection = (
-

{_t("Some results may be hidden")}

+

{_t("spotlight_dialog|result_may_be_hidden_warning")}

- {_t("If you can't find the room you're looking for, ask for an invite or create a new room.")} + {_t("spotlight_dialog|cant_find_room_helpful_hint")}
@@ -976,13 +978,13 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n role="group" aria-labelledby="mx_SpotlightDialog_section_groupChat" > -

{_t("Other options")}

+

{_t("spotlight_dialog|group_chat_section_title")}

); @@ -996,10 +998,12 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n role="group" aria-labelledby="mx_SpotlightDialog_section_messageSearch" > -

{_t("Other searches")}

+

+ {_t("spotlight_dialog|message_search_section_title")} +

{_t( - "To search messages, look for this icon at the top of a room ", + "spotlight_dialog|search_messages_hint", {}, { icon: () =>
}, )} @@ -1036,7 +1040,9 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n aria-labelledby="mx_SpotlightDialog_section_recentSearches" >

- {_t("Recent searches")} + + {_t("spotlight_dialog|recent_searches_section_title")} + {_t("action|clear")} @@ -1086,7 +1092,9 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n role="group" aria-labelledby="mx_SpotlightDialog_section_recentlyViewed" > -

{_t("Recently viewed")}

+

+ {_t("spotlight_dialog|recently_viewed_section_title")} +

{BreadcrumbsStore.instance.rooms .filter((r) => r.roomId !== SdkContextClass.instance.roomViewStore.getRoomId()) @@ -1209,7 +1217,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n <>
{_t( - "Use to scroll", + "spotlight_dialog|keyboard_scroll_hint", {}, { arrows: () => ( @@ -1230,7 +1238,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n hasCancel={false} onKeyDown={onDialogKeyDown} screenName="UnifiedSearch" - aria-label={_t("Search Dialog")} + aria-label={_t("spotlight_dialog|search_dialog")} >
{filter !== null && ( @@ -1244,7 +1252,7 @@ const SpotlightDialog: React.FC = ({ initialText = "", initialFilter = n {filterToLabel(filter)} ({ { key: "required", test: async ({ value }) => !!value, - invalid: () => _t("Enter a server name"), + invalid: () => _t("spotlight|public_rooms|network_dropdown_required_invalid"), }, { key: "available", final: true, test: async (_, { error }) => !error, - valid: () => _t("Looks good"), + valid: () => _t("spotlight|public_rooms|network_dropdown_available_valid"), invalid: ({ error }) => error instanceof MatrixError && error.errcode === "M_FORBIDDEN" - ? _t("You are not allowed to view this server's rooms list") - : _t("Can't find this server or its room list"), + ? _t("spotlight|public_rooms|network_dropdown_available_invalid_forbidden") + : _t("spotlight|public_rooms|network_dropdown_available_invalid"), }, ], memoize: true, @@ -151,7 +151,8 @@ export const NetworkDropdown: React.FC = ({ protocols, config, setConfig const options: GenericDropdownMenuItem[] = allServers.map((roomServer) => ({ key: { roomServer, instanceId: undefined }, label: roomServer, - description: roomServer === homeServer ? _t("Your server") : null, + description: + roomServer === homeServer ? _t("spotlight|public_rooms|network_dropdown_your_server_description") : null, options: [ { key: { roomServer, instanceId: undefined }, @@ -171,7 +172,7 @@ export const NetworkDropdown: React.FC = ({ protocols, config, setConfig adornment: ( setUserDefinedServers(without(userDefinedServers, roomServer))} /> ), @@ -191,11 +192,11 @@ export const NetworkDropdown: React.FC = ({ protocols, config, setConfig const { finished } = Modal.createDialog( TextInputDialog, { - title: _t("Add a new server"), - description: _t("Enter the name of a new server you want to explore."), + title: _t("spotlight|public_rooms|network_dropdown_add_dialog_title"), + description: _t("spotlight|public_rooms|network_dropdown_add_dialog_description"), button: _t("action|add"), hasCancel: false, - placeholder: _t("Server name"), + placeholder: _t("spotlight|public_rooms|network_dropdown_add_dialog_placeholder"), validator: validServer, fixedWidth: false, }, @@ -214,7 +215,9 @@ export const NetworkDropdown: React.FC = ({ protocols, config, setConfig }} >
- {_t("Add new server…")} + + {_t("spotlight|public_rooms|network_dropdown_add_server_option")} +
@@ -233,11 +236,11 @@ export const NetworkDropdown: React.FC = ({ protocols, config, setConfig onChange={(option) => setConfig(option)} selectedLabel={(option) => option?.key - ? _t("Show: %(instance)s rooms (%(server)s)", { + ? _t("spotlight|public_rooms|network_dropdown_selected_label_instance", { server: option.key.roomServer, instance: option.key.instanceId ? option.label : "Matrix", }) - : _t("Show: Matrix rooms") + : _t("spotlight|public_rooms|network_dropdown_selected_label") } AdditionalOptions={addNewServer} /> diff --git a/src/components/views/elements/InfoTooltip.tsx b/src/components/views/elements/InfoTooltip.tsx index 911075b7f5..9272a90704 100644 --- a/src/components/views/elements/InfoTooltip.tsx +++ b/src/components/views/elements/InfoTooltip.tsx @@ -42,7 +42,7 @@ export default class InfoTooltip extends React.PureComponent { public render(): React.ReactNode { const { tooltip, children, tooltipClassName, className, kind } = this.props; - const title = _t("Information"); + const title = _t("info_tooltip_title"); const iconClassName = kind !== InfoTooltipKind.Warning ? "mx_InfoTooltip_icon_info" : "mx_InfoTooltip_icon_warning"; diff --git a/src/components/views/elements/LanguageDropdown.tsx b/src/components/views/elements/LanguageDropdown.tsx index ff27b11283..bbb37d60cd 100644 --- a/src/components/views/elements/LanguageDropdown.tsx +++ b/src/components/views/elements/LanguageDropdown.tsx @@ -130,7 +130,7 @@ export default class LanguageDropdown extends React.Component { onSearchChange={this.onSearchChange} searchEnabled={true} value={value} - label={_t("Language Dropdown")} + label={_t("language_dropdown_label")} disabled={this.props.disabled} > {options} diff --git a/src/components/views/elements/Pill.tsx b/src/components/views/elements/Pill.tsx index e95d39364a..8129a5fe45 100644 --- a/src/components/views/elements/Pill.tsx +++ b/src/components/views/elements/Pill.tsx @@ -125,7 +125,7 @@ export const Pill: React.FC = ({ type: propType, url, inMessage, room case PillType.EventInOtherRoom: { avatar = ; - pillText = _t("Message in %(room)s", { + pillText = _t("pill|permalink_other_room", { room: text, }); } @@ -134,7 +134,7 @@ export const Pill: React.FC = ({ type: propType, url, inMessage, room { if (event) { avatar = ; - pillText = _t("Message from %(user)s", { + pillText = _t("pill|permalink_this_room", { user: text, }); } else { diff --git a/src/components/views/elements/PowerSelector.tsx b/src/components/views/elements/PowerSelector.tsx index 6bfaf52f67..36bb51e4bb 100644 --- a/src/components/views/elements/PowerSelector.tsx +++ b/src/components/views/elements/PowerSelector.tsx @@ -151,7 +151,7 @@ export default class PowerSelector extends React.C public render(): React.ReactNode { let picker; - const label = typeof this.props.label === "undefined" ? _t("Power level") : this.props.label; + const label = typeof this.props.label === "undefined" ? _t("power_level|label") : this.props.label; if (this.state.custom) { picker = ( extends React.C text: Roles.textualPowerLevel(level, this.props.usersDefault), }; }); - options.push({ value: CUSTOM_VALUE, text: _t("Custom level") }); + options.push({ value: CUSTOM_VALUE, text: _t("power_level|custom_level") }); const optionsElements = options.map((op) => { return (