Fix double translation issue (#10240
* Fix double translation issue * Remove some redundant string concatenations
This commit is contained in:
parent
a3defa6cf7
commit
12dd799301
21 changed files with 29 additions and 41 deletions
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
import React from "react";
|
||||
import React, { ReactNode } from "react";
|
||||
import { EventStatus } from "matrix-js-sdk/src/models/event-status";
|
||||
import { MatrixEventEvent } from "matrix-js-sdk/src/models/event";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
|
@ -110,7 +110,7 @@ export async function leaveRoomBehaviour(roomId: string, retry = true, spinner =
|
|||
|
||||
const errors = Object.entries(results).filter((r) => !!r[1]);
|
||||
if (errors.length > 0) {
|
||||
const messages = [];
|
||||
const messages: ReactNode[] = [];
|
||||
for (const roomErr of errors) {
|
||||
const err = roomErr[1]; // [0] is the roomId
|
||||
let message = _t("Unexpected server error trying to leave the room");
|
||||
|
|
|
@ -29,9 +29,7 @@ export function findMapStyleUrl(): string {
|
|||
const mapStyleUrl = getTileServerWellKnown()?.map_style_url ?? SdkConfig.get().map_style_url;
|
||||
|
||||
if (!mapStyleUrl) {
|
||||
logger.error(
|
||||
"'map_style_url' missing from homeserver .well-known area, and " + "missing from from config.json.",
|
||||
);
|
||||
logger.error("'map_style_url' missing from homeserver .well-known area, and missing from from config.json.");
|
||||
throw new Error(LocationShareError.MapStyleUrlNotConfigured);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,10 +50,7 @@ export const createMap = (interactive: boolean, bodyId: string, onError?: (error
|
|||
map.addControl(new maplibregl.AttributionControl(), "top-right");
|
||||
|
||||
map.on("error", (e) => {
|
||||
logger.error(
|
||||
"Failed to load map: check map_style_url in config.json has a " + "valid URL and API key",
|
||||
e.error,
|
||||
);
|
||||
logger.error("Failed to load map: check map_style_url in config.json has a valid URL and API key", e.error);
|
||||
onError?.(new Error(LocationShareError.MapStyleUrlNotReachable));
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue