1.0.2 • Published 12 months ago

excel-to-js-google-spreadsheet v1.0.2

Weekly downloads
51
License
MIT
Repository
github
Last release
12 months ago

google-spreadsheet-to-js

多國語系檔案生成

根據 i18n-to-js.config 配置檔案 mdoe 直選擇不同轉換方式 擷取google sheet excel 並 轉換成key:value 的js檔案

i18n-to-js.config.js 專案下建立此檔案
const path = require("path");
module.exports = {
  mode: "LOCAL",
  excelProjectToken: "",
  useApiKey: "",
  sheet: [],
  distFolder: "src/i18n/lang", // 檔案輸出資料夾
  sourceFilePath: "src/i19n/xxx.xlsx",
};
keydescription
modeLOCAL: 讀取本地EXCEL , GOOGLE_SHEET: 使用google api
excelProjectToken專案的token
useApiKeygoogleapi key
sheet選擇excel 表內sheet
distFolder登出
sourceFilePath讀取的EXCEL路徑

excel 表格長這樣

keyzh-CNen
login登入LOGIN
logout登出LOGOUT

會生成下面兩檔案 =>

zh-CN.js

export default { login: '登入', logout: '登出', };

en.js

export default { login: 'LOGIN', logout: 'LOGOUT', };

1.0.2

12 months ago

1.0.1

12 months ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago