Location sharing - add localised strings to map (#9025)
* add localised strings to map * fussy import ordering * remove unused scale control strings from override
This commit is contained in:
parent
7fb48d24e4
commit
cc8d78d971
2 changed files with 23 additions and 2 deletions
|
@ -726,6 +726,16 @@
|
||||||
"Unknown App": "Unknown App",
|
"Unknown App": "Unknown App",
|
||||||
"This homeserver is not configured to display maps.": "This homeserver is not configured to display maps.",
|
"This homeserver is not configured to display maps.": "This homeserver is not configured to display maps.",
|
||||||
"This homeserver is not configured correctly to display maps, or the configured map server may be unreachable.": "This homeserver is not configured correctly to display maps, or the configured map server may be unreachable.",
|
"This homeserver is not configured correctly to display maps, or the configured map server may be unreachable.": "This homeserver is not configured correctly to display maps, or the configured map server may be unreachable.",
|
||||||
|
"Toggle attribution": "Toggle attribution",
|
||||||
|
"Map feedback": "Map feedback",
|
||||||
|
"Enter fullscreen": "Enter fullscreen",
|
||||||
|
"Exit fullscreen": "Exit fullscreen",
|
||||||
|
"Find my location": "Find my location",
|
||||||
|
"Location not available": "Location not available",
|
||||||
|
"Mapbox logo": "Mapbox logo",
|
||||||
|
"Reset bearing to north": "Reset bearing to north",
|
||||||
|
"Zoom in": "Zoom in",
|
||||||
|
"Zoom out": "Zoom out",
|
||||||
"Are you sure you want to exit during this export?": "Are you sure you want to exit during this export?",
|
"Are you sure you want to exit during this export?": "Are you sure you want to exit during this export?",
|
||||||
"Generating a ZIP": "Generating a ZIP",
|
"Generating a ZIP": "Generating a ZIP",
|
||||||
"Fetched %(count)s events out of %(total)s|other": "Fetched %(count)s events out of %(total)s",
|
"Fetched %(count)s events out of %(total)s|other": "Fetched %(count)s events out of %(total)s",
|
||||||
|
@ -2198,8 +2208,6 @@
|
||||||
"My live location": "My live location",
|
"My live location": "My live location",
|
||||||
"Drop a Pin": "Drop a Pin",
|
"Drop a Pin": "Drop a Pin",
|
||||||
"What location type do you want to share?": "What location type do you want to share?",
|
"What location type do you want to share?": "What location type do you want to share?",
|
||||||
"Zoom in": "Zoom in",
|
|
||||||
"Zoom out": "Zoom out",
|
|
||||||
"Frequently Used": "Frequently Used",
|
"Frequently Used": "Frequently Used",
|
||||||
"Smileys & People": "Smileys & People",
|
"Smileys & People": "Smileys & People",
|
||||||
"Animals & Nature": "Animals & Nature",
|
"Animals & Nature": "Animals & Nature",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
|
||||||
|
import { _t } from "../../languageHandler";
|
||||||
import { parseGeoUri } from "./parseGeoUri";
|
import { parseGeoUri } from "./parseGeoUri";
|
||||||
import { findMapStyleUrl } from "./findMapStyleUrl";
|
import { findMapStyleUrl } from "./findMapStyleUrl";
|
||||||
import { LocationShareError } from "./LocationShareErrors";
|
import { LocationShareError } from "./LocationShareErrors";
|
||||||
|
@ -37,6 +38,18 @@ export const createMap = (
|
||||||
zoom: 15,
|
zoom: 15,
|
||||||
interactive,
|
interactive,
|
||||||
attributionControl: false,
|
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'),
|
||||||
|
'NavigationControl.ZoomIn': _t('Zoom in'),
|
||||||
|
'NavigationControl.ZoomOut': _t('Zoom out'),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
map.addControl(new maplibregl.AttributionControl(), 'top-right');
|
map.addControl(new maplibregl.AttributionControl(), 'top-right');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue