gt-react 10.12.1 → 10.14.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/CHANGELOG.md +26 -0
- package/dist/browser-types.d.ts +5 -62
- package/dist/browser-types.d.ts.map +1 -1
- package/dist/browser.cjs.min.cjs +2 -2
- package/dist/browser.cjs.min.cjs.map +1 -1
- package/dist/browser.d.ts +6 -126
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.esm.min.mjs +5 -5
- package/dist/browser.esm.min.mjs.map +1 -1
- package/dist/client.cjs.min.cjs +1 -1
- package/dist/client.cjs.min.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.esm.min.mjs +2 -2
- package/dist/client.esm.min.mjs.map +1 -1
- package/dist/i18n-context/functions/translation/t.d.ts +5 -2
- package/dist/i18n-context/functions/translation/t.d.ts.map +1 -1
- package/dist/i18n-context/functions/translation/types.d.ts +21 -0
- package/dist/i18n-context/functions/translation/types.d.ts.map +1 -0
- package/dist/i18n-context/functions/versionId.d.ts +10 -0
- package/dist/i18n-context/functions/versionId.d.ts.map +1 -0
- package/dist/index.cjs.min.cjs +5 -5
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.min.mjs +1 -1
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/internal.cjs.min.cjs +1 -1
- package/dist/internal.cjs.min.cjs.map +1 -1
- package/dist/internal.esm.min.mjs +1 -1
- package/dist/internal.esm.min.mjs.map +1 -1
- package/dist/macros.cjs.min.cjs +19 -0
- package/dist/macros.cjs.min.cjs.map +1 -0
- package/dist/macros.d.ts +22 -0
- package/dist/macros.d.ts.map +1 -0
- package/dist/macros.esm.min.mjs +19 -0
- package/dist/macros.esm.min.mjs.map +1 -0
- package/dist/react-context/provider/ClientProvider.d.ts.map +1 -1
- package/dist/shared/messages.d.ts +1 -1
- package/dist/shared/messages.d.ts.map +1 -1
- package/package.json +16 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# gt-react
|
|
2
2
|
|
|
3
|
+
## 10.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1121](https://github.com/generaltranslation/gt/pull/1121) [`b6a58de`](https://github.com/generaltranslation/gt/commit/b6a58de76998b28ce3247aa1a7005fffaeb210a5) Thanks [@pie575](https://github.com/pie575)! - Added a versionId hook for users to better access what Version their GT translations are on
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`b6a58de`](https://github.com/generaltranslation/gt/commit/b6a58de76998b28ce3247aa1a7005fffaeb210a5), [`6d516a7`](https://github.com/generaltranslation/gt/commit/6d516a784f1192f7758689fcf4557e8a19de740a)]:
|
|
12
|
+
- @generaltranslation/react-core@1.6.0
|
|
13
|
+
- gt-i18n@0.7.0
|
|
14
|
+
- generaltranslation@8.1.18
|
|
15
|
+
- @generaltranslation/supported-locales@2.0.51
|
|
16
|
+
|
|
17
|
+
## 10.13.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [#1118](https://github.com/generaltranslation/gt/pull/1118) [`de6a2d1`](https://github.com/generaltranslation/gt/commit/de6a2d1caa150383c70844b3ee6b9b2e66f77769) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add t macro
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [[`de6a2d1`](https://github.com/generaltranslation/gt/commit/de6a2d1caa150383c70844b3ee6b9b2e66f77769)]:
|
|
26
|
+
- gt-i18n@0.6.2
|
|
27
|
+
- @generaltranslation/react-core@1.5.10
|
|
28
|
+
|
|
3
29
|
## 10.12.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/browser-types.d.ts
CHANGED
|
@@ -1,62 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* Returns the user's current locale.
|
|
7
|
-
* @returns {string} The user's current locale.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* const locale = getLocale();
|
|
11
|
-
* console.log(locale); // 'en-US'
|
|
12
|
-
*/
|
|
13
|
-
declare function getLocale(): string;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the locales that are supported by the application.
|
|
16
|
-
* @returns {string[]} The locales that are supported by the application.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* const locales = getLocales();
|
|
20
|
-
* console.log(locales); // ['en-US', 'es-ES']
|
|
21
|
-
*/
|
|
22
|
-
declare function getLocales(): string[];
|
|
23
|
-
/**
|
|
24
|
-
* Returns the user's current locales.
|
|
25
|
-
* @returns {string[]} The user's current locales.
|
|
26
|
-
*
|
|
27
|
-
* @note This function causes a page reload
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* const locales = getLocales();
|
|
31
|
-
* console.log(locales); // ['en-US', 'es-ES']
|
|
32
|
-
*/
|
|
33
|
-
declare function setLocale(locale: string): void;
|
|
34
|
-
/**
|
|
35
|
-
* Returns the user's current default locale.
|
|
36
|
-
* @returns {string} The user's current default locale.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* const defaultLocale = getDefaultLocale();
|
|
40
|
-
* console.log(defaultLocale); // 'en-US'
|
|
41
|
-
*/
|
|
42
|
-
declare function getDefaultLocale(): string;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Type for custom getLocale function
|
|
46
|
-
*/
|
|
47
|
-
type GetLocale = () => string;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Parameters for the initializing GT
|
|
51
|
-
* @param {string} params.defaultLocale - The default locale to use
|
|
52
|
-
* @param {string[]} params.locales - The locales to support
|
|
53
|
-
* @param {GetLocale} params.getLocale - The function to get the locale
|
|
54
|
-
* @param {TranslationsLoader} params.loadTranslations - The custom translation loader to use
|
|
55
|
-
*/
|
|
56
|
-
type InitializeGTParams = GTConfig & {
|
|
57
|
-
loadTranslations?: TranslationsLoader;
|
|
58
|
-
getLocale?: GetLocale;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export { getDefaultLocale, getLocale, getLocales, setLocale };
|
|
62
|
-
export type { GetLocale, InitializeGTParams };
|
|
1
|
+
export * from './i18n-context/functions/locale-operations';
|
|
2
|
+
export * from './i18n-context/functions/versionId';
|
|
3
|
+
export * from './i18n-context/setup/types';
|
|
4
|
+
export { SyncResolutionFunction, SyncResolutionFunctionWithFallback, } from 'gt-i18n/types';
|
|
5
|
+
//# sourceMappingURL=browser-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-types.d.ts","sourceRoot":"","sources":["../src/browser-types.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"browser-types.d.ts","sourceRoot":"","sources":["../src/browser-types.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,eAAe,CAAC"}
|