Skip to content

Commit 25593be

Browse files
committed
[gephi-lite] Adds doc for map background layer
1 parent ed61cd4 commit 25593be

File tree

3 files changed

+39
-8
lines changed

3 files changed

+39
-8
lines changed

packages/gephi-lite/src/components/GraphAppearance/background/MapBackgroundLayerForm.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { MapBackgroundLayer } from "@gephi/gephi-lite-sdk";
22
import { FC } from "react";
3-
import { useTranslation } from "react-i18next";
3+
import { Trans, useTranslation } from "react-i18next";
44

55
import { useAppearance, useAppearanceActions } from "../../../core/context/dataContexts";
66
import { useModal } from "../../../core/modals";
@@ -29,6 +29,21 @@ export const MapBackgroundLayerForm: FC = () => {
2929
<h3>{t("appearance.background.map.title")}</h3>
3030

3131
<div className="panel-block">
32+
<p className="form-text small text-muted">
33+
<Trans
34+
i18nKey={"appearance.background.map.maplibre.style_description"}
35+
components={{
36+
maplibreLink: <a href="https://maplibre.org/" target="_blank" rel="noreferrer" />,
37+
maplibreStyleLink: (
38+
<a href="https://maplibre.org/maplibre-style-spec/" target="_blank" rel="noreferrer" />
39+
),
40+
gephiLiteDocLink: (
41+
<a href="https://docs.gephi.org/lite/user-manual/map" target="_blank" rel="noreferrer" />
42+
),
43+
}}
44+
/>
45+
</p>
46+
3247
<label className="form-label">{t("appearance.background.map.maplibre.style")}</label>
3348
<div className="d-flex align-items-center gl-gap-2">
3449
<span className="flex-grow-1 text-ellipsis">

packages/gephi-lite/src/locales/dev.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
{
22
"appearance": {
3+
"background": {
4+
"layer_mode": "Background layer",
5+
"none": "None",
6+
"map": {
7+
"label": "Map",
8+
"title": "Map background",
9+
"maplibre": {
10+
"custom_style": "Custom style",
11+
"edit_style": "Edit map style",
12+
"reset_style": "Reset to default style",
13+
"style": "Map style",
14+
"style_description": "The map is rendered using <maplibreLink>MapLibre</maplibreLink>. The style of the map follows the <maplibreStyleLink>MapLibre Style Spec</maplibreStyleLink>. There is also a <gephiLiteDocLink>dedicated page</gephiLiteDocLink> in the Gephi Lite documentation.",
15+
"style_default": "Default",
16+
"style_editor_title": "Edit map style"
17+
}
18+
}
19+
},
320
"color": {
421
"color_all_items": "Color for all {{items}}",
522
"default_value": "Color for {{items}} with no valid value",

packages/gephi-lite/src/locales/en.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
"map": {
77
"label": "Map",
88
"title": "Map background",
9-
"engine": "Engine:",
109
"maplibre": {
11-
"name": "MapLibre",
12-
"style": "Map style:",
13-
"style_default": "Default style",
10+
"custom_style": "Custom style",
1411
"edit_style": "Edit map style",
15-
"reset_style": "Reset to default",
16-
"style_editor_title": "Map Style Editor",
17-
"custom_style": "Custom style"
12+
"reset_style": "Reset to default style",
13+
"style": "Map style",
14+
"style_description": "The map is rendered using <maplibreLink>MapLibre</maplibreLink>. The style of the map follows the <maplibreStyleLink>MapLibre Style Spec</maplibreStyleLink>. There is also a <gephiLiteDocLink>dedicated page</gephiLiteDocLink> in the Gephi Lite documentation.",
15+
"style_default": "Default",
16+
"style_editor_title": "Edit map style"
1817
}
1918
}
2019
},

0 commit comments

Comments
 (0)