gt-i18n 0.7.6 → 0.7.8
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/CHANGELOG.md +14 -0
- package/dist/fallbacks.d.ts +3 -3
- package/dist/index.d.ts +1 -12
- package/dist/internal.d.ts +1 -1
- package/dist/translation-functions/types/functions.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# gt-i18n
|
|
2
2
|
|
|
3
|
+
## 0.7.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`9d2349c`](https://github.com/generaltranslation/gt/commit/9d2349cfc41862d9e3d8364659b678055b9fa290), [`df6bea8`](https://github.com/generaltranslation/gt/commit/df6bea819a4274018d6d99c7d3e00e7c5372ccbc)]:
|
|
8
|
+
- generaltranslation@8.2.0
|
|
9
|
+
- @generaltranslation/supported-locales@2.0.58
|
|
10
|
+
|
|
11
|
+
## 0.7.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#1154](https://github.com/generaltranslation/gt/pull/1154) [`10a0f2e`](https://github.com/generaltranslation/gt/commit/10a0f2ef28003c2767129ba8ba88a61f8d6c3f04) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Restore `GTFunctionType` return type to `string`
|
|
16
|
+
|
|
3
17
|
## 0.7.6
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/fallbacks.d.ts
CHANGED
|
@@ -21,13 +21,13 @@ type InlineTranslationOptions = BaseTranslationOptions & {
|
|
|
21
21
|
* Synchronous resolution function type
|
|
22
22
|
* @param {string} message - The message to translate.
|
|
23
23
|
* @param {InlineTranslationOptions} options - The options for the translation.
|
|
24
|
-
* @returns {string
|
|
24
|
+
* @returns {string} The translated message.
|
|
25
25
|
*
|
|
26
26
|
* @important This is base type for user API
|
|
27
27
|
*
|
|
28
28
|
* TODO: next major version, this should be <T extends string | null | undefined>(message: T, options?: InlineTranslationOptions) => T extends string ? string : T;
|
|
29
29
|
*/
|
|
30
|
-
type
|
|
30
|
+
type SyncResolutionFunctionWithFallback = (message: string, options?: InlineTranslationOptions) => string;
|
|
31
31
|
/**
|
|
32
32
|
* Type for the gt() function
|
|
33
33
|
* @param {string} message - The message to translate
|
|
@@ -35,7 +35,7 @@ type SyncResolutionFunction = (message: string, options?: InlineTranslationOptio
|
|
|
35
35
|
* @returns {string} The translated message
|
|
36
36
|
* TODO: next major version, remove the "...type" suffix, it's redundant
|
|
37
37
|
*/
|
|
38
|
-
type GTFunctionType =
|
|
38
|
+
type GTFunctionType = SyncResolutionFunctionWithFallback;
|
|
39
39
|
/**
|
|
40
40
|
* Type for the m() function
|
|
41
41
|
* @param {string | null | undefined} encodedMsg - The encoded message to decode and interpolate.
|
package/dist/index.d.ts
CHANGED
|
@@ -18,17 +18,6 @@ type InlineTranslationOptions = BaseTranslationOptions & {
|
|
|
18
18
|
$_source?: string;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* Synchronous resolution function type
|
|
23
|
-
* @param {string} message - The message to translate.
|
|
24
|
-
* @param {InlineTranslationOptions} options - The options for the translation.
|
|
25
|
-
* @returns {string | undefined} The translated message or undefined if the message is not found.
|
|
26
|
-
*
|
|
27
|
-
* @important This is base type for user API
|
|
28
|
-
*
|
|
29
|
-
* TODO: next major version, this should be <T extends string | null | undefined>(message: T, options?: InlineTranslationOptions) => T extends string ? string : T;
|
|
30
|
-
*/
|
|
31
|
-
type SyncResolutionFunction = (message: string, options?: InlineTranslationOptions) => string | undefined;
|
|
32
21
|
/**
|
|
33
22
|
* Synchronous resolution function type
|
|
34
23
|
* @param {string} message - The message to translate.
|
|
@@ -47,7 +36,7 @@ type SyncResolutionFunctionWithFallback = (message: string, options?: InlineTran
|
|
|
47
36
|
* @returns {string} The translated message
|
|
48
37
|
* TODO: next major version, remove the "...type" suffix, it's redundant
|
|
49
38
|
*/
|
|
50
|
-
type GTFunctionType =
|
|
39
|
+
type GTFunctionType = SyncResolutionFunctionWithFallback;
|
|
51
40
|
/**
|
|
52
41
|
* Type for the m() function
|
|
53
42
|
* @param {string | null | undefined} encodedMsg - The encoded message to decode and interpolate.
|
package/dist/internal.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ type SyncResolutionFunctionWithFallback = (message: string, options?: InlineTran
|
|
|
55
55
|
* @returns {string} The translated message
|
|
56
56
|
* TODO: next major version, remove the "...type" suffix, it's redundant
|
|
57
57
|
*/
|
|
58
|
-
type GTFunctionType =
|
|
58
|
+
type GTFunctionType = SyncResolutionFunctionWithFallback;
|
|
59
59
|
/**
|
|
60
60
|
* Type for the m() function
|
|
61
61
|
* @param {string | null | undefined} encodedMsg - The encoded message to decode and interpolate.
|
|
@@ -28,7 +28,7 @@ export type SyncResolutionFunctionWithFallback = (message: string, options?: Inl
|
|
|
28
28
|
* @returns {string} The translated message
|
|
29
29
|
* TODO: next major version, remove the "...type" suffix, it's redundant
|
|
30
30
|
*/
|
|
31
|
-
export type GTFunctionType =
|
|
31
|
+
export type GTFunctionType = SyncResolutionFunctionWithFallback;
|
|
32
32
|
/**
|
|
33
33
|
* Type for the m() function
|
|
34
34
|
* @param {string | null | undefined} encodedMsg - The encoded message to decode and interpolate.
|
package/dist/types.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ type SyncResolutionFunctionWithFallback = (message: string, options?: InlineTran
|
|
|
70
70
|
* @returns {string} The translated message
|
|
71
71
|
* TODO: next major version, remove the "...type" suffix, it's redundant
|
|
72
72
|
*/
|
|
73
|
-
type GTFunctionType =
|
|
73
|
+
type GTFunctionType = SyncResolutionFunctionWithFallback;
|
|
74
74
|
/**
|
|
75
75
|
* Type for the m() function
|
|
76
76
|
* @param {string | null | undefined} encodedMsg - The encoded message to decode and interpolate.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gt-i18n",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "Pure JS i18n library for General Translation",
|
|
5
5
|
"main": "dist/index.cjs.min.cjs",
|
|
6
6
|
"module": "dist/index.esm.min.mjs",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"definition": "dist/index.d.ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@generaltranslation/supported-locales": "2.0.
|
|
49
|
-
"generaltranslation": "8.
|
|
48
|
+
"@generaltranslation/supported-locales": "2.0.58",
|
|
49
|
+
"generaltranslation": "8.2.0"
|
|
50
50
|
},
|
|
51
51
|
"exports": {
|
|
52
52
|
".": {
|