forked from MapComplete/MapComplete
Make hotkey documentation fully translatable
This commit is contained in:
parent
8c5654f9f7
commit
648a9e63c9
3 changed files with 11 additions and 5 deletions
|
@ -7,6 +7,7 @@ import { UIEventSource } from "../../Logic/UIEventSource"
|
|||
import { VariableUiElement } from "./VariableUIElement"
|
||||
import { Translation } from "../i18n/Translation"
|
||||
import { FixedUiElement } from "./FixedUiElement"
|
||||
import Translations from "../i18n/Translations"
|
||||
|
||||
export default class Hotkeys {
|
||||
private static readonly _docs: UIEventSource<
|
||||
|
@ -106,11 +107,12 @@ export default class Hotkeys {
|
|||
return <[string, string | Translation]>[modifiers.join("+"), documentation]
|
||||
})
|
||||
.sort()
|
||||
const t = Translations.t.hotkeyDocumentation
|
||||
return new Combine([
|
||||
new Title("Hotkeys", 1),
|
||||
"MapComplete supports the following keys:",
|
||||
new Title(t.title, 1),
|
||||
t.intro,
|
||||
new Table(
|
||||
["Key combination", "Action"],
|
||||
[t.key, t.action],
|
||||
byKey.map(([key, doc]) => {
|
||||
return [new FixedUiElement(key).SetClass("code"), doc]
|
||||
})
|
||||
|
|
|
@ -263,4 +263,4 @@
|
|||
"fr": "Une couche affichant les lieux où l'on peut nettoyer son vélo",
|
||||
"cs": "Vrstva zobrazující zařízení, kde si můžete umýt kolo"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -356,12 +356,16 @@
|
|||
}
|
||||
},
|
||||
"hotkeyDocumentation": {
|
||||
"action": "Action",
|
||||
"closeSidebar": "Close the sidebar",
|
||||
"geolocate": "Pan the map to the current location or zoom the map to the current location. Requests geopermission",
|
||||
"intro": "MapComplete supports the following keys:",
|
||||
"key": "Key combination",
|
||||
"openLayersPanel": "Opens the Background, layers and filters panel",
|
||||
"selectBackground": "Select a background layer of category {category}",
|
||||
"selectMapnik": "Sets the background layer to OpenStreetMap-carto",
|
||||
"selectSearch": "Select the search bar to search locations"
|
||||
"selectSearch": "Select the search bar to search locations",
|
||||
"title": "Hotkeys"
|
||||
},
|
||||
"image": {
|
||||
"addPicture": "Add picture",
|
||||
|
|
Loading…
Reference in a new issue