From 40531a00daec2d5a45ebe5e9bcaac8dd88387760 Mon Sep 17 00:00:00 2001 From: jieme Date: Wed, 21 Aug 2024 11:25:15 +0800 Subject: [PATCH] Add china language support --- i18next-parser.config.ts | 2 +- src/i18n.ts | 1 + src/locales/zh/translation.json | 192 ++++++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 src/locales/zh/translation.json diff --git a/i18next-parser.config.ts b/i18next-parser.config.ts index a9c98f1c..02551f08 100644 --- a/i18next-parser.config.ts +++ b/i18next-parser.config.ts @@ -1,6 +1,6 @@ export default { output: 'src/locales/$LOCALE/$NAMESPACE.json', - locales: [ 'ja', 'he' ], + locales: [ 'ja', 'he','zh' ], // Because some keys are dynamically generated, i18next-parser can't detect them. // We add these keys manually, so we don't want to remove them. diff --git a/src/i18n.ts b/src/i18n.ts index 35521405..765e498e 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -7,6 +7,7 @@ export const supportedLanguages = { "en": "English", "ja": "日本語", "he": "עברית", + "zh": "简体中文" } as const; i18n diff --git a/src/locales/zh/translation.json b/src/locales/zh/translation.json new file mode 100644 index 00000000..dd26994b --- /dev/null +++ b/src/locales/zh/translation.json @@ -0,0 +1,192 @@ +{ + "Input value": "输入值", + "Data value": "数据值", + "Output value": "输出值", + "Function": "函数", + "Select a type of data scale (default is 'categorical').": "选择数据尺度的类型(默认为“分类”)。", + "Base": "基础", + "Input a data property to base styles off of.": "输入一个数据属性作为样式的基础。", + "Default": "默认", + "Stops": "停靠点", + "Zoom": "缩放", + "Add stop": "添加停靠点", + "Convert to expression": "转换为表达式", + "Remove zoom level from stop": "从停靠点移除缩放级别", + "Revert from expression": "从表达式恢复", + "Delete expression": "删除表达式", + "Convert property into a zoom function": "将属性转换为缩放函数", + "Convert property to data function": "将属性转换为数据函数", + "Layer <1>{formatLayerId(layerId)}: {parsed.data.message}": "图层<1>{formatLayerId(layerId)}: {parsed.data.message}", + "switch to layer": "切换到图层", + "Map": "地图", + "Inspect": "检查", + "Deuteranopia filter": "绿色盲滤镜", + "Protanopia filter": "红色盲滤镜", + "Tritanopia filter": "蓝色盲滤镜", + "Achromatopsia filter": "全色盲滤镜", + "Layers list": "图层列表", + "Layer editor": "图层编辑器", + "Map view": "地图视图", + "Maputnik on GitHub": "GitHub上的Maputnik", + "Open": "打开", + "Export": "导出", + "Data Sources": "数据源", + "Style Settings": "样式设置", + "View": "视图", + "Color accessibility": "颜色可访问性", + "Language": "语言", + "Help": "帮助", + "Comments for the current layer. This is non-standard and not in the spec.": "当前图层的注释。注意:这不是标准功能,可能与其他库不兼容。", + "Comments": "注释", + "Comment...": "写注释...", + "Max Zoom": "最大缩放", + "Min Zoom": "最小缩放", + "Source": "源", + "Source Layer": "源图层", + "Type": "类型", + "Nested filters are not supported.": "不支持嵌套过滤器。", + "Upgrade to expression": "升级为表达式", + "Filter": "过滤器", + "every filter matches": "每个过滤器都匹配", + "no filter matches": "没有过滤器匹配", + "any filter matches": "任何过滤器匹配", + "Add filter": "添加过滤器", + "You've entered an old style filter.": "您输入了一个旧风格的过滤器。", + "Switch to filter editor.": "切换到过滤器编辑器。", + "Delete filter block": "删除过滤器块", + "Add value": "添加值", + "Remove array item": "移除数组项目", + "Press <1>ESC to lose focus": "按 <1>ESC 键退出焦点", + "Must provide protocol: <1>https://": "必须提供协议:<1>https://", + "Must provide protocol: <1>http:// or <3>https://": "必须提供协议:<1>http:// 或 <3>https://", + "CORS policy won't allow fetching resources served over http from https, use a <1>https:// domain": "CORS 策略不允许从 https 访问通过 http 提供的资源,请使用 <1>https:// 域名。", + "Layer": "图层", + "JSON Editor": "JSON编辑器", + "Delete": "删除", + "Duplicate": "复制", + "Show": "显示", + "Hide": "隐藏", + "Move layer up": "向上移动图层", + "Move layer down": "向下移动图层", + "Layer: {{layerId}}": "图层: {{layerId}}", + "Layers": "图层", + "Collapse": "折叠", + "Expand": "展开", + "Add Layer": "添加图层", + "Zoom:": "缩放:", + "Search": "搜索", + "Close popup": "关闭弹出窗口", + "cursor:": "光标:", + "center:": "中心:", + "rotation:": "旋转:", + "Close modal": "关闭模态框", + "Debug": "调试", + "Options": "选项", + "<0>Open in OSM — Opens the current view on openstreetmap.org": "在 openstreetmap.org 打开当前视图", + "Export Style": "导出样式", + "Download Style": "下载样式", + "Download a JSON style to your computer.": "将JSON样式下载到您的电脑。", + "Download HTML": "下载HTML", + "Cancel": "取消", + "Open Style": "打开样式", + "Upload Style": "上传样式", + "Upload a JSON style from your computer.": "从您的电脑上传JSON样式。", + "Style file": "样式文件", + "Upload": "上传", + "Load from URL": "从URL加载", + "Load from a URL. Note that the URL must have <1>CORS enabled.": "从URL加载。注意:URL必须启用 <1>CORS。", + "Style URL": "样式URL", + "Enter URL...": "输入URL...", + "Gallery Styles": "画廊样式", + "Open one of the publicly available styles to start from.": "打开一个公开可用的样式开始。", + "Loading style": "正在加载样式", + "Loading: {{requestUrl}}": "正在加载: {{requestUrl}}", + "Name": "名称", + "Owner": "所有者", + "Owner ID of the style. Used by Mapbox or future style APIs.": "样式的所有者ID。由Mapbox或未来的样式API使用。", + "Sprite URL": "精灵URL", + "Glyphs URL": "字形URL", + "Center": "中心", + "Bearing": "方位", + "Pitch": "俯仰角", + "Light anchor": "光源锚点", + "Light color": "光源颜色", + "Light intensity": "光源强度", + "Light position": "光源位置", + "Terrain source": "地形源", + "Terrain exaggeration": "地形夸张", + "Transition delay": "过渡延迟", + "Transition duration": "过渡持续时间", + "Open Layers (experimental)": "开放图层(实验性)", + "Shortcuts menu": "快捷方式菜单", + "Open modal": "打开模态框", + "Export modal": "导出模态框", + "Data Sources modal": "数据源模态框", + "Style Settings modal": "样式设置模态框", + "Toggle inspect": "切换检查", + "Focus map": "聚焦地图", + "Debug modal": "调试模态框", + "Increase the zoom level by 1.": "将缩放级别增加1。", + "Increase the zoom level by 2.": "将缩放级别增加2。", + "Decrease the zoom level by 1.": "将缩放级别减少1。", + "Decrease the zoom level by 2.": "将缩放级别减少2。", + "Pan up by 100 pixels.": "向上平移100像素。", + "Pan down by 100 pixels.": "向下平移100像素。", + "Pan left by 100 pixels.": "向左平移100像素。", + "Pan right by 100 pixels.": "向右平移100像素。", + "Increase the rotation by 15 degrees.": "将旋转角度增加15度。", + "Decrease the rotation by 15 degrees.": "将旋转角度减少15度。", + "Increase the pitch by 10 degrees.": "将俯仰角增加10度。", + "Decrease the pitch by 10 degrees.": "将俯仰角减少10度。", + "Shortcuts": "快捷键", + "Press <1>ESC to lose focus of any active elements, then press one of:": "按下 <1>ESC 退出任何活动元素的焦点,然后按下以下之一:", + "If the Map is in focused you can use the following shortcuts": "如果地图处于焦点状态,您可以使用以下快捷键", + "Remove '{{sourceId}}' source": "移除 '{{sourceId}}' 源", + "Source ID": "源ID", + "Unique ID that identifies the source and is used in the layer to reference the source.": "用于标识源并在图层中引用源的唯一ID。", + "Source Type": "源类型", + "GeoJSON (JSON)": "GeoJSON (JSON格式)", + "GeoJSON (URL)": "GeoJSON (URL格式)", + "Vector (TileJSON URL)": "矢量数据 (TileJSON URL)", + "Vector (XYZ URLs)": "矢量数据 (XYZ URLs)", + "Raster (TileJSON URL)": "栅格数据 (TileJSON URL)", + "Raster (XYZ URL)": "栅格数据 (XYZ URL)", + "Raster DEM (TileJSON URL)": "栅格高程数据 (TileJSON URL)", + "Raster DEM (XYZ URLs)": "栅格高程数据 (XYZ URLs)", + "Image": "图像", + "Video": "视频", + "Add Source": "添加源", + "Sources": "源列表", + "Active Sources": "激活的源", + "Choose Public Source": "选择公共源", + "Add one of the publicly available sources to your style.": "将公开可用的源之一添加到您的样式中。", + "Add New Source": "添加新源", + "Add a new source to your style. You can only choose the source type and id at creation time!": "向您的样式添加新源。在创建时,您只能选择源类型和ID!", + "TileJSON URL": "TileJSON URL", + "Tile URL": "瓦片URL", + "Coord top left": "左上角坐标", + "Coord top right": "右上角坐标", + "Coord bottom right": "右下角坐标", + "Coord bottom left": "左下角坐标", + "Image URL": "图像URL", + "Video URL": "视频URL", + "GeoJSON URL": "GeoJSON URL", + "GeoJSON": "GeoJSON", + "Cluster": "聚合", + "Encoding": "编码", + "Error:": "错误:", + "MapTiler Access Token": "MapTiler 访问令牌", + "Public access token for MapTiler Cloud.": "MapTiler Cloud 的公共访问令牌。", + "Thunderforest Access Token": "Thunderforest 访问令牌", + "Public access token for Thunderforest services.": "Thunderforest 服务的公共访问令牌。", + "Style Renderer": "样式渲染器", + "Choose the default Maputnik renderer for this style.": "为这种样式选择默认的Maputnik渲染器。", + "Layer options": "图层选项", + "Paint properties": "绘制属性", + "Layout properties": "布局属性", + "General layout properties": "常规布局属性", + "Text layout properties": "文本布局属性", + "Icon layout properties": "图标布局属性", + "Text paint properties": "文本绘制属性", + "Icon paint properties": "图标绘制属性" +}