diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..fc4b0b0 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,97 @@ +JsonExcelTableSwitcher
\ No newline at end of file diff --git a/readme.md b/readme.md index f78350d..b99e63a 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,15 @@ +### json-excel-table-switcher + +json to table, table to json, upload excel to json, + +for example: +When translating in multiple languages, it is usually necessary to copy the copy key values and Chinese related explanations and provide them in an Excel file; However, multiple languages in the project are stored in JSON format, +Converting to an Excel spreadsheet is very tedious and requires copying key values one by one, which is very inefficient. Converting JSON to an HTML table and copying the data from the HTML table can be done in Excel, and vice versa, extracting JSON from Excel is also very efficient. + +在多语言进行翻译的时候,通常需要把文案key值和中文相关的解释拷贝出来,提供到excel文件中去;然而项目中多语言是用json格式储存的, +在转化到excel表格中去非常繁琐,需要一个个键值拷贝,效率非常底下,json转换成html 表格再复制html表格中的数据,就可以拷贝到excel中去了,反之也可以excel提取json,非常高效。 + ### how to use? open dist/index.html with a browser or npm i && npm run dev to use dev server - - -### diff --git a/src/lang/cn/index.ts b/src/lang/cn/index.ts index 7f43780..ddfb30d 100644 --- a/src/lang/cn/index.ts +++ b/src/lang/cn/index.ts @@ -6,7 +6,7 @@ export default { btnCopyInput: "复制输入框内容", btnCopyTable: "复制表格内容", inputLabelTip: "请输入内容:", - inputTextTip: "请输入JSON或JS对象字符串,不需要输入最外面的小括号{}, 如:aaa: 111", + inputTextTip: "请输入JSON或JS对象字符串,不需要输入最外面的小括号, 如:aaa: 111", selectLangTip: "请选择语言", selectSheet: "选择sheet:", selectColAsKey: "选择列数作为key:", diff --git a/src/lang/en/index.ts b/src/lang/en/index.ts index cad6a6c..2a3ccdd 100644 --- a/src/lang/en/index.ts +++ b/src/lang/en/index.ts @@ -6,7 +6,7 @@ export default { btnCopyInput: "Copy input box content", btnCopyTable: "Copy table content", inputLabelTip: "Please enter the following content:", - inputTextTip: "Please enter a JSON or JS object string without the outermost parentheses {}, for example: aaa: 111", + inputTextTip: "Please enter a JSON or JS object string without the outermost parentheses, for example: aaa: 111", selectLangTip: "please select language", selectSheet: "Select sheet:", selectColAsKey: "Select the number of columns as the key:", diff --git a/src/lang/index.ts b/src/lang/index.ts index 68ae63d..757c5c9 100644 --- a/src/lang/index.ts +++ b/src/lang/index.ts @@ -9,8 +9,8 @@ const messages = { const i18n = createI18n({ legacy: true, // VUE3 组合式API - locale: 'cn', // 默认cn语言环境 - fallbackLocale: 'en', //备用语言环境 + locale: 'en', // 默认cn语言环境 + fallbackLocale: 'cn', //备用语言环境 messages })