gt-react 10.12.1 → 10.13.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # gt-react
2
2
 
3
+ ## 10.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`de6a2d1`](https://github.com/generaltranslation/gt/commit/de6a2d1caa150383c70844b3ee6b9b2e66f77769)]:
12
+ - gt-i18n@0.6.2
13
+ - @generaltranslation/react-core@1.5.10
14
+
3
15
  ## 10.12.1
4
16
 
5
17
  ### Patch Changes
@@ -1,62 +1,4 @@
1
- import { GTConfig, TranslationsLoader } from 'gt-i18n/internal/types';
2
- export { GTConfig, TranslationsLoader } from 'gt-i18n/internal/types';
3
- export { SyncResolutionFunction } from 'gt-i18n/types';
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/setup/types';
3
+ export { SyncResolutionFunction, SyncResolutionFunctionWithFallback, } from 'gt-i18n/types';
4
+ //# 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,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC"}
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,EACL,sBAAsB,EACtB,kCAAkC,GACnC,MAAM,eAAe,CAAC"}