kotori 3.0.3 → 3.0.5
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 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,16 +26,16 @@ const intro = dict({
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
// ✅ Works
|
|
29
|
-
t(
|
|
29
|
+
t(intro, { name: 'John', time: '12:25' })
|
|
30
30
|
|
|
31
31
|
// ❌ TypeScript error: missing { name }
|
|
32
|
-
t(
|
|
32
|
+
t(intro, { time: '12:25' })
|
|
33
33
|
|
|
34
34
|
// ❌ TypeScript error: unknown key 'nama'
|
|
35
|
-
t(
|
|
35
|
+
t(intro, { nama: 'John', time: '12:25' })
|
|
36
36
|
|
|
37
37
|
// ❌ TypeScript error: invalid format for 'time'
|
|
38
|
-
t(
|
|
38
|
+
t(intro, { name: 'John', time: '12-00' })
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
- No codegen
|
|
@@ -162,7 +162,7 @@ export const Page2 = () => {
|
|
|
162
162
|
|
|
163
163
|

|
|
164
164
|
|
|
165
|
-
### `kotori(
|
|
165
|
+
### `kotori(options)`
|
|
166
166
|
|
|
167
167
|
Creates a scoped i18n instance.
|
|
168
168
|
|
|
@@ -182,7 +182,7 @@ export const { useT, dict, setLanguage } = kotori({
|
|
|
182
182
|
|
|
183
183
|
Returns `{ dict, useT, setLanguage }`.
|
|
184
184
|
|
|
185
|
-
### `dict(
|
|
185
|
+
### `dict(translations)<argsType?>`
|
|
186
186
|
|
|
187
187
|
Defines a translation unit. Takes one string per language.
|
|
188
188
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kotori",
|
|
3
3
|
"description": "Strongly-typed and composable internationalization library for React",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.5",
|
|
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",
|