sheet-i18n 1.4.0-canary.5 β†’ 1.4.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.
Files changed (2) hide show
  1. package/README.md +11 -11
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -268,20 +268,20 @@ The `I18nStore` manages type-safe translation states, ensuring consistency acros
268
268
  - **`supportedLocales`**: Array of supported locale strings.
269
269
  - **`defaultLocale`**: The default locale, included in `supportedLocales`.
270
270
  - **`localeSet`**: An object where keys match `supportedLocales`, and values are translation sets.
271
- - **`typeSafe(optional, default = true)`**: An optional boolean indicating whether to use type-safe translations.
271
+ - **`typeSafe(optional, default = false)`**: An optional boolean indicating whether to use type-safe translations.
272
272
 
273
273
  > πŸ’‘ **typeSafe?** <br/>
274
- > I18nStore is type-safe by default. So, basically, you can't add the translation data that is not defined in the locale Json files. However, for fast development, you can off the typeSafe option manually.
274
+ > I18nStore doesn't enforce adherence to your locale JSON definitions by default. This means that you can add translation data even if it isn’t pre-defined in your locale JSON files. However, if you prefer to enforce strict type-safety, you can manually enable the typeSafe option which allows you to notice the auto-completed list in translation data.
275
275
  >
276
276
  > ```tsx
277
- > // typeSafe: false
277
+ > // typeSafe: true
278
278
  > const YourComponent = () => {
279
- > // useTranslation(sheetTitle: string)
279
+ > // "useTranslation" shows the autocompletion suggestions
280
280
  > const { t } = useTranslation('header');
281
281
  >
282
282
  > return (
283
283
  > <div>
284
- > {/* t(key: string): any */}
284
+ > {/* "t" function shows the autocompletion suggestions */}
285
285
  > <button>{t('login')}</button>
286
286
  > </div>
287
287
  > );
@@ -637,17 +637,17 @@ export const i18nStore = new I18nStore({
637
637
  ```
638
638
 
639
639
  > πŸ’‘ **typeSafe?** <br/>
640
- > I18nStore is type-safe by default. So, basically, you can't add the translation data that is not defined in the locale Json files. However, for fast development, you can off the typeSafe option manually.
640
+ > I18nStore doesn't enforce adherence to your locale JSON definitions by default. This means that you can add translation data even if it isn’t pre-defined in your locale JSON files. However, if you prefer to enforce strict type-safety, you can manually enable the typeSafe option which allows you to notice the auto-completed list in translation data.
641
641
  >
642
642
  > ```tsx
643
- > // typeSafe: false
643
+ > // typeSafe: true
644
644
  > const YourComponent = () => {
645
- > // can accept any string sheet title.
645
+ > // "useTranslation" shows the autocompletion suggestions
646
646
  > const { t } = useTranslation('header');
647
647
  >
648
648
  > return (
649
649
  > <div>
650
- > {/* "t" function will accept and return any string */}
650
+ > {/* "t" function shows the autocompletion suggestions */}
651
651
  > <button>{t('login')}</button>
652
652
  > </div>
653
653
  > );
@@ -877,10 +877,10 @@ sheet-i18n register --scope total
877
877
 
878
878
  </br>
879
879
 
880
- ### πŸ“„ export
880
+ ### πŸ“„ import
881
881
 
882
882
  ```shell
883
- npx sheet-i18n export
883
+ npx sheet-i18n import
884
884
  ```
885
885
 
886
886
  Exports translation data from Google Sheets to local export directory.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sheet-i18n",
3
- "version": "1.4.0-canary.5",
3
+ "version": "1.4.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/chltjdrhd777/sheet-i18n"
@@ -36,13 +36,13 @@
36
36
  },
37
37
  "license": "ISC",
38
38
  "dependencies": {
39
- "@sheet-i18n/importer": "1.4.0-canary.3",
40
- "@sheet-i18n/react": "1.1.0-canary.5"
39
+ "@sheet-i18n/react": "1.1.0",
40
+ "@sheet-i18n/importer": "1.4.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "tsup": "^6.0.0",
44
44
  "typescript": "^5.0.0",
45
- "@sheet-i18n/typescript-config": "1.4.0-canary.3"
45
+ "@sheet-i18n/typescript-config": "1.4.0"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "tsup",