kotori 5.0.11 → 5.0.12
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 +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
🕊️ Kotori is a zero-config, fully type-safe, and modular internationalization library for React that compiles down to just 0.28kB. No JSON, no external CLI tools, no codegen—just live type inference from your strings.
|
|
15
15
|
</p>
|
|
16
16
|
|
|
17
|
+
## Note
|
|
18
|
+
|
|
19
|
+
⚠️ Doesn't work with React Compiler!!
|
|
20
|
+
|
|
17
21
|
```ts
|
|
18
22
|
const { dict, t } = kotori({
|
|
19
23
|
primaryLanguageTag: 'en',
|
|
@@ -227,8 +231,8 @@ kotori uses [BCP 47](https://www.iana.org/assignments/language-subtag-registry/l
|
|
|
227
231
|
|
|
228
232
|
## Tips
|
|
229
233
|
|
|
230
|
-
- If you plan to add new languages frequently, consider colocating all your dicts in a single file. It is easier to copy the entire file and hand it to an AI to translate.
|
|
231
|
-
- If your supported languages are fixed, consider splitting dicts by page or component. Translations stay close to the code that uses them and are easier to maintain.
|
|
234
|
+
- If you plan to add new languages frequently, consider colocating all your dicts in a single file or multiple files in one folder. It is easier to copy the entire file and hand it to an AI to translate.
|
|
235
|
+
- If your supported languages are fixed, consider splitting dicts by page or component. Translations stay close to the code that uses them and are easier to maintain.
|
|
232
236
|
- Both approaches are tree-shakeable — only the dicts imported by the current page are included in its bundle.
|
|
233
237
|
|
|
234
238
|
## Roadmap
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kotori",
|
|
3
3
|
"description": "0.28kB Strongly-typed and tree-shakeable internationalization library for React",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.12",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"setup": "rm -rf node_modules && npm i && git init && husky",
|
|
7
7
|
"prepublishOnly": "npm i && npx tsc && npm run build",
|