sheet-i18n 1.8.0-canary.9 β 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/dist/index.d.ts +1 -0
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -670,7 +670,7 @@ This will automatically generate:
|
|
|
670
670
|
- A preconfigured `i18nStore` using `@sheet-i18n/react`
|
|
671
671
|
- A ready-to-use `i18nContext.ts` that exports `IntlProvider`, `useTranslation`, and `getTranslation`
|
|
672
672
|
- Example locale JSON files (e.g., `en.json`, `ko.json`)
|
|
673
|
-
- The `sheet.config.
|
|
673
|
+
- The `sheet.config.ts` file for managing your CLI behavior and Google Sheets credentials
|
|
674
674
|
|
|
675
675
|
> π‘ All files will be created in the recommended structure (e.g. `src/i18n`, `src/locales`), and safely skipped if they already exist.
|
|
676
676
|
|
|
@@ -680,7 +680,7 @@ This will automatically generate:
|
|
|
680
680
|
|
|
681
681
|
- You donβt need to manually initiate `I18nStore` or set up the React context.
|
|
682
682
|
- You donβt need to manually prepare locale JSON templates.
|
|
683
|
-
- You donβt need to manually configure `sheet.config.
|
|
683
|
+
- You donβt need to manually configure `sheet.config.ts`.
|
|
684
684
|
|
|
685
685
|
Just run the init command and youβre ready to use `useTranslation()` in your components.
|
|
686
686
|
|
|
@@ -690,8 +690,8 @@ Just run the init command and youβre ready to use `useTranslation()` in your c
|
|
|
690
690
|
|
|
691
691
|
```bash
|
|
692
692
|
π¦ your-project/
|
|
693
|
-
βββ π .gitignore # Automatically appends 'sheet.config.
|
|
694
|
-
βββ π sheet.config.
|
|
693
|
+
βββ π .gitignore # Automatically appends 'sheet.config.ts' to ignore list
|
|
694
|
+
βββ π sheet.config.ts # CLI configuration file (contains Google Sheet credentials & options)
|
|
695
695
|
βββ π src/
|
|
696
696
|
βββ π i18n/
|
|
697
697
|
βββ π i18nContext.ts # React context for IntlProvider, useTranslation, and getTranslation
|
|
@@ -701,7 +701,7 @@ Just run the init command and youβre ready to use `useTranslation()` in your c
|
|
|
701
701
|
```
|
|
702
702
|
|
|
703
703
|
β
The CLI automatically creates this structure after running `npx sheet-i18n init`.
|
|
704
|
-
π‘οΈ If `sheet.config.
|
|
704
|
+
π‘οΈ If `sheet.config.ts` or `src/i18n` already exist, the CLI will skip the creation of these files.
|
|
705
705
|
|
|
706
706
|
after running `npx sheet-i18n init`, you can mount the IntlProvider in your app.
|
|
707
707
|
|
|
@@ -745,11 +745,11 @@ const YourComponent = () => {
|
|
|
745
745
|
|
|
746
746
|
your translations are now ready to use in your application.
|
|
747
747
|
|
|
748
|
-
### βοΈ sheet.config.
|
|
748
|
+
### βοΈ sheet.config.ts
|
|
749
749
|
|
|
750
|
-
The CLI requires a `sheet.config.
|
|
750
|
+
The CLI requires a `sheet.config.ts` file in the root of your project. Run `sheet-i18n init` to generate this file automatically.
|
|
751
751
|
|
|
752
|
-
Example `sheet.config.
|
|
752
|
+
Example `sheet.config.ts`:
|
|
753
753
|
|
|
754
754
|
```json
|
|
755
755
|
{
|
|
@@ -806,7 +806,7 @@ Example `sheet.config.json`:
|
|
|
806
806
|
npx sheet-i18n init
|
|
807
807
|
```
|
|
808
808
|
|
|
809
|
-
Sets up the `sheet.config.
|
|
809
|
+
Sets up the `sheet.config.ts` file in your project. This configuration file is required for all other commands.
|
|
810
810
|
|
|
811
811
|
</br>
|
|
812
812
|
|
|
@@ -876,7 +876,7 @@ Registers translation data to Google Sheets.
|
|
|
876
876
|
|
|
877
877
|
2. It updates rows and adds "translation" entries using the `GOOGLETRANSLATE` function supported by Google Spreadsheets for automated translations.
|
|
878
878
|
|
|
879
|
-
3. After registering, it asks whether you want to update the locale JSON data locally. It then exports the JSON data to the `importPath` specified in `sheet.config.
|
|
879
|
+
3. After registering, it asks whether you want to update the locale JSON data locally. It then exports the JSON data to the `importPath` specified in `sheet.config.ts` (default is the current working directory).
|
|
880
880
|
|
|
881
881
|
#### Options:
|
|
882
882
|
|
|
@@ -943,7 +943,7 @@ npx sheet-i18n import
|
|
|
943
943
|
```
|
|
944
944
|
|
|
945
945
|
Exports translation data from Google Sheets to local export directory.
|
|
946
|
-
The configuration of export command is based on **`sheet.config.
|
|
946
|
+
The configuration of export command is based on **`sheet.config.ts`** on your root.
|
|
947
947
|
|
|
948
948
|
```json
|
|
949
949
|
{
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sheet-i18n",
|
|
3
3
|
"description": "All-in-one i18n toolchain: seamlessly integrate Google Sheets, CLI, and react-i18n for easy translation workflows.",
|
|
4
|
-
"version": "1.8.0
|
|
4
|
+
"version": "1.8.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/chltjdrhd777/sheet-i18n"
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"dist/**/*"
|
|
14
14
|
],
|
|
15
15
|
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"require": "./dist/index.js"
|
|
20
|
+
},
|
|
16
21
|
"./importer": {
|
|
17
22
|
"require": "./dist/importer/index.js",
|
|
18
23
|
"import": "./dist/importer/index.mjs",
|
|
@@ -45,16 +50,18 @@
|
|
|
45
50
|
"license": "ISC",
|
|
46
51
|
"homepage": "https://github.com/chltjdrhd777/sheet-i18n",
|
|
47
52
|
"dependencies": {
|
|
48
|
-
"@sheet-i18n/
|
|
49
|
-
"@sheet-i18n/
|
|
53
|
+
"@sheet-i18n/importer": "1.8.0",
|
|
54
|
+
"@sheet-i18n/typescript": "0.2.0",
|
|
55
|
+
"@sheet-i18n/react": "1.5.0"
|
|
50
56
|
},
|
|
51
57
|
"devDependencies": {
|
|
52
58
|
"tsup": "^6.0.0",
|
|
53
59
|
"typescript": "^5.0.0",
|
|
54
|
-
"@sheet-i18n/typescript-config": "1.8.0
|
|
60
|
+
"@sheet-i18n/typescript-config": "1.8.0"
|
|
55
61
|
},
|
|
56
62
|
"scripts": {
|
|
57
63
|
"build": "tsup",
|
|
58
|
-
"dev": "tsup --watch"
|
|
64
|
+
"dev": "tsup --watch",
|
|
65
|
+
"typecheck": "npx tsc --noEmit"
|
|
59
66
|
}
|
|
60
67
|
}
|