{"id":17835065,"url":"https://github.com/namesmt/unplugin-sheet-i18n","last_synced_at":"2025-03-19T15:30:18.429Z","repository":{"id":208778185,"uuid":"722468832","full_name":"NamesMT/unplugin-sheet-i18n","owner":"NamesMT","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-19T05:47:12.000Z","size":369,"stargazers_count":5,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-20T11:09:56.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NamesMT.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-23T08:08:25.000Z","updated_at":"2024-09-30T02:40:17.000Z","dependencies_parsed_at":"2024-01-18T10:46:17.448Z","dependency_job_id":"820e44c9-8336-4577-a400-add19e5af2a6","html_url":"https://github.com/NamesMT/unplugin-sheet-i18n","commit_stats":{"total_commits":100,"total_committers":4,"mean_commits":25.0,"dds":"0.41000000000000003","last_synced_commit":"79d70317d281fb1476defa0bb0566622c1b5d63b"},"previous_names":["namesmt/unplugin-sheet-i18n"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamesMT%2Funplugin-sheet-i18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamesMT%2Funplugin-sheet-i18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamesMT%2Funplugin-sheet-i18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NamesMT%2Funplugin-sheet-i18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NamesMT","download_url":"https://codeload.github.com/NamesMT/unplugin-sheet-i18n/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243997127,"owners_count":20380981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T20:16:44.080Z","updated_at":"2025-03-19T15:30:17.900Z","avatar_url":"https://github.com/NamesMT.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unplugin-sheet-i18n ![TypeScript heart icon](https://img.shields.io/badge/♡-%23007ACC.svg?logo=typescript\u0026logoColor=white)\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Codecov][codecov-src]][codecov-href]\n[![Bundlejs][bundlejs-src]][bundlejs-href]\n[![jsDocs.io][jsDocs-src]][jsDocs-href]\n\n**unplugin-sheet-i18n** enables doing your i18n in a [spread]sheet for a better collaborative experience with non-coders and maintainability.\n\n## Features\n- Supports CSV, TSV, DSV, Excel/Spreadsheets (XLS[XMB], ODT), powered by [SheetJS](https://sheetjs.com/) and [papaparse](https://www.papaparse.com/)\n- File-to-file convert: `en.csv -\u003e en.json`\n- File-to-multiple convert: `i18n.csv -\u003e en.json, vi.json, fr.json,...`\n- Output merging: `i18n_a.csv + i18n_b.csv -\u003e en.json`\n- Preserve structure: `a/i18n.csv -\u003e a/en.json | a/i18n/en.json | a/i18n_en.json`\n- File generation: `i18n_files.csv -\u003e cloud_en.json, cloud_fr.json, template_en.html, template_fr.html`\n- And more!\n\n## Usage\n[\u003eSee a few examples usage here\u003c](./playground)\n\n### Install package:\n```sh\n# npm\nnpm install unplugin-sheet-i18n\n\n# yarn\nyarn add unplugin-sheet-i18n\n\n# pnpm (recommended)\npnpm install unplugin-sheet-i18n\n```\n\n### Setup:\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport SheetI18n from 'unplugin-sheet-i18n/vite'\n\nexport default defineConfig({\n  plugins: [\n    SheetI18n({ /* options */ }),\n  ],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rollup.config.js\nimport SheetI18n from 'unplugin-sheet-i18n/rollup'\n\nexport default {\n  plugins: [\n    SheetI18n({ /* options */ }),\n  ],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require('unplugin-sheet-i18n/webpack')({ /* options */ })\n  ]\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNuxt\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// nuxt.config.js\nexport default defineNuxtConfig({\n  modules: [\n    ['unplugin-sheet-i18n/nuxt', { /* options */ }],\n  ],\n})\n```\n\n\u003e This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVue CLI\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vue.config.js\nmodule.exports = {\n  configureWebpack: {\n    plugins: [\n      require('unplugin-sheet-i18n/webpack')({ /* options */ }),\n    ],\n  },\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// esbuild.config.js\nimport { build } from 'esbuild'\nimport SheetI18n from 'unplugin-sheet-i18n/esbuild'\n\nbuild({\n  plugins: [SheetI18n()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eunbuild\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// build.config.ts\nimport { defineBuildConfig } from 'unbuild'\nimport SheetI18n from 'unplugin-sheet-i18n/rollup'\n\nexport default defineBuildConfig({\n  hooks: {\n    'rollup:options': function (ctx, options) {\n      options.plugins = [options.plugins, SheetI18n({\n      })]\n    },\n  },\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eprogrammatic\u003c/summary\u003e\u003cbr\u003e\n\nSee it in action [at `starter-fullstack`](https://github.com/NamesMT/starter-fullstack/blob/main/packages/locales/index.ts)\n\n```ts\n// index.ts\nimport { createContext } from 'unplugin-sheet-i18n'\n\ncreateContext({\n  outDir: 'dist',\n}).scanConvert()\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n### Options:\n[See Options](./src/types.ts)\n\n## Roadmap\n\n- [ ] Add example repos\n- [ ] Add tests\n\n## License\n\n[MIT](./LICENSE) License © 2024 [NamesMT](https://github.com/NamesMT)\n\n[npm-version-src]: https://img.shields.io/npm/v/unplugin-sheet-i18n?labelColor=18181B\u0026color=F0DB4F\n[npm-version-href]: https://npmjs.com/package/unplugin-sheet-i18n\n[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-sheet-i18n?labelColor=18181B\u0026color=F0DB4F\n[npm-downloads-href]: https://npmjs.com/package/unplugin-sheet-i18n\n[codecov-src]: https://img.shields.io/codecov/c/gh/namesmt/unplugin-sheet-i18n/main?labelColor=18181B\u0026color=F0DB4F\n[codecov-href]: https://codecov.io/gh/namesmt/unplugin-sheet-i18n\n[license-src]: https://img.shields.io/github/license/namesmt/unplugin-sheet-i18n.svg?labelColor=18181B\u0026color=F0DB4F\n[license-href]: https://github.com/namesmt/unplugin-sheet-i18n/blob/main/LICENSE\n[bundlejs-src]: https://img.shields.io/bundlejs/size/unplugin-sheet-i18n?labelColor=18181B\u0026color=F0DB4F\n[bundlejs-href]: https://bundlejs.com/?q=unplugin-sheet-i18n\n[jsDocs-src]: https://img.shields.io/badge/Check_out-jsDocs.io---?labelColor=18181B\u0026color=F0DB4F\n[jsDocs-href]: https://www.jsdocs.io/package/unplugin-sheet-i18n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamesmt%2Funplugin-sheet-i18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamesmt%2Funplugin-sheet-i18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamesmt%2Funplugin-sheet-i18n/lists"}