gt-react 3.1.17 → 3.1.19
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/intl/createIntlFunction.d.ts.map +1 -1
- package/dist/intl/createIntlFunction.js +3 -2
- package/dist/intl/createIntlFunction.js.map +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +1 -1
- package/dist/server/T.js +1 -1
- package/dist/server/T.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/types/defaultGTProps.js +1 -1
- package/dist/types/defaultGTProps.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIntlFunction.d.ts","sourceRoot":"","sources":["../../src/intl/createIntlFunction.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,6BAA6B,CAAA;AAG3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACvC,UAAU,EAAE,GAAG,cAAc,EAChC,EAAE;IAAE,UAAU,EAAE,iBAAiB,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,aAEvC,MAAM,YAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC9C,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"createIntlFunction.d.ts","sourceRoot":"","sources":["../../src/intl/createIntlFunction.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,6BAA6B,CAAA;AAG3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACvC,UAAU,EAAE,GAAG,cAAc,EAChC,EAAE;IAAE,UAAU,EAAE,iBAAiB,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,aAEvC,MAAM,YAAW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC9C,OAAO,CAAC,MAAM,CAAC,CAerB"}
|
|
@@ -25,11 +25,12 @@ export default function createIntlFunction(_a) {
|
|
|
25
25
|
options.targetLanguage = options.targetLanguage || I18NConfig.getLocale();
|
|
26
26
|
if (!content || typeof content !== 'string' || !I18NConfig.translationRequired(options.targetLanguage))
|
|
27
27
|
return content;
|
|
28
|
-
const
|
|
28
|
+
const key = yield calculateID(content);
|
|
29
|
+
const translation = yield I18NConfig.getTranslation(options.targetLanguage, key, options.id, options.dictionaryName);
|
|
29
30
|
if (translation)
|
|
30
31
|
return translation;
|
|
31
32
|
if (I18NConfig.automaticTranslationEnabled()) {
|
|
32
|
-
const translationPromise = I18NConfig.intl({ content, targetLanguage: options.targetLanguage, options });
|
|
33
|
+
const translationPromise = I18NConfig.intl({ content, targetLanguage: options.targetLanguage, options: Object.assign(Object.assign({}, options), { hash: key }) });
|
|
33
34
|
const renderSettings = I18NConfig.getRenderSettings();
|
|
34
35
|
if (renderSettings.method !== "subtle") {
|
|
35
36
|
return yield translationPromise;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIntlFunction.js","sourceRoot":"","sources":["../../src/intl/createIntlFunction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAEpD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAEa;QAFb,EACvC,UAAU,OAC0C,EADrC,cAAc,cADU,cAE1C,CADgC;IAE7B,OAAO,uBAEY,EAAE,4DADjB,OAAe,EAAE,4BAAoC,cAAc,CAAE;QAErE,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,UAAU,CAAC,SAAS,EAAE,CAAC;QAC1E,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,CAAC;YAAE,OAAO,OAAO,CAAC;QACvH,MAAM,
|
|
1
|
+
{"version":3,"file":"createIntlFunction.js","sourceRoot":"","sources":["../../src/intl/createIntlFun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Translation from "./types/GeneralTranslationInterface";
|
|
|
11
11
|
* @param {string[]} [params.approvedLocales] - List of approved locales. Default is an empty array.
|
|
12
12
|
* @param {string} [params.defaultLocale] - Default locale for the translation. Default is the first locale in `approvedLocales` or 'en'.
|
|
13
13
|
* @param {Function} [params.getLocale] - Function to get the current locale. Sets using Next.js request headers if not provided.
|
|
14
|
-
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "skeleton", "replace", "hang", "subtle".
|
|
14
|
+
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "skeleton", "replace", "hang", "subtle".
|
|
15
15
|
* @param {string} [params.dictionaryName] - Name of the dictionary to use. Default is "default".
|
|
16
16
|
* @param {Object} [params.dictionary] - Dictionary object containing translations.
|
|
17
17
|
* @param {number} [params.maxConcurrentRequests] - Maximum number of concurrent requests. Default is 2.
|
package/dist/next.js
CHANGED
|
@@ -22,7 +22,7 @@ import { getNextDomain, getNextLocale } from "./next/requestFunctions";
|
|
|
22
22
|
* @param {string[]} [params.approvedLocales] - List of approved locales. Default is an empty array.
|
|
23
23
|
* @param {string} [params.defaultLocale] - Default locale for the translation. Default is the first locale in `approvedLocales` or 'en'.
|
|
24
24
|
* @param {Function} [params.getLocale] - Function to get the current locale. Sets using Next.js request headers if not provided.
|
|
25
|
-
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "skeleton", "replace", "hang", "subtle".
|
|
25
|
+
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "skeleton", "replace", "hang", "subtle".
|
|
26
26
|
* @param {string} [params.dictionaryName] - Name of the dictionary to use. Default is "default".
|
|
27
27
|
* @param {Object} [params.dictionary] - Dictionary object containing translations.
|
|
28
28
|
* @param {number} [params.maxConcurrentRequests] - Maximum number of concurrent requests. Default is 2.
|
package/dist/server/T.js
CHANGED
|
@@ -59,7 +59,7 @@ const ServerT = (_a) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
59
59
|
return (_jsx(_Fragment, { children: children }));
|
|
60
60
|
}
|
|
61
61
|
// Create a new translation for this site and render it
|
|
62
|
-
const I18NChildrenPromise = I18NConfig.translateChildren({ children: childrenAsObjects, targetLanguage: locale, metadata: Object.assign({}, props) });
|
|
62
|
+
const I18NChildrenPromise = I18NConfig.translateChildren({ children: childrenAsObjects, targetLanguage: locale, metadata: Object.assign(Object.assign({}, props), { hash: key }) });
|
|
63
63
|
const renderMethod = (props === null || props === void 0 ? void 0 : props.renderMethod) || renderSettings.method;
|
|
64
64
|
let promise = I18NChildrenPromise.then(target => renderChildren({ source: taggedChildren, target, renderAttributes, locale, defaultLocale }));
|
|
65
65
|
// Render methods
|
package/dist/server/T.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"T.js","sourceRoot":"","sources":["../../src/server/T.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,sBAAsB,MAAM,kCAAkC,CAAC;AACtE,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAUpD,MAAM,OAAO,GAAG,CAAO,EAER,EAAsB,EAAE;;QAFhB,EACnB,UAAU,EAAE,QAAQ,EAAE,MAAM,OACjB,EADsB,KAAK,cADnB,oCAEtB,CADyC;IAGtC,4GAA4G;IAC5G,MAAM,mBAAmB,GAAY,CAAC,QAAQ,IAAI,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACzG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACvB,OAAO,CACH,4BACK,QAAQ,GACV,CACN,CAAA;IACL,CAAC;IAED,6BAA6B;I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AC;IACpC,CAAC;IAED,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC5D,OAAO,CACH,KAAC,QAAQ,IAAC,QAAQ,EAAE,eAAe,YAE/B,KAAC,QAAQ,IAAC,QAAQ,EAAE,aAAa,YAAG,OAAO,GAAY,GAChD,CACd,CAAA;IACL,CAAC;IAED,oBAAoB;IAEpB,OAAO;IACH,iDAAiD;IACjD,wGAAwG;IACxG,4BACK,aAAa,GACf,CACN,CAAC;AAEN,CAAC,CAAA,CAAA;AAED,OAAO,CAAC,gBAAgB,GAAG,WAAW,CAAC;AAEvC,eAAe,OAAO,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import GeneralTranslation from './types/GeneralTranslationInterface';
|
|
|
15
15
|
* @param {string} [params.defaultLocale] - Default locale for the translation. Default is the first locale in `approvedLocales` or 'en'.
|
|
16
16
|
* @param {Function} [params.getLocale] - Function to get the current locale. Default returns the `defaultLocale`.
|
|
17
17
|
* @param {boolean} [params.renderPrevious] - Experimental. If there's a previous translation on file remotely, use it as a placeholder while the new translation loads, replacing the role of the default language children in "replace" and "subtle", and the skeleton in "skeleton".
|
|
18
|
-
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "replace", "hang", "subtle".
|
|
18
|
+
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "replace", "hang", "subtle".
|
|
19
19
|
* @param {string} [params.renderTimeout] - Timeout before rendering a new translation is called off.
|
|
20
20
|
* @param {string} [params.dictionaryName] - Name of the dictionary to use. Default is "default".
|
|
21
21
|
* @param {Object} [params.dictionary] - Dictionary object containing default language content.
|
package/dist/server.js
CHANGED
|
@@ -38,7 +38,7 @@ import defaultGTProps from './types/defaultGTProps';
|
|
|
38
38
|
* @param {string} [params.defaultLocale] - Default locale for the translation. Default is the first locale in `approvedLocales` or 'en'.
|
|
39
39
|
* @param {Function} [params.getLocale] - Function to get the current locale. Default returns the `defaultLocale`.
|
|
40
40
|
* @param {boolean} [params.renderPrevious] - Experimental. If there's a previous translation on file remotely, use it as a placeholder while the new translation loads, replacing the role of the default language children in "replace" and "subtle", and the skeleton in "skeleton".
|
|
41
|
-
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "replace", "hang", "subtle".
|
|
41
|
+
* @param {string} [params.renderMethod] - How translations are rendered for the first time. options are "replace", "hang", "subtle".
|
|
42
42
|
* @param {string} [params.renderTimeout] - Timeout before rendering a new translation is called off.
|
|
43
43
|
* @param {string} [params.dictionaryName] - Name of the dictionary to use. Default is "default".
|
|
44
44
|
* @param {Object} [params.dictionary] - Dictionary object containing default language content.
|
|
@@ -11,7 +11,7 @@ const defaultGTProps = {
|
|
|
11
11
|
getLocale: () => { return 'en '; },
|
|
12
12
|
// Rendering
|
|
13
13
|
renderPrevious: true,
|
|
14
|
-
renderMethod: "
|
|
14
|
+
renderMethod: "replace", // "skeleton", "hang", "subtle"
|
|
15
15
|
renderTimeout: 12500,
|
|
16
16
|
// Dictionaries
|
|
17
17
|
dictionaryName: "default",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultGTProps.js","sourceRoot":"","sources":["../../src/types/defaultGTProps.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,mCAAmC,CAAA;AAEjE,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC;IACvC,SAAS,EAAE,iBAAiB,CAAC,eAAe,CAAC;IAC7C,QAAQ,EAAE,uBAAuB;IACjC,OAAO,EAAE,sBAAsB;IAC/B,YAAY,EAAE,IAAI;IAClB,oBAAoB,EAAE,IAAI;IAC1B,cAAc;IACd,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,GAAG,EAAE,GAAG,OAAO,KAAK,CAAA,CAAA,CAAC;IAChC,YAAY;IACZ,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultGTProps.js","sourceRoot":"","sources":["../../src/types/defaultGTProps.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,mCAAmC,CAAA;AAEjE,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,iBAAiB,CAAC,YAAY,CAAC;IACvC,SAAS,EAAE,iBAAiB,CAAC,eAAe,CAAC;IAC7C,QAAQ,EAAE,uBAAuB;IACjC,OAAO,EAAE,sBAAsB;IAC/B,YAAY,EAAE,IAAI;IAClB,oBAAoB,EAAE,IAAI;IAC1B,cAAc;IACd,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,GAAG,EAAE,GAAG,OAAO,KAAK,CAAA,CAAA,CAAC;IAChC,YAAY;IACZ,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,SAAS,EAAE,+BAA+B;IACxD,aAAa,EAAE,KAAK;IACpB,eAAe;IACf,cAAc,EAAE,SAAS;IACzB,UAAU,EAAE,EAAE;IACd,kBAAkB;IAClB,qBAAqB,EAAE,CAAC;IACxB,aAAa,EAAE,IAAI;IACnB,iBAAiB;IACjB,WAAW,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,CAAA,CAAC,CAAC;CACnC,CAAA;AAED,eAAe,cAAc,CAAC"}
|