Migrate more strings to translation keys (#11613)

This commit is contained in:
Michael Telatynski
2023-09-19 17:16:38 +01:00
committed by GitHub
parent d46d4b3d04
commit 5cb8cbd893
111 changed files with 8214 additions and 6766 deletions

View File

@@ -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");
}
};

View File

@@ -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"),
},

View File

@@ -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");
}
};