Migrate more strings to translation keys (#11613)
This commit is contained in:
parent
d46d4b3d04
commit
5cb8cbd893
111 changed files with 8214 additions and 6766 deletions
|
@ -120,11 +120,11 @@ export function messageForLoginError(
|
|||
);
|
||||
} else if (err.httpStatus === 401 || err.httpStatus === 403) {
|
||||
if (err.errcode === "M_USER_DEACTIVATED") {
|
||||
return _t("This account has been deactivated.");
|
||||
return _t("auth|account_deactivated");
|
||||
} else if (SdkConfig.get("disable_custom_urls")) {
|
||||
return (
|
||||
<div>
|
||||
<div>{_t("Incorrect username and/or password.")}</div>
|
||||
<div>{_t("auth|incorrect_credentials")}</div>
|
||||
<div className="mx_Login_smallError">
|
||||
{_t("Please note you are logging into the %(hs)s server, not matrix.org.", {
|
||||
hs: serverConfig.hsName,
|
||||
|
@ -133,7 +133,7 @@ export function messageForLoginError(
|
|||
</div>
|
||||
);
|
||||
} else {
|
||||
return _t("Incorrect username and/or password.");
|
||||
return _t("auth|incorrect_credentials");
|
||||
}
|
||||
} else {
|
||||
return messageForConnectionError(err, serverConfig);
|
||||
|
|
|
@ -26,13 +26,11 @@ export enum LocationShareError {
|
|||
export const getLocationShareErrorMessage = (errorType?: LocationShareError): string => {
|
||||
switch (errorType) {
|
||||
case LocationShareError.MapStyleUrlNotConfigured:
|
||||
return _t("This homeserver is not configured to display maps.");
|
||||
return _t("location_sharing|MapStyleUrlNotConfigured");
|
||||
case LocationShareError.WebGLNotEnabled:
|
||||
return _t("WebGL is required to display maps, please enable it in your browser settings.");
|
||||
return _t("location_sharing|WebGLNotEnabled");
|
||||
case LocationShareError.MapStyleUrlNotReachable:
|
||||
default:
|
||||
return _t(
|
||||
"This homeserver is not configured correctly to display maps, or the configured map server may be unreachable.",
|
||||
);
|
||||
return _t("location_sharing|MapStyleUrlNotReachable");
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,14 +39,14 @@ export const createMap = (
|
|||
interactive,
|
||||
attributionControl: false,
|
||||
locale: {
|
||||
"AttributionControl.ToggleAttribution": _t("Toggle attribution"),
|
||||
"AttributionControl.MapFeedback": _t("Map feedback"),
|
||||
"FullscreenControl.Enter": _t("Enter fullscreen"),
|
||||
"FullscreenControl.Exit": _t("Exit fullscreen"),
|
||||
"GeolocateControl.FindMyLocation": _t("Find my location"),
|
||||
"GeolocateControl.LocationNotAvailable": _t("Location not available"),
|
||||
"LogoControl.Title": _t("Mapbox logo"),
|
||||
"NavigationControl.ResetBearing": _t("Reset bearing to north"),
|
||||
"AttributionControl.ToggleAttribution": _t("location_sharing|toggle_attribution"),
|
||||
"AttributionControl.MapFeedback": _t("location_sharing|map_feedback"),
|
||||
"FullscreenControl.Enter": _t("action|enter_fullscreen"),
|
||||
"FullscreenControl.Exit": _t("action|exit_fullscreeen"),
|
||||
"GeolocateControl.FindMyLocation": _t("location_sharing|find_my_location"),
|
||||
"GeolocateControl.LocationNotAvailable": _t("location_sharing|location_not_available"),
|
||||
"LogoControl.Title": _t("location_sharing|mapbox_logo"),
|
||||
"NavigationControl.ResetBearing": _t("location_sharing|reset_bearing"),
|
||||
"NavigationControl.ZoomIn": _t("action|zoom_in"),
|
||||
"NavigationControl.ZoomOut": _t("action|zoom_out"),
|
||||
},
|
||||
|
|
|
@ -26,15 +26,12 @@ export const positionFailureMessage = (code: number): string | undefined => {
|
|||
const brand = SdkConfig.get().brand;
|
||||
switch (code) {
|
||||
case 1:
|
||||
return _t(
|
||||
"%(brand)s was denied permission to fetch your location. Please allow location access in your browser settings.",
|
||||
{ brand },
|
||||
);
|
||||
return _t("location_sharing|failed_permission", { brand });
|
||||
case 2:
|
||||
return _t("Failed to fetch your location. Please try again later.");
|
||||
return _t("location_sharing|failed_generic");
|
||||
case 3:
|
||||
return _t("Timed out trying to fetch your location. Please try again later.");
|
||||
return _t("location_sharing|failed_timeout");
|
||||
case 4:
|
||||
return _t("Unknown error fetching location. Please try again later.");
|
||||
return _t("location_sharing|failed_unknown");
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue