Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f88d76e

Browse files
authored
Migrate more strings to translation keys (#11499)
1 parent 45094bd commit f88d76e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1992
-1955
lines changed

src/TextForEvent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import { getSenderName } from "./utils/event/getSenderName";
4949
function getRoomMemberDisplayname(client: MatrixClient, event: MatrixEvent, userId = event.getSender()): string {
5050
const roomId = event.getRoomId();
5151
const member = client.getRoom(roomId)?.getMember(userId!);
52-
return member?.name || member?.rawDisplayName || userId || _t("Someone");
52+
return member?.name || member?.rawDisplayName || userId || _t("common|someone");
5353
}
5454

5555
function textForCallEvent(event: MatrixEvent, client: MatrixClient): () => string {
@@ -466,7 +466,7 @@ function textForThreePidInviteEvent(event: MatrixEvent): (() => string) | null {
466466
return () =>
467467
_t("%(senderName)s revoked the invitation for %(targetDisplayName)s to join the room.", {
468468
senderName,
469-
targetDisplayName: event.getPrevContent().display_name || _t("Someone"),
469+
targetDisplayName: event.getPrevContent().display_name || _t("common|someone"),
470470
});
471471
}
472472

src/accessibility/KeyboardShortcuts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export const CATEGORIES: Record<CategoryName, ICategory> = {
257257
],
258258
},
259259
[CategoryName.ACCESSIBILITY]: {
260-
categoryLabel: _td("Accessibility"),
260+
categoryLabel: _td("common|accessibility"),
261261
settingNames: [
262262
KeyBindingAction.Escape,
263263
KeyBindingAction.Enter,

src/async-components/views/dialogs/security/ExportE2eKeysDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default class ExportE2eKeysDialog extends React.Component<IProps, IState>
216216
<input
217217
className="mx_Dialog_primary"
218218
type="submit"
219-
value={_t("Export")}
219+
value={_t("action|export")}
220220
disabled={disableForm}
221221
/>
222222
<button onClick={this.onCancelClick} disabled={disableForm}>

src/async-components/views/dialogs/security/ImportE2eKeysDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export default class ImportE2eKeysDialog extends React.Component<IProps, IState>
187187
<input
188188
className="mx_Dialog_primary"
189189
type="submit"
190-
value={_t("Import")}
190+
value={_t("action|import")}
191191
disabled={!this.state.enableSubmit || disableForm}
192192
/>
193193
<button onClick={this.onCancelClick} disabled={disableForm}>

src/components/views/auth/InteractiveAuthEntryComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ export class MsisdnAuthEntry extends React.Component<IMsisdnAuthEntryProps, IMsi
684684
<br />
685685
<input
686686
type="submit"
687-
value={_t("Submit")}
687+
value={_t("action|submit")}
688688
className={submitClasses}
689689
disabled={!enableSubmit}
690690
/>

src/components/views/dialogs/AppDownloadDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const AppDownloadDialog: FC<Props> = ({ onFinished }) => {
6868
)}
6969
<div className="mx_AppDownloadDialog_mobile">
7070
<div className="mx_AppDownloadDialog_app">
71-
<Heading size="3">{_t("iOS")}</Heading>
71+
<Heading size="3">{_t("common|ios")}</Heading>
7272
<QRCode data={urlAppStore} margin={0} width={172} />
7373
<div className="mx_AppDownloadDialog_info">
7474
{_t("%(qrCode)s or %(appLinks)s", {
@@ -89,7 +89,7 @@ export const AppDownloadDialog: FC<Props> = ({ onFinished }) => {
8989
</div>
9090
</div>
9191
<div className="mx_AppDownloadDialog_app">
92-
<Heading size="3">{_t("Android")}</Heading>
92+
<Heading size="3">{_t("common|android")}</Heading>
9393
<QRCode data={urlAndroid} margin={0} width={172} />
9494
<div className="mx_AppDownloadDialog_info">
9595
{_t("%(qrCode)s or %(appLinks)s", {

src/components/views/dialogs/ExportDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
410410
</div>
411411
) : (
412412
<DialogButtons
413-
primaryButton={_t("Export")}
413+
primaryButton={_t("action|export")}
414414
onPrimaryButtonClick={onExportClick}
415415
onCancel={() => onFinished(false)}
416416
/>

src/components/views/dialogs/InviteDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ export default class InviteDialog extends React.PureComponent<Props, IInviteDial
13131313
);
13141314
}
13151315

1316-
buttonText = _t("Go");
1316+
buttonText = _t("action|go");
13171317
goButtonFn = this.checkProfileAndStartDm;
13181318
extraSection = (
13191319
<div className="mx_InviteDialog_section_hidden_suggestions_disclaimer">

src/components/views/dialogs/ReportEventDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
428428
{ignoreUserCheckbox}
429429
</div>
430430
<DialogButtons
431-
primaryButton={_t("Send report")}
431+
primaryButton={_t("action|send_report")}
432432
onPrimaryButtonClick={this.onSubmit}
433433
focus={true}
434434
onCancel={this.onCancel}
@@ -467,7 +467,7 @@ export default class ReportEventDialog extends React.Component<IProps, IState> {
467467
{ignoreUserCheckbox}
468468
</div>
469469
<DialogButtons
470-
primaryButton={_t("Send report")}
470+
primaryButton={_t("action|send_report")}
471471
onPrimaryButtonClick={this.onSubmit}
472472
focus={true}
473473
onCancel={this.onCancel}

src/components/views/dialogs/SessionRestoreErrorDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class SessionRestoreErrorDialog extends React.Component<IProps> {
7878
} else {
7979
dialogButtons = (
8080
<DialogButtons
81-
primaryButton={_t("Refresh")}
81+
primaryButton={_t("action|refresh")}
8282
onPrimaryButtonClick={this.onRefreshClick}
8383
focus={true}
8484
hasCancel={false}

0 commit comments

Comments
 (0)