Migrate translations to keys and switch to Localazy (#26106)

This commit is contained in:
Michael Telatynski
2023-09-05 17:17:25 +01:00
committed by GitHub
parent 00803950bf
commit c525b633bd
98 changed files with 2327 additions and 1922 deletions

View File

@@ -150,12 +150,12 @@ export default class ElectronPlatform extends VectorBasePlatform {
ToastStore.sharedInstance().addOrReplaceToast({
key,
title: _t("Download Completed"),
title: _t("download_completed"),
props: {
description: name,
acceptLabel: _t("Open"),
acceptLabel: _t("action|open"),
onAccept,
dismissLabel: _t("Dismiss"),
dismissLabel: _t("action|dismiss"),
onDismiss,
numSeconds: 10,
},
@@ -313,7 +313,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
public getDefaultDeviceDisplayName(): string {
const brand = SdkConfig.get().brand;
return _t("%(brand)s Desktop: %(platformName)s", {
return _t("desktop_default_device_name", {
brand,
platformName: platformFriendlyName(),
});
@@ -390,7 +390,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
// this will get intercepted by electron-main will-navigate
super.startSingleSignOn(mxClient, loginType, fragmentAfterLogin, idpId);
Modal.createDialog(InfoDialog, {
title: _t("Go to your browser to complete Sign In"),
title: _t("auth|sso_complete_in_browser_dialog_title"),
description: <Spinner />,
});
}

View File

@@ -85,6 +85,6 @@ export default abstract class VectorBasePlatform extends BasePlatform {
* device Vector is running on
*/
public getDefaultDeviceDisplayName(): string {
return _t("Unknown device");
return _t("unknown_device");
}
}

View File

@@ -202,7 +202,7 @@ export default class WebPlatform extends VectorBasePlatform {
let osName = ua.getOS().name || "unknown OS";
// Stylise the value from the parser to match Apple's current branding.
if (osName === "Mac OS") osName = "macOS";
return _t("%(appName)s: %(browserName)s on %(osName)s", {
return _t("web_default_device_name", {
appName,
browserName,
osName,