@commercetools-frontend/i18n 21.23.6 → 21.23.7
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/dist/commercetools-frontend-i18n.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-i18n.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-i18n.esm.js +1 -1
- package/dist/declarations/src/async-locale-data/async-locale-data.d.ts +4 -4
- package/dist/declarations/src/async-locale-data/use-async-intl-messages.d.ts +4 -4
- package/dist/declarations/src/export-types.d.ts +3 -3
- package/dist/declarations/src/load-i18n.d.ts +2 -2
- package/dist/declarations/src/utils.d.ts +1 -1
- package/package.json +8 -8
|
@@ -43,7 +43,7 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
43
43
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
44
44
|
|
|
45
45
|
// NOTE: This string will be replaced on build time with the package version.
|
|
46
|
-
var version = "21.23.
|
|
46
|
+
var version = "21.23.7";
|
|
47
47
|
|
|
48
48
|
var extractLanguageTagFromLocale = function extractLanguageTagFromLocale(locale) {
|
|
49
49
|
return _includesInstanceProperty__default["default"](locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
@@ -43,7 +43,7 @@ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInsta
|
|
|
43
43
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
44
44
|
|
|
45
45
|
// NOTE: This string will be replaced on build time with the package version.
|
|
46
|
-
var version = "21.23.
|
|
46
|
+
var version = "21.23.7";
|
|
47
47
|
|
|
48
48
|
var extractLanguageTagFromLocale = function extractLanguageTagFromLocale(locale) {
|
|
49
49
|
return _includesInstanceProperty__default["default"](locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
@@ -12,7 +12,7 @@ import { jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
12
12
|
import { defineMessages } from 'react-intl';
|
|
13
13
|
|
|
14
14
|
// NOTE: This string will be replaced on build time with the package version.
|
|
15
|
-
var version = "21.23.
|
|
15
|
+
var version = "21.23.7";
|
|
16
16
|
|
|
17
17
|
var extractLanguageTagFromLocale = function extractLanguageTagFromLocale(locale) {
|
|
18
18
|
return _includesInstanceProperty(locale).call(locale, '-') ? locale.split('-')[0] : locale;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type TMessageTranslations = Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
4
|
+
export type TMessageTranslationsAsync = (locale: string) => Promise<TMessageTranslations>;
|
|
5
|
+
export type TRenderFunctionResult = {
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
locale?: string;
|
|
8
8
|
messages?: TMessageTranslations;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type Props = {
|
|
11
11
|
locale?: string;
|
|
12
12
|
applicationMessages: {
|
|
13
13
|
[locale: string]: TMessageTranslations;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type TMessageTranslations = Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
3
|
+
export type TMessageTranslationsAsync = (locale: string) => Promise<TMessageTranslations>;
|
|
4
|
+
export type TState = {
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
messages?: TMessageTranslations;
|
|
7
7
|
error?: Error;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type THookOptions = {
|
|
10
10
|
locale?: string;
|
|
11
11
|
loader: TMessageTranslationsAsync;
|
|
12
12
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Props } from './async-locale-data/async-locale-data';
|
|
2
2
|
import type { I18NImportData, MergedMessages } from './load-i18n';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type TAsyncLocaleDataProps = Props;
|
|
4
|
+
export type TI18NImportData = I18NImportData;
|
|
5
|
+
export type TMergedMessages = MergedMessages;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
2
|
-
export
|
|
2
|
+
export type I18NImportData = {
|
|
3
3
|
default: Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type MergedMessages = Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
6
6
|
export default function loadI18n(locale: string): Promise<MergedMessages>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
|
|
2
|
-
export
|
|
2
|
+
export type TMessageTranslations = Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
3
3
|
export declare const extractLanguageTagFromLocale: (locale: string) => string;
|
|
4
4
|
export declare const mergeMessages: (...messages: TMessageTranslations[]) => TMessageTranslations;
|
|
5
5
|
export declare const mapLocaleToIntlLocale: (locale: string) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/i18n",
|
|
3
|
-
"version": "21.23.
|
|
3
|
+
"version": "21.23.7",
|
|
4
4
|
"description": "MC i18n messages",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"compile-data": "./scripts/compile_data.sh"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/runtime": "^7.
|
|
36
|
-
"@babel/runtime-corejs3": "^7.
|
|
35
|
+
"@babel/runtime": "^7.20.13",
|
|
36
|
+
"@babel/runtime-corejs3": "^7.20.13",
|
|
37
37
|
"@commercetools-community-kit/i18n": "^0.3.0",
|
|
38
|
-
"@commercetools-frontend/sentry": "21.23.
|
|
39
|
-
"@commercetools-uikit/i18n": "^15.11.
|
|
40
|
-
"@emotion/react": "11.10.
|
|
41
|
-
"@formatjs/icu-messageformat-parser": "2.
|
|
38
|
+
"@commercetools-frontend/sentry": "21.23.7",
|
|
39
|
+
"@commercetools-uikit/i18n": "^15.11.2",
|
|
40
|
+
"@emotion/react": "11.10.5",
|
|
41
|
+
"@formatjs/icu-messageformat-parser": "2.2.0",
|
|
42
42
|
"@types/prop-types": "^15.7.5",
|
|
43
|
-
"@types/react": "^17.0.
|
|
43
|
+
"@types/react": "^17.0.53",
|
|
44
44
|
"moment": "^2.29.4",
|
|
45
45
|
"prop-types": "15.8.1"
|
|
46
46
|
},
|