From 4dcf124ce7a20f78d261870db43180392270a36b Mon Sep 17 00:00:00 2001 From: Song Li Date: Mon, 14 Oct 2019 19:59:03 +0800 Subject: [PATCH 1/7] Add zh-CN translation based on ja.js --- lib/locales/zh-cn.js | 62 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 4cc794226fb..49d210177fb 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -11,7 +11,67 @@ module.exports = { moduleType: 'locale', name: 'zh-CN', - dictionary: {}, + dictionary: { + 'Autoscale': '自动缩放', // components/modebar/buttons.js:139 + 'Box Select': '矩形选择', // components/modebar/buttons.js:103 + 'Click to enter Colorscale title': '点击输入色阶的标题', // plots/plots.js:437 + 'Click to enter Component A title': '点击输入组件 A 的标题', // plots/ternary/ternary.js:386 + 'Click to enter Component B title': '点击输入组件 B 的标题', // plots/ternary/ternary.js:400 + 'Click to enter Component C title': '点击输入组件 C 的标题', // plots/ternary/ternary.js:411 + 'Click to enter Plot title': '点击输入图表的标题', // plot_api/plot_api.js:579 + 'Click to enter X axis title': '点击输入 X 轴的标题', // plots/plots.js:435 + 'Click to enter Y axis title': '点击输入 Y 轴的标题', // plots/plots.js:436 + 'Compare data on hover': '悬停时比较数据', // components/modebar/buttons.js:167 + 'Double-click on legend to isolate one trace': '双击图例', // components/legend/handle_click.js:90 + 'Double-click to zoom back out': '双击返回缩小显示', // plots/cartesian/dragbox.js:299 + 'Download plot as a png': '下载图表为 PNG', // components/modebar/buttons.js:52 + 'Download plot': '下载图表', // components/modebar/buttons.js:53 + 'Edit in Chart Studio': '在 Chart Studio 中编辑', // components/modebar/buttons.js:76 + 'IE only supports svg. Changing format to svg.': 'IE 只支持 SVG。转换格式为 SVG。', // components/modebar/buttons.js:60 + 'Lasso Select': '套索选择', // components/modebar/buttons.js:112 + 'Orbital rotation': '轨道旋转', // components/modebar/buttons.js:279 + 'Pan': '扩大', // components/modebar/buttons.js:94 + 'Produced with Plotly': '由 Plotly 生成', // components/modebar/modebar.js:256 + 'Reset': '重置', // components/modebar/buttons.js:432 + 'Reset axes': '重置轴', // components/modebar/buttons.js:148 + 'Reset camera to default': '重置镜头到默认', // components/modebar/buttons.js:314 + 'Reset camera to last save': '重置镜头到最后一次保存', // components/modebar/buttons.js:322 + 'Reset view': '重置视图', // components/modebar/buttons.js:583 + 'Reset views': '重置视图', // components/modebar/buttons.js:529 + 'Show closest data on hover': '悬停时显示最近的数据', // components/modebar/buttons.js:157 + 'Snapshot succeeded': '生成快照成功', // components/modebar/buttons.js:66 + 'Sorry, there was a problem downloading your snapshot!': '对不起,下载快照出现问题!', // components/modebar/buttons.js:69 + 'Taking snapshot - this may take a few seconds': '正在生成快照 - 可能需要几秒钟', // components/modebar/buttons.js:57 + 'Zoom': '缩放', // components/modebar/buttons.js:85 + 'Zoom in': '放大', // components/modebar/buttons.js:121 + 'Zoom out': '缩小', // components/modebar/buttons.js:130 + 'close:': '关:', // traces/ohlc/transform.js:139 + 'trace': '踪迹:', // plots/plots.js:439 + 'lat:': '纬度:', // traces/scattergeo/calc.js:48 + 'lon:': '经度:', // traces/scattergeo/calc.js:49 + 'q1:': '第一四分位数:', // traces/box/calc.js:130 + 'q3:': '第三四分位数:', // traces/box/calc.js:131 + 'source:': '源:', // traces/sankey/plot.js:140 + 'target:': '目标:', // traces/sankey/plot.js:141 + 'lower fence:': 'Fence 的下限:', // traces/box/calc.js:134 + 'upper fence:': 'Fence 的上限:', // traces/box/calc.js:135 + 'max:': '最大:', // traces/box/calc.js:132 + 'mean ± σ:': '平均 ± σ:', // traces/box/calc.js:133 + 'mean:': '平均:', // traces/box/calc.js:133 + 'median:': '中位:', // traces/box/calc.js:128 + 'min:': '最小:', // traces/box/calc.js:129 + 'Turntable rotation': '按轴旋转:', // components/modebar/buttons.js:288 + 'Toggle Spike Lines': '是否显示 Spike Lines', // components/modebar/buttons.js:548 + 'open:': '开:', // traces/ohlc/transform.js:136 + 'high:': '高:', // traces/ohlc/transform.js:137 + 'low:': '低:', // traces/ohlc/transform.js:138 + 'Toggle show closest data on hover': '悬停时是否显示最近的数据', // components/modebar/buttons.js:353 + 'incoming flow count:': '流入数量:', // traces/sankey/plot.js:142 + 'outgoing flow count:': '流出数量:', // traces/sankey/plot.js:143 + 'kde:': 'kde:', // traces/violin/calc.js:73 + 'Click to enter radial axis title': '点击输入放射轴标题', + 'new text': '新建文本' + }, format: { days: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], shortDays: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], From c42004b748583dbdacf9adfb43b3f5c191380396 Mon Sep 17 00:00:00 2001 From: Song Li Date: Fri, 25 Oct 2019 10:22:30 +0800 Subject: [PATCH 2/7] Update lib/locales/zh-cn.js Co-Authored-By: Byron Zhu --- lib/locales/zh-cn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 49d210177fb..36e8094b89b 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -61,7 +61,7 @@ module.exports = { 'median:': '中位:', // traces/box/calc.js:128 'min:': '最小:', // traces/box/calc.js:129 'Turntable rotation': '按轴旋转:', // components/modebar/buttons.js:288 - 'Toggle Spike Lines': '是否显示 Spike Lines', // components/modebar/buttons.js:548 + 'Toggle Spike Lines': '切换显示数据点辅助线(Spike Lines)', 'open:': '开:', // traces/ohlc/transform.js:136 'high:': '高:', // traces/ohlc/transform.js:137 'low:': '低:', // traces/ohlc/transform.js:138 From d49d9932f8d9d955f6c14fea441da90d5549e9d3 Mon Sep 17 00:00:00 2001 From: Song Li Date: Fri, 25 Oct 2019 10:22:41 +0800 Subject: [PATCH 3/7] Update lib/locales/zh-cn.js Co-Authored-By: Byron Zhu --- lib/locales/zh-cn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 36e8094b89b..4cf61c259eb 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -22,7 +22,7 @@ module.exports = { 'Click to enter X axis title': '点击输入 X 轴的标题', // plots/plots.js:435 'Click to enter Y axis title': '点击输入 Y 轴的标题', // plots/plots.js:436 'Compare data on hover': '悬停时比较数据', // components/modebar/buttons.js:167 - 'Double-click on legend to isolate one trace': '双击图例', // components/legend/handle_click.js:90 + 'Double-click on legend to isolate one trace': '双击图例来突显对应轨迹', 'Double-click to zoom back out': '双击返回缩小显示', // plots/cartesian/dragbox.js:299 'Download plot as a png': '下载图表为 PNG', // components/modebar/buttons.js:52 'Download plot': '下载图表', // components/modebar/buttons.js:53 From ba1df11c8c33cef5f74fa5966b15e29115774a3f Mon Sep 17 00:00:00 2001 From: Song Li Date: Fri, 25 Oct 2019 10:24:27 +0800 Subject: [PATCH 4/7] Apply suggestions from code review Co-Authored-By: Byron Zhu --- lib/locales/zh-cn.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 4cf61c259eb..2f0eb2ed0e1 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -13,7 +13,7 @@ module.exports = { name: 'zh-CN', dictionary: { 'Autoscale': '自动缩放', // components/modebar/buttons.js:139 - 'Box Select': '矩形选择', // components/modebar/buttons.js:103 + 'Box Select': '矩形框选', 'Click to enter Colorscale title': '点击输入色阶的标题', // plots/plots.js:437 'Click to enter Component A title': '点击输入组件 A 的标题', // plots/ternary/ternary.js:386 'Click to enter Component B title': '点击输入组件 B 的标题', // plots/ternary/ternary.js:400 @@ -24,23 +24,23 @@ module.exports = { 'Compare data on hover': '悬停时比较数据', // components/modebar/buttons.js:167 'Double-click on legend to isolate one trace': '双击图例来突显对应轨迹', 'Double-click to zoom back out': '双击返回缩小显示', // plots/cartesian/dragbox.js:299 - 'Download plot as a png': '下载图表为 PNG', // components/modebar/buttons.js:52 + 'Download plot as a png': '下载图表为PNG格式', 'Download plot': '下载图表', // components/modebar/buttons.js:53 'Edit in Chart Studio': '在 Chart Studio 中编辑', // components/modebar/buttons.js:76 'IE only supports svg. Changing format to svg.': 'IE 只支持 SVG。转换格式为 SVG。', // components/modebar/buttons.js:60 'Lasso Select': '套索选择', // components/modebar/buttons.js:112 'Orbital rotation': '轨道旋转', // components/modebar/buttons.js:279 - 'Pan': '扩大', // components/modebar/buttons.js:94 + 'Pan': '平移', 'Produced with Plotly': '由 Plotly 生成', // components/modebar/modebar.js:256 'Reset': '重置', // components/modebar/buttons.js:432 'Reset axes': '重置轴', // components/modebar/buttons.js:148 - 'Reset camera to default': '重置镜头到默认', // components/modebar/buttons.js:314 - 'Reset camera to last save': '重置镜头到最后一次保存', // components/modebar/buttons.js:322 + 'Reset camera to default': '重置镜头视角为默认状态', + 'Reset camera to last save': '重置镜头视角为上次保存状态', 'Reset view': '重置视图', // components/modebar/buttons.js:583 'Reset views': '重置视图', // components/modebar/buttons.js:529 'Show closest data on hover': '悬停时显示最近的数据', // components/modebar/buttons.js:157 'Snapshot succeeded': '生成快照成功', // components/modebar/buttons.js:66 - 'Sorry, there was a problem downloading your snapshot!': '对不起,下载快照出现问题!', // components/modebar/buttons.js:69 + 'Sorry, there was a problem downloading your snapshot!': '抱歉,下载快照出现问题!' 'Taking snapshot - this may take a few seconds': '正在生成快照 - 可能需要几秒钟', // components/modebar/buttons.js:57 'Zoom': '缩放', // components/modebar/buttons.js:85 'Zoom in': '放大', // components/modebar/buttons.js:121 @@ -53,23 +53,23 @@ module.exports = { 'q3:': '第三四分位数:', // traces/box/calc.js:131 'source:': '源:', // traces/sankey/plot.js:140 'target:': '目标:', // traces/sankey/plot.js:141 - 'lower fence:': 'Fence 的下限:', // traces/box/calc.js:134 - 'upper fence:': 'Fence 的上限:', // traces/box/calc.js:135 - 'max:': '最大:', // traces/box/calc.js:132 - 'mean ± σ:': '平均 ± σ:', // traces/box/calc.js:133 - 'mean:': '平均:', // traces/box/calc.js:133 - 'median:': '中位:', // traces/box/calc.js:128 - 'min:': '最小:', // traces/box/calc.js:129 - 'Turntable rotation': '按轴旋转:', // components/modebar/buttons.js:288 + 'lower fence:': '内侧栏(lower fence):', + 'upper fence:': '外侧栏(upper fence):', + 'max:': '最大值:', + 'mean ± σ:': '平均数 ± 标准差σ:', + 'mean:': '平均数:', + 'median:': '中位数:', + 'min:': '最小值:', + 'Turntable rotation': '旋转转盘:', 'Toggle Spike Lines': '切换显示数据点辅助线(Spike Lines)', 'open:': '开:', // traces/ohlc/transform.js:136 'high:': '高:', // traces/ohlc/transform.js:137 'low:': '低:', // traces/ohlc/transform.js:138 - 'Toggle show closest data on hover': '悬停时是否显示最近的数据', // components/modebar/buttons.js:353 + 'Toggle show closest data on hover': '切换悬停时显示最近的数据点', 'incoming flow count:': '流入数量:', // traces/sankey/plot.js:142 'outgoing flow count:': '流出数量:', // traces/sankey/plot.js:143 'kde:': 'kde:', // traces/violin/calc.js:73 - 'Click to enter radial axis title': '点击输入放射轴标题', + 'Click to enter radial axis title': '点击输入径向轴标题', 'new text': '新建文本' }, format: { From 418cb84088d30358d90cbc937fd603fc5734ab5d Mon Sep 17 00:00:00 2001 From: Song Li Date: Fri, 25 Oct 2019 10:24:53 +0800 Subject: [PATCH 5/7] Apply suggestions from code review Co-Authored-By: Byron Zhu --- lib/locales/zh-cn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 2f0eb2ed0e1..f9d670e800b 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -45,7 +45,7 @@ module.exports = { 'Zoom': '缩放', // components/modebar/buttons.js:85 'Zoom in': '放大', // components/modebar/buttons.js:121 'Zoom out': '缩小', // components/modebar/buttons.js:130 - 'close:': '关:', // traces/ohlc/transform.js:139 + 'close:': '关闭:', 'trace': '踪迹:', // plots/plots.js:439 'lat:': '纬度:', // traces/scattergeo/calc.js:48 'lon:': '经度:', // traces/scattergeo/calc.js:49 @@ -62,7 +62,7 @@ module.exports = { 'min:': '最小值:', 'Turntable rotation': '旋转转盘:', 'Toggle Spike Lines': '切换显示数据点辅助线(Spike Lines)', - 'open:': '开:', // traces/ohlc/transform.js:136 + 'open:': '打开:', 'high:': '高:', // traces/ohlc/transform.js:137 'low:': '低:', // traces/ohlc/transform.js:138 'Toggle show closest data on hover': '切换悬停时显示最近的数据点', From 4c0c1dd37d08db29f60858da11bba102aab8221c Mon Sep 17 00:00:00 2001 From: Song Li Date: Fri, 25 Oct 2019 10:27:16 +0800 Subject: [PATCH 6/7] Remove spaces in-between --- lib/locales/zh-cn.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index f9d670e800b..621d401f60f 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -15,23 +15,23 @@ module.exports = { 'Autoscale': '自动缩放', // components/modebar/buttons.js:139 'Box Select': '矩形框选', 'Click to enter Colorscale title': '点击输入色阶的标题', // plots/plots.js:437 - 'Click to enter Component A title': '点击输入组件 A 的标题', // plots/ternary/ternary.js:386 - 'Click to enter Component B title': '点击输入组件 B 的标题', // plots/ternary/ternary.js:400 - 'Click to enter Component C title': '点击输入组件 C 的标题', // plots/ternary/ternary.js:411 + 'Click to enter Component A title': '点击输入组件A的标题', // plots/ternary/ternary.js:386 + 'Click to enter Component B title': '点击输入组件B的标题', // plots/ternary/ternary.js:400 + 'Click to enter Component C title': '点击输入组件C的标题', // plots/ternary/ternary.js:411 'Click to enter Plot title': '点击输入图表的标题', // plot_api/plot_api.js:579 - 'Click to enter X axis title': '点击输入 X 轴的标题', // plots/plots.js:435 - 'Click to enter Y axis title': '点击输入 Y 轴的标题', // plots/plots.js:436 + 'Click to enter X axis title': '点击输入X轴的标题', // plots/plots.js:435 + 'Click to enter Y axis title': '点击输入Y轴的标题', // plots/plots.js:436 'Compare data on hover': '悬停时比较数据', // components/modebar/buttons.js:167 'Double-click on legend to isolate one trace': '双击图例来突显对应轨迹', 'Double-click to zoom back out': '双击返回缩小显示', // plots/cartesian/dragbox.js:299 'Download plot as a png': '下载图表为PNG格式', 'Download plot': '下载图表', // components/modebar/buttons.js:53 - 'Edit in Chart Studio': '在 Chart Studio 中编辑', // components/modebar/buttons.js:76 - 'IE only supports svg. Changing format to svg.': 'IE 只支持 SVG。转换格式为 SVG。', // components/modebar/buttons.js:60 + 'Edit in Chart Studio': '在Chart Studio中编辑', // components/modebar/buttons.js:76 + 'IE only supports svg. Changing format to svg.': 'IE只支持SVG。转换格式为SVG。', // components/modebar/buttons.js:60 'Lasso Select': '套索选择', // components/modebar/buttons.js:112 'Orbital rotation': '轨道旋转', // components/modebar/buttons.js:279 'Pan': '平移', - 'Produced with Plotly': '由 Plotly 生成', // components/modebar/modebar.js:256 + 'Produced with Plotly': '由Plotly生成', // components/modebar/modebar.js:256 'Reset': '重置', // components/modebar/buttons.js:432 'Reset axes': '重置轴', // components/modebar/buttons.js:148 'Reset camera to default': '重置镜头视角为默认状态', From 819b5ccbaf642e190c6ec5aab43e17ac64b86714 Mon Sep 17 00:00:00 2001 From: Song Li Date: Sat, 26 Oct 2019 09:12:22 +0800 Subject: [PATCH 7/7] Update zh-cn.js --- lib/locales/zh-cn.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/locales/zh-cn.js b/lib/locales/zh-cn.js index 621d401f60f..7fddf3ef064 100644 --- a/lib/locales/zh-cn.js +++ b/lib/locales/zh-cn.js @@ -40,7 +40,7 @@ module.exports = { 'Reset views': '重置视图', // components/modebar/buttons.js:529 'Show closest data on hover': '悬停时显示最近的数据', // components/modebar/buttons.js:157 'Snapshot succeeded': '生成快照成功', // components/modebar/buttons.js:66 - 'Sorry, there was a problem downloading your snapshot!': '抱歉,下载快照出现问题!' + 'Sorry, there was a problem downloading your snapshot!': '抱歉,下载快照出现问题!', // components/modebar/buttons.js:69 'Taking snapshot - this may take a few seconds': '正在生成快照 - 可能需要几秒钟', // components/modebar/buttons.js:57 'Zoom': '缩放', // components/modebar/buttons.js:85 'Zoom in': '放大', // components/modebar/buttons.js:121