use-intl 4.0.0-beta-8cce53e → 4.0.0-beta-8f37883
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as resolveNamespace, e as createBaseTranslator, d as createCache, b as createIntlFormatters, f as defaultGetMessageFallback, g as defaultOnError } from './initializeConfig-
|
|
2
|
-
export { I as IntlError, a as IntlErrorCode, c as createFormatter, i as initializeConfig } from './initializeConfig-
|
|
1
|
+
import { r as resolveNamespace, e as createBaseTranslator, d as createCache, b as createIntlFormatters, f as defaultGetMessageFallback, g as defaultOnError } from './initializeConfig-lFPDYrt3.js';
|
|
2
|
+
export { I as IntlError, a as IntlErrorCode, c as createFormatter, i as initializeConfig } from './initializeConfig-lFPDYrt3.js';
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as IntlError, a as IntlErrorCode, d as _createCache, b as _createIntlFormatters, c as createFormatter, i as initializeConfig } from './initializeConfig-
|
|
1
|
+
export { I as IntlError, a as IntlErrorCode, d as _createCache, b as _createIntlFormatters, c as createFormatter, i as initializeConfig } from './initializeConfig-lFPDYrt3.js';
|
|
2
2
|
export { createTranslator, hasLocale } from './core.js';
|
|
3
3
|
export { IntlProvider, useFormatter, useLocale, useMessages, useNow, useTimeZone, useTranslations } from './react.js';
|
|
4
4
|
|
|
@@ -189,7 +189,7 @@ function prepareTranslationValues(values) {
|
|
|
189
189
|
function getMessagesOrError(locale, messages, namespace, onError = defaultOnError) {
|
|
190
190
|
try {
|
|
191
191
|
if (!messages) {
|
|
192
|
-
throw new Error(`No messages were configured
|
|
192
|
+
throw new Error(`No messages were configured.` );
|
|
193
193
|
}
|
|
194
194
|
const retrievedMessages = namespace ? resolvePath(locale, messages, namespace) : messages;
|
|
195
195
|
|
|
@@ -471,7 +471,7 @@ function createFormatter(props) {
|
|
|
471
471
|
const formatName = formatOrOptions;
|
|
472
472
|
options = typeFormats?.[formatName];
|
|
473
473
|
if (!options) {
|
|
474
|
-
const error = new IntlError(IntlErrorCode.MISSING_FORMAT, `Format \`${formatName}\` is not available
|
|
474
|
+
const error = new IntlError(IntlErrorCode.MISSING_FORMAT, `Format \`${formatName}\` is not available.` );
|
|
475
475
|
onError(error);
|
|
476
476
|
throw error;
|
|
477
477
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, useMemo, useState, useEffect } from 'react';
|
|
2
|
-
import { d as createCache, b as createIntlFormatters, i as initializeConfig, r as resolveNamespace, I as IntlError, a as IntlErrorCode, e as createBaseTranslator, c as createFormatter } from './initializeConfig-
|
|
2
|
+
import { d as createCache, b as createIntlFormatters, i as initializeConfig, r as resolveNamespace, I as IntlError, a as IntlErrorCode, e as createBaseTranslator, c as createFormatter } from './initializeConfig-lFPDYrt3.js';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-intl",
|
|
3
|
-
"version": "4.0.0-beta-
|
|
3
|
+
"version": "4.0.0-beta-8f37883",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"description": "Internationalization (i18n) for React",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "a9f295bd5e8f3bc25de067dd93d81a1b1bd54977"
|
|
68
68
|
}
|