- l10n: Add Chinese (simplified) extension locales (Thanks, @enlove!)

- Linting (ESLint): Avoid reporting `no-console`
- Refactoring: Avoid Firefox console errors with hidden iframe
- Docs (CHANGES): Fix Markdown heading level
master
Brett Zamir 2018-11-30 18:27:22 +08:00
parent c6d07fbb7c
commit 17bc78fa3f
21 changed files with 255 additions and 5 deletions

View File

@ -144,6 +144,7 @@ module.exports = {
complexity: ["off"],
"default-case": ["off"],
"require-unicode-regexp": ["off"],
"no-console": ["off"],
"no-magic-numbers": ["off"],
"no-warning-comments": ["off"],
"max-len": ["off", {

View File

@ -1,6 +1,12 @@
# SVG-Edit CHANGES
# 4.1.0
# ?
- l10n: Add Chinese (simplified) extension locales (Thanks, @enlove!)
- Linting (ESLint): Avoid reporting `no-console`
- Refactoring: Avoid Firefox console errors with hidden iframe
## 4.1.0
- Fix: Avoid cross-frame unsafe `instanceof`
- Enhancement: Add svgcanvas distributions
@ -10,12 +16,12 @@
`startsWith`/`endsWith`, no fn ref in iterator
- npm: Update devDeps
# 4.0.1
## 4.0.1
- Fix: Adjust side panel width checking based on device zoom (fixes #298)
- Fix (regression): RGBColor
# 4.0.0
## 4.0.0
- Breaking change (storage preference cookies): Namespace the cookie as
"svgeditstore" instead of just "store"

View File

@ -0,0 +1,19 @@
export default {
name: '箭头',
langList: [
{id: 'arrow_none', textContent: '无箭头'}
],
contextTools: [
{
title: '选择箭头类型',
options: {
none: '无箭头',
end: '---->',
start: '<----',
both: '<--->',
mid: '-->--',
mid_bk: '--<--'
}
}
]
};

View File

@ -0,0 +1,11 @@
export default {
name: '闭合路径',
buttons: [
{
title: '打开路径'
},
{
title: '关闭路径'
}
]
};

View File

@ -0,0 +1,11 @@
export default {
name: '连接器',
langList: [
{id: 'mode_connect', title: '连接两个对象'}
],
buttons: [
{
title: '连接两个对象'
}
]
};

View File

@ -0,0 +1,9 @@
export default {
name: '滴管',
buttons: [
{
title: '滴管工具',
key: 'I'
}
]
};

View File

@ -0,0 +1,25 @@
export default {
name: '外部对象',
buttons: [
{
title: '外部对象工具'
},
{
title: '编辑外部对象内容'
}
],
contextTools: [
{
title: '改变外部对象宽度',
label: 'w'
},
{
title: '改变外部对象高度',
label: 'h'
},
{
title: '改变外部对象文字大小',
label: '文字大小'
}
]
};

View File

@ -0,0 +1,8 @@
export default {
name: '网格视图',
buttons: [
{
title: '显示/隐藏网格'
}
]
};

View File

@ -0,0 +1,9 @@
export default {
name: 'Hello World',
text: 'Hello World!\n\n 请点击: {x}, {y}',
buttons: [
{
title: "输出 'Hello World'"
}
]
};

View File

@ -0,0 +1,46 @@
export default {
name: '标记',
langList: [
{id: 'nomarker', title: '无标记'},
{id: 'leftarrow', title: '左箭头'},
{id: 'rightarrow', title: '右箭头'},
{id: 'textmarker', title: '文本'},
{id: 'forwardslash', title: '斜杠'},
{id: 'reverseslash', title: '反斜杠'},
{id: 'verticalslash', title: '垂直线'},
{id: 'box', title: '方块'},
{id: 'star', title: '星形'},
{id: 'xmark', title: 'X'},
{id: 'triangle', title: '三角形'},
{id: 'mcircle', title: '圆形'},
{id: 'leftarrow_o', title: '左箭头(空心)'},
{id: 'rightarrow_o', title: '右箭头(空心)'},
{id: 'box_o', title: '方块(空心)'},
{id: 'star_o', title: '星形(空心)'},
{id: 'triangle_o', title: '三角形(空心)'},
{id: 'mcircle_o', title: '圆形(空心)'}
],
contextTools: [
{
title: '起始标记',
label: 's'
},
{
title: '选择起始标记类型'
},
{
title: '中段标记',
label: 'm'
},
{
title: '选择中段标记类型'
},
{
title: '末端标记',
label: 'e'
},
{
title: '选择末端标记类型'
}
]
};

View File

@ -0,0 +1,8 @@
export default {
name: '数学',
buttons: [
{
title: '添加数学计算'
}
]
};

View File

@ -0,0 +1,8 @@
export default {
name: '移动',
buttons: [
{
title: '移动'
}
]
};

View File

@ -0,0 +1,14 @@
export default {
name: '多边形',
buttons: [
{
title: '多边形工具'
}
],
contextTools: [
{
title: '边数',
label: '边数'
}
]
};

View File

@ -0,0 +1,3 @@
export default {
saved: '已保存! 返回视图!'
};

View File

@ -0,0 +1,3 @@
export default {
uploading: '正在上传...'
};

View File

@ -0,0 +1,24 @@
export default {
loading: '正在加载...',
categories: {
basic: '基本',
object: '对象',
symbol: '符号',
arrow: '箭头',
flowchart: '工作流',
animal: '动物',
game: '棋牌',
dialog_balloon: '会话框',
electronics: '电子',
math: '数学',
music: '音乐',
misc: '其他',
raphael_1: 'raphaeljs.com 集合 1',
raphael_2: 'raphaeljs.com 集合 2'
},
buttons: [
{
title: '图元库'
}
]
};

View File

@ -0,0 +1,22 @@
export default {
name: '星形',
buttons: [
{
title: '星形工具'
}
],
contextTools: [
{
title: '顶点',
label: '顶点'
},
{
title: '钝度',
label: '钝度'
},
{
title: '径向',
label: '径向'
}
]
};

View File

@ -0,0 +1,11 @@
export default {
message: '默认情况下, SVG-Edit 在本地保存配置参数和画布内容. 如果基于隐私考虑, ' +
'您可以勾选以下选项修改配置.',
storagePrefsAndContent: '本地存储配置参数和SVG图',
storagePrefsOnly: '本地只存储配置参数',
storagePrefs: '本地存储配置参数',
storageNoPrefsOrContent: '本地不保存配置参数和SVG图',
storageNoPrefs: '本地不保存配置参数',
rememberLabel: '记住选择?',
rememberTooltip: '如果您勾选记住选择,将不再弹出本窗口.'
};

View File

@ -0,0 +1,8 @@
export default {
name: 'WebAppFind',
buttons: [
{
title: '保存图片到磁盘'
}
]
};

View File

@ -18,7 +18,9 @@ export default {
const saveSvgAction = '/+modify';
// Create upload target (hidden iframe)
/* const target = */ $('<iframe name="output_frame" src="#"/>').hide().appendTo('body');
// Hiding by size instead of display to avoid FF console errors
// with `getBBox` in browser.js `supportsPathBBox_`)
/* const target = */ $('<iframe name="output_frame" style="width: 0; height: 0;" src="#"/>').appendTo('body');
svgEditor.setCustomHandlers({
async save (win, data) {

View File

@ -59,7 +59,9 @@ export default {
let cancelled = false;
$('<iframe name="output_frame" src="#"/>').hide().appendTo('body');
// Hiding by size instead of display to avoid FF console errors
// with `getBBox` in browser.js `supportsPathBBox_`)
$('<iframe name="output_frame" style="width: 0; height: 0;" src="#"/>').appendTo('body');
svgEditor.setCustomHandlers({
save (win, data) {
const svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data, // Firefox doesn't seem to know it is UTF-8 (no matter whether we use or skip the clientDownload code) despite the Content-Disposition header containing UTF-8, but adding the encoding works