Add code editor for maputnik (#1426)

## Launch Checklist

This PR adds the ability to look at the entire style and edit it in a
code editor that supports syntax highlight, errors, search and more.

- Resolves #820

CC: @Kanahiro as I know you did something similar, probably has better
performance...

After:
<img width="1920" height="937" alt="image"
src="https://github.com/user-attachments/assets/f925cf92-2623-4390-8f75-14d7f6a79171"
/>


 - [x] Briefly describe the changes in this PR.
 - [x] Link to related issues.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
 - [x] Write tests for all new functionality.
 - [x] Add an entry to `CHANGELOG.md` under the `## main` section.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
Harel M
2025-10-05 16:38:03 +03:00
committed by GitHub
parent 454d8d8b10
commit 39d63ec7b1
15 changed files with 169 additions and 41 deletions
+12 -4
View File
@@ -31,11 +31,15 @@
"Maputnik on GitHub": "GitHub上的Maputnik",
"Open": "打开",
"Save": "保存",
"Code Editor": "代码编辑器",
"Data Sources": "数据源",
"Style Settings": "样式设置",
"Global State": "全局状态",
"View": "视图",
"Color accessibility": "颜色可访问性",
"Help": "帮助",
"Close": "关闭",
"Click to close the editor": "点击关闭编辑器",
"Comments for the current layer. This is non-standard and not in the spec.": "当前图层的注释。注意:这不是标准功能,可能与其他库不兼容。",
"Comments": "注释",
"Comment...": "写注释...",
@@ -56,7 +60,6 @@
"Delete filter block": "删除过滤器块",
"Add value": "添加值",
"Remove array item": "移除数组项目",
"Press <1>ESC</1> to lose focus": "按 <1>ESC</1> 键退出焦点",
"Must provide protocol: <1>https://</1>": "必须提供协议:<1>https://</1>",
"Must provide protocol: <1>http://</1> or <3>https://</3>": "必须提供协议:<1>http://</1> 或 <3>https://</3>",
"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain": "CORS 策略不允许从 https 访问通过 http 提供的资源,请使用 <1>https://</1> 域名。",
@@ -96,6 +99,12 @@
"Save the JSON style to your computer.": "将JSON样式保存到您的计算机。",
"Save as": "另存为",
"Create HTML": "创建HTML",
"Key": "键",
"Value": "值",
"Remove variable": "移除变量",
"Global State Variables": "全局状态变量",
"No global state variables defined. Add variables to create reusable values in your style.": "未定义全局状态变量。添加变量以在样式中创建可重用的值。",
"Add Variable": "添加变量",
"Cancel": "取消",
"Open Style": "打开样式",
"Open local Style": "打开本地样式",
@@ -124,6 +133,7 @@
"Terrain exaggeration": "地形夸张",
"Transition delay": "过渡延迟",
"Transition duration": "过渡持续时间",
"Projection": "投影",
"Open Layers (experimental)": "开放图层(实验性)",
"Shortcuts menu": "快捷方式菜单",
"Open modal": "打开模态框",
@@ -196,7 +206,5 @@
"LocationIQ Access Token": "LocationIQ 访问令牌",
"Public access token for LocationIQ services.": "LocationIQ 服务的公共访问令牌。",
"Style Renderer": "样式渲染器",
"Choose the default Maputnik renderer for this style.": "为这种样式选择默认的Maputnik渲染器。",
"Language": "语言",
"Layer options": "图层选项"
"Choose the default Maputnik renderer for this style.": "为这种样式选择默认的Maputnik渲染器。"
}