Use brand name from config in all strings
This commit is contained in:
parent
bb5107a60b
commit
9085627a28
30 changed files with 325 additions and 160 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright 2019 New Vector Ltd
|
||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
||||
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -70,10 +70,14 @@ export default class AutoDiscoveryUtils {
|
|||
let title = _t("Cannot reach homeserver");
|
||||
let body = _t("Ensure you have a stable internet connection, or get in touch with the server admin");
|
||||
if (!AutoDiscoveryUtils.isLivelinessError(err)) {
|
||||
title = _t("Your Riot is misconfigured");
|
||||
const brand = SdkConfig.get().brand;
|
||||
title = _t("Your %(brand)s is misconfigured", { brand });
|
||||
body = _t(
|
||||
"Ask your Riot admin to check <a>your config</a> for incorrect or duplicate entries.",
|
||||
{}, {
|
||||
"Ask your %(brand)s admin to check <a>your config</a> for incorrect or duplicate entries.",
|
||||
{
|
||||
brand,
|
||||
},
|
||||
{
|
||||
a: (sub) => {
|
||||
return <a
|
||||
href="https://github.com/vector-im/riot-web/blob/master/docs/config.md"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
Copyright 2017 Vector Creations Ltd
|
||||
Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -28,7 +29,7 @@ if (!TextDecoder) {
|
|||
}
|
||||
|
||||
import { _t } from '../languageHandler';
|
||||
|
||||
import SdkConfig from '../SdkConfig';
|
||||
|
||||
const subtleCrypto = window.crypto.subtle || window.crypto.webkitSubtle;
|
||||
|
||||
|
@ -61,23 +62,24 @@ function cryptoFailMsg() {
|
|||
*/
|
||||
export async function decryptMegolmKeyFile(data, password) {
|
||||
const body = unpackMegolmKeyFile(data);
|
||||
const brand = SdkConfig.get().brand;
|
||||
|
||||
// check we have a version byte
|
||||
if (body.length < 1) {
|
||||
throw friendlyError('Invalid file: too short',
|
||||
_t('Not a valid Riot keyfile'));
|
||||
_t('Not a valid %(brand)s keyfile', { brand }));
|
||||
}
|
||||
|
||||
const version = body[0];
|
||||
if (version !== 1) {
|
||||
throw friendlyError('Unsupported version',
|
||||
_t('Not a valid Riot keyfile'));
|
||||
_t('Not a valid %(brand)s keyfile', { brand }));
|
||||
}
|
||||
|
||||
const ciphertextLength = body.length-(1+16+16+4+32);
|
||||
if (ciphertextLength < 0) {
|
||||
throw friendlyError('Invalid file: too short',
|
||||
_t('Not a valid Riot keyfile'));
|
||||
_t('Not a valid %(brand)s keyfile', { brand }));
|
||||
}
|
||||
|
||||
const salt = body.subarray(1, 1+16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue