1.25.5 • Published 4 months ago

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

Weekly downloads
51
License
MIT
Repository
github
Last release
4 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 表格長這樣

keystructurezh-CNen
loginlogin登入LOGIN
logoutlogin登出LOGOUT
nameuser.columns名稱LOGOUT

structure 能夠細分多層結構

會生成下面兩檔案 =>

zh-CN.js

export default { login: { login: '登入', logout: '登出', }, user: { columns: {name: '名稱'} } };

en.js

export default { login: { login: 'LOGIN', logout: 'LOGOUT', }, user: { columns: {name: 'Name'} } };

1.25.5

4 months ago

1.25.0

4 months ago

1.25.1

4 months ago

1.25.4

4 months ago

1.25.2

4 months ago

1.25.3

4 months ago

1.0.2

2 years ago

1.0.1

2 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.3

5 years ago

0.0.4

5 years ago

0.0.2

5 years ago