gt-next 2.1.7 → 2.1.8
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/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -2
- package/dist/config.js.map +1 -1
- package/dist/errors/createErrors.d.ts +1 -0
- package/dist/errors/createErrors.d.ts.map +1 -1
- package/dist/errors/createErrors.js +7 -1
- package/dist/errors/createErrors.js.map +1 -1
- package/dist/middleware/createNextMiddleware.d.ts.map +1 -1
- package/dist/middleware/createNextMiddleware.js +4 -0
- package/dist/middleware/createNextMiddleware.js.map +1 -1
- package/dist/server/inline/T.d.ts +2 -7
- package/dist/server/inline/T.d.ts.map +1 -1
- package/dist/server/inline/T.js +3 -3
- package/dist/server/inline/T.js.map +1 -1
- package/package.json +5 -4
package/dist/config.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ import InitGTProps from './config/props/InitGTProps';
|
|
|
24
24
|
* @param {string} [baseURL=defaultInitGTProps.baseURL] - The base URL for the GT API. Set to an empty string to disable automatic translations.
|
|
25
25
|
* @param {string} [cacheURL=defaultInitGTProps.cacheURL] - The URL for cached translations.
|
|
26
26
|
* @param {string[]} [locales] - List of supported locales for the application. Defaults to the first locale or the default locale if not provided.
|
|
27
|
-
* @param {string} [defaultLocale=
|
|
27
|
+
* @param {string} [defaultLocale=defaultInitGTProps.defaultLocale] - The default locale to use if none is specified.
|
|
28
28
|
* @param {object} [renderSettings=defaultInitGTProps.renderSettings] - Render settings for how translations should be handled.
|
|
29
29
|
* @param {number} [_maxConcurrentRequests=defaultInitGTProps._maxConcurrectRequests] - Maximum number of concurrent requests allowed.
|
|
30
30
|
* @param {number} [_batchInterval=defaultInitGTProps._batchInterval] - The interval in milliseconds between batched translation requests.
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,WAAW,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,WAAW,MAAM,4BAA4B,CAAA;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,UAAU,EACV,MAAkC,EAClC,SAAwC,EACxC,OAAoC,EACpC,QAAsC,EACtC,OAAO,EACP,aAAgD,EAChD,cAAkD,EAClD,sBAAkE,EAClE,cAAkD,EAClD,GAAG,QAAQ,EACZ,GAAE,WAAgC,aA8CjB,UAAU,KAAQ,UAAU,CAiC7C"}
|
package/dist/config.js
CHANGED
|
@@ -38,6 +38,8 @@ exports.initGT = initGT;
|
|
|
38
38
|
var path_1 = __importDefault(require("path"));
|
|
39
39
|
var defaultInitGTProps_1 = __importDefault(require("./config/props/defaultInitGTProps"));
|
|
40
40
|
var createErrors_1 = require("./errors/createErrors");
|
|
41
|
+
var supported_locales_1 = require("@generaltranslation/supported-locales");
|
|
42
|
+
var internal_1 = require("generaltranslation/internal");
|
|
41
43
|
/**
|
|
42
44
|
* Initializes General Translation settings for a Next.js application.
|
|
43
45
|
*
|
|
@@ -62,7 +64,7 @@ var createErrors_1 = require("./errors/createErrors");
|
|
|
62
64
|
* @param {string} [baseURL=defaultInitGTProps.baseURL] - The base URL for the GT API. Set to an empty string to disable automatic translations.
|
|
63
65
|
* @param {string} [cacheURL=defaultInitGTProps.cacheURL] - The URL for cached translations.
|
|
64
66
|
* @param {string[]} [locales] - List of supported locales for the application. Defaults to the first locale or the default locale if not provided.
|
|
65
|
-
* @param {string} [defaultLocale=
|
|
67
|
+
* @param {string} [defaultLocale=defaultInitGTProps.defaultLocale] - The default locale to use if none is specified.
|
|
66
68
|
* @param {object} [renderSettings=defaultInitGTProps.renderSettings] - Render settings for how translations should be handled.
|
|
67
69
|
* @param {number} [_maxConcurrentRequests=defaultInitGTProps._maxConcurrectRequests] - Maximum number of concurrent requests allowed.
|
|
68
70
|
* @param {number} [_batchInterval=defaultInitGTProps._batchInterval] - The interval in milliseconds between batched translation requests.
|
|
@@ -75,7 +77,7 @@ var createErrors_1 = require("./errors/createErrors");
|
|
|
75
77
|
*/
|
|
76
78
|
function initGT(_a) {
|
|
77
79
|
if (_a === void 0) { _a = defaultInitGTProps_1.default; }
|
|
78
|
-
var i18n = _a.i18n, dictionary = _a.dictionary, _b = _a.apiKey, apiKey = _b === void 0 ? defaultInitGTProps_1.default.apiKey : _b, _c = _a.projectId, projectId = _c === void 0 ? defaultInitGTProps_1.default.projectId : _c, _d = _a.baseURL, baseURL = _d === void 0 ? defaultInitGTProps_1.default.baseURL : _d, _e = _a.cacheURL, cacheURL = _e === void 0 ? defaultInitGTProps_1.default.cacheURL : _e, locales = _a.locales, _f = _a.defaultLocale, defaultLocale = _f === void 0 ?
|
|
80
|
+
var i18n = _a.i18n, dictionary = _a.dictionary, _b = _a.apiKey, apiKey = _b === void 0 ? defaultInitGTProps_1.default.apiKey : _b, _c = _a.projectId, projectId = _c === void 0 ? defaultInitGTProps_1.default.projectId : _c, _d = _a.baseURL, baseURL = _d === void 0 ? defaultInitGTProps_1.default.baseURL : _d, _e = _a.cacheURL, cacheURL = _e === void 0 ? defaultInitGTProps_1.default.cacheURL : _e, locales = _a.locales, _f = _a.defaultLocale, defaultLocale = _f === void 0 ? defaultInitGTProps_1.default.defaultLocale : _f, _g = _a.renderSettings, renderSettings = _g === void 0 ? defaultInitGTProps_1.default.renderSettings : _g, _h = _a._maxConcurrentRequests, _maxConcurrentRequests = _h === void 0 ? defaultInitGTProps_1.default._maxConcurrectRequests : _h, _j = _a._batchInterval, _batchInterval = _j === void 0 ? defaultInitGTProps_1.default._batchInterval : _j, metadata = __rest(_a, ["i18n", "dictionary", "apiKey", "projectId", "baseURL", "cacheURL", "locales", "defaultLocale", "renderSettings", "_maxConcurrentRequests", "_batchInterval"]);
|
|
79
81
|
// Error checks
|
|
80
82
|
if (!projectId &&
|
|
81
83
|
(cacheURL === defaultInitGTProps_1.default.cacheURL ||
|
|
@@ -84,6 +86,14 @@ function initGT(_a) {
|
|
|
84
86
|
if ((!apiKey || !projectId) && baseURL === defaultInitGTProps_1.default.baseURL) {
|
|
85
87
|
console.error(createErrors_1.APIKeyMissingError);
|
|
86
88
|
}
|
|
89
|
+
if (!locales) {
|
|
90
|
+
locales = (0, supported_locales_1.listSupportedLocales)();
|
|
91
|
+
}
|
|
92
|
+
else if (baseURL === internal_1.defaultBaseURL) {
|
|
93
|
+
var warningLocales = locales.filter(function (locale) { return !(0, supported_locales_1.getSupportedLocale)(locale); });
|
|
94
|
+
if (warningLocales)
|
|
95
|
+
console.warn((0, createErrors_1.createUnsupportedLocalesWarning)(warningLocales));
|
|
96
|
+
}
|
|
87
97
|
// Store config params in environment variable to allow for global access (in some cases)
|
|
88
98
|
var I18NConfigParams = JSON.stringify(__assign({ apiKey: apiKey, projectId: projectId, baseURL: baseURL, cacheURL: cacheURL, locales: locales, defaultLocale: defaultLocale, renderSettings: renderSettings, maxConcurrentRequests: _maxConcurrentRequests, batchInterval: _batchInterval }, metadata));
|
|
89
99
|
// Use i18n and dictionary values as file paths if they are provided as such
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,wBA4FC;AAtID,8CAAwB;AAExB,yFAAmE;AAEnE,sDAAmH;AACnH,2EAAiG;AACjG,wDAA6D;AAC7D;;;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,cAAc,CAAC,SAAiB;IACvC,OAAO;QACL,UAAG,SAAS,QAAK;QACjB,UAAG,SAAS,SAAM;QAClB,UAAG,SAAS,QAAK;QACjB,UAAG,SAAS,SAAM;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -7,4 +7,5 @@ export declare const createRequiredPrefixError: (id: string, requiredPrefix: str
|
|
|
7
7
|
export declare const createAdvancedFunctionsError: (id: string, options?: Record<string, any>) => string;
|
|
8
8
|
export declare const usingDefaultsWarning = "General Translation: Unable to access gt-next configuration. Using defaults.";
|
|
9
9
|
export declare const createNoEntryWarning: (id: string) => string;
|
|
10
|
+
export declare const createUnsupportedLocalesWarning: (locales: string[]) => string;
|
|
10
11
|
//# sourceMappingURL=createErrors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createErrors.d.ts","sourceRoot":"","sources":["../../src/errors/createErrors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createErrors.d.ts","sourceRoot":"","sources":["../../src/errors/createErrors.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,8MAA8M,CAAA;AAEhP,eAAO,MAAM,kBAAkB,sNAAsN,CAAA;AAErP,eAAO,MAAM,uBAAuB,4DAA4D,CAAA;AAEhG,eAAO,MAAM,cAAc,0CAA0C,CAAA;AAErE,eAAO,MAAM,4BAA4B,YAAa,MAAM,OAAO,MAAM,WAAiG,CAAA;AAE1K,eAAO,MAAM,yBAAyB,OAAQ,MAAM,kBAAkB,MAAM,WACyI,CAAA;AAErN,eAAO,MAAM,4BAA4B,OAAQ,MAAM,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,WAIvD,CAAA;AAI/B,eAAO,MAAM,oBAAoB,iFAAiF,CAAC;AAEnH,eAAO,MAAM,oBAAoB,OAAQ,MAAM,WAAyD,CAAA;AAExG,eAAO,MAAM,+BAA+B,YAAa,MAAM,EAAE,WAGlD,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ---- ERRORS ---- //
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.createNoEntryWarning = exports.usingDefaultsWarning = exports.createAdvancedFunctionsError = exports.createRequiredPrefixError = exports.createStringTranslationError = exports.renderingError = exports.remoteTranslationsError = exports.APIKeyMissingError = exports.projectIdMissingError = void 0;
|
|
4
|
+
exports.createUnsupportedLocalesWarning = exports.createNoEntryWarning = exports.usingDefaultsWarning = exports.createAdvancedFunctionsError = exports.createRequiredPrefixError = exports.createStringTranslationError = exports.renderingError = exports.remoteTranslationsError = exports.APIKeyMissingError = exports.projectIdMissingError = void 0;
|
|
5
|
+
var generaltranslation_1 = require("generaltranslation");
|
|
5
6
|
exports.projectIdMissingError = 'General Translation: Project ID missing! Set projectId as GT_PROJECT_ID in the environment or by passing the projectId parameter to initGT(). Find your project ID: www.generaltranslation.com/dashboard.';
|
|
6
7
|
exports.APIKeyMissingError = 'General Translation: API key is required for automatic translation! Create an API key: www.generaltranslation.com/dashboard/api-keys. (Or, turn off automatic translation by setting baseURL to an empty string.)';
|
|
7
8
|
exports.remoteTranslationsError = 'General Translation: Error fetching remote translation.';
|
|
@@ -21,4 +22,9 @@ exports.createAdvancedFunctionsError = createAdvancedFunctionsError;
|
|
|
21
22
|
exports.usingDefaultsWarning = 'General Translation: Unable to access gt-next configuration. Using defaults.';
|
|
22
23
|
var createNoEntryWarning = function (id) { return "gt-next: No dictionary entry found for id: \"".concat(id, "\""); };
|
|
23
24
|
exports.createNoEntryWarning = createNoEntryWarning;
|
|
25
|
+
var createUnsupportedLocalesWarning = function (locales) { return "General Translation: The following locales are currently unsupported by our service: ".concat(locales.map(function (locale) {
|
|
26
|
+
var name = (0, generaltranslation_1.getLocaleProperties)(locale).name;
|
|
27
|
+
return "".concat(locale, " (").concat(name, ")");
|
|
28
|
+
}).join(', ')); };
|
|
29
|
+
exports.createUnsupportedLocalesWarning = createUnsupportedLocalesWarning;
|
|
24
30
|
//# sourceMappingURL=createErrors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createErrors.js","sourceRoot":"","sources":["../../src/errors/createErrors.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;
|
|
1
|
+
{"version":3,"file":"createErrors.js","sourceRoot":"","sources":["../../src/errors/createErrors.ts"],"names":[],"mappings":";AAAA,sBAAsB;;;AAEtB,yDAAwD;AAE3C,QAAA,qBAAqB,GAAG,2MAA2M,CAAA;AAEnO,QAAA,kBAAkB,GAAG,mNAAmN,CAAA;AAExO,QAAA,uBAAuB,GAAG,yDAAyD,CAAA;AAEnF,QAAA,cAAc,GAAG,uCAAuC,CAAA;AAE9D,IAAM,4BAA4B,GAAG,UAAC,OAAe,EAAE,EAAW,IAAK,OAAA,iDAAyC,OAAO,gBAAK,EAAE,CAAC,CAAC,CAAC,qBAAa,EAAE,OAAG,CAAC,CAAC,CAAC,EAAE,aAAW,EAA5F,CAA4F,CAAA;AAA7J,QAAA,4BAA4B,gCAAiI;AAEnK,IAAM,yBAAyB,GAAG,UAAC,EAAU,EAAE,cAAsB;IACxE,OAAA,kEAA0D,cAAc,sEAA0D,EAAE,iFAA6E;AAAjN,CAAiN,CAAA;AADxM,QAAA,yBAAyB,6BAC+K;AAE9M,IAAM,4BAA4B,GAAG,UAAC,EAAU,EAAE,OAA6B;IAClF,OAAA,mKAAmK;QAC/J,sFAA8E,EAAE,iBAC5E,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,kBAC5B;AAH3B,CAG2B,CAAA;AAJlB,QAAA,4BAA4B,gCAIV;AAE/B,wBAAwB;AAEX,QAAA,oBAAoB,GAAG,8EAA8E,CAAC;AAE5G,IAAM,oBAAoB,GAAG,UAAC,EAAU,IAAK,OAAA,uDAA+C,EAAE,OAAG,EAApD,CAAoD,CAAA;AAA3F,QAAA,oBAAoB,wBAAuE;AAEjG,IAAM,+BAA+B,GAAG,UAAC,OAAiB,IAAK,OAAA,+FAAwF,OAAO,CAAC,GAAG,CAAC,UAAA,MAAM;IACpK,IAAA,IAAI,GAAK,IAAA,wCAAmB,EAAC,MAAM,CAAC,KAAhC,CAAiC;IAC7C,OAAO,UAAG,MAAM,eAAK,IAAI,MAAG,CAAA;AAChC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAE,EAHuD,CAGvD,CAAA;AAHF,QAAA,+BAA+B,mCAG7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNextMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/createNextMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"createNextMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/createNextMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgB3C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EACzC,aAAoC,EACpC,OAAO,EAAE,aAAoB,EAAE,mBAA2B,EAC7D,GAAE;IACC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAIrG,SAmBgC,GAAG,2BA6GnC"}
|
|
@@ -5,6 +5,7 @@ var generaltranslation_1 = require("generaltranslation");
|
|
|
5
5
|
var server_1 = require("next/server");
|
|
6
6
|
// import { ResponseCookies, RequestCookies } from "next/dist/compiled/@edge-runtime/cookies";
|
|
7
7
|
var internal_1 = require("generaltranslation/internal");
|
|
8
|
+
var supported_locales_1 = require("@generaltranslation/supported-locales");
|
|
8
9
|
/**
|
|
9
10
|
* Extracts the locale from the given pathname.
|
|
10
11
|
*
|
|
@@ -33,6 +34,9 @@ function createNextMiddleware(_a) {
|
|
|
33
34
|
var _b = _a === void 0 ? {
|
|
34
35
|
defaultLocale: internal_1.libraryDefaultLocale, localeRouting: true, prefixDefaultLocale: false
|
|
35
36
|
} : _a, _c = _b.defaultLocale, defaultLocale = _c === void 0 ? internal_1.libraryDefaultLocale : _c, locales = _b.locales, _d = _b.localeRouting, localeRouting = _d === void 0 ? true : _d, _e = _b.prefixDefaultLocale, prefixDefaultLocale = _e === void 0 ? false : _e;
|
|
37
|
+
if (!locales) {
|
|
38
|
+
locales = (0, supported_locales_1.listSupportedLocales)();
|
|
39
|
+
}
|
|
36
40
|
/**
|
|
37
41
|
* Processes the incoming request to determine the user's locale and sets a locale cookie.
|
|
38
42
|
* Optionally redirects the user based on the locale if locale-based routing is enabled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNextMiddleware.js","sourceRoot":"","sources":["../../src/middleware/createNextMiddleware.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"createNextMiddleware.js","sourceRoot":"","sources":["../../src/middleware/createNextMiddleware.ts"],"names":[],"mappings":";;AA+BA,uCAwIC;AAvKD,yDAAsG;AACtG,sCAA2C;AAC3C,8FAA8F;AAC9F,wDAAsG;AACtG,2EAA6E;AAE7E;;;;;GAKG;AACH,SAAS,aAAa,CAAC,QAAgB;IACnC,IAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACtD,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAwB,oBAAoB,CAAC,EAQ5C;QAR4C,qBAM3C;QACE,aAAa,EAAE,+BAAoB,EAAE,aAAa,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK;KACvF,KAAA,EAPG,qBAAoC,EAApC,aAAa,mBAAG,+BAAoB,KAAA,EACpC,OAAO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nE,IAAM,YAAY,GAAG,qBAAY,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;gBAC/D,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,2BAAgB,EAAE,UAAU,CAAC,CAAC;gBACvD,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,2BAAgB,EAAE,UAAU,CAAC,CAAC;gBACvD,OAAO,YAAY,CAAC;YACxB,CAAC;iBAAM,CAAC;gBACJ,GAAG,CAAC,OAAO,CAAC,QAAQ,GAAG,WAAI,UAAU,SAAG,QAAQ,CAAE,CAAA;gBAClD,OAAO,qBAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;QACL,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,OAAO,cAAc,CAAC;AAE1B,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
type RenderSettings = {
|
|
2
|
-
method: 'skeleton' | 'replace' | 'hang' | 'subtle';
|
|
3
|
-
timeout: number | null;
|
|
4
|
-
};
|
|
5
1
|
/**
|
|
6
2
|
* Translation component that renders its children translated into the user's given locale.
|
|
7
3
|
*
|
|
@@ -45,11 +41,10 @@ type RenderSettings = {
|
|
|
45
41
|
*
|
|
46
42
|
* @throws {Error} If a plural translation is requested but the `n` option is not provided.
|
|
47
43
|
*/
|
|
48
|
-
declare function T({ children, id, context,
|
|
44
|
+
declare function T({ children, id, context, variables, variablesOptions, }: {
|
|
49
45
|
children: any;
|
|
50
|
-
id
|
|
46
|
+
id: string;
|
|
51
47
|
context?: string;
|
|
52
|
-
renderSettings?: RenderSettings;
|
|
53
48
|
[key: string]: any;
|
|
54
49
|
}): Promise<any>;
|
|
55
50
|
declare namespace T {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"T.d.ts","sourceRoot":"","sources":["../../../src/server/inline/T.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"T.d.ts","sourceRoot":"","sources":["../../../src/server/inline/T.tsx"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,iBAAe,CAAC,CAAC,EACf,QAAQ,EACR,EAAE,EACF,OAAO,EACP,SAAS,EACT,gBAAgB,GACjB,EAAE;IACD,QAAQ,EAAE,GAAG,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,OAAO,CAAC,GAAG,CAAC,CA6Hf;kBAxIc,CAAC;;;AA4IhB,eAAe,CAAC,CAAC"}
|
package/dist/server/inline/T.js
CHANGED
|
@@ -103,9 +103,9 @@ var renderVariable_1 = __importDefault(require("../rendering/renderVariable"));
|
|
|
103
103
|
*/
|
|
104
104
|
function T(_a) {
|
|
105
105
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
106
|
-
var I18NConfig, locale, defaultLocale, translationRequired, translationsPromise, taggedChildren, _c, childrenAsObjects, key, translations, translation, target, translationPromise, _d, _e, _f, promise, loadingFallback, errorFallback;
|
|
106
|
+
var I18NConfig, locale, defaultLocale, translationRequired, translationsPromise, taggedChildren, _c, childrenAsObjects, key, translations, translation, target, renderSettings, translationPromise, _d, _e, _f, promise, loadingFallback, errorFallback;
|
|
107
107
|
var _g;
|
|
108
|
-
var children = _b.children, id = _b.id, context = _b.context,
|
|
108
|
+
var children = _b.children, id = _b.id, context = _b.context, variables = _b.variables, variablesOptions = _b.variablesOptions;
|
|
109
109
|
return __generator(this, function (_h) {
|
|
110
110
|
switch (_h.label) {
|
|
111
111
|
case 0:
|
|
@@ -152,7 +152,7 @@ function T(_a) {
|
|
|
152
152
|
renderVariable: renderVariable_1.default
|
|
153
153
|
})];
|
|
154
154
|
}
|
|
155
|
-
renderSettings
|
|
155
|
+
renderSettings = I18NConfig.getRenderSettings();
|
|
156
156
|
_e = (_d = I18NConfig).translateChildren;
|
|
157
157
|
_g = {
|
|
158
158
|
children: childrenAsObjects,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"T.js","sourceRoot":"","sources":["../../../src/server/inline/T.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAuD;AACvD,sEAAgD;AAChD,0EAAoD;AACpD,+BAAiC;AACjC,wDAAkC;AAClC,8CAAoF;AACpF,+EAAyD;AAOzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,SAAe,CAAC;wDAAC,
|
|
1
|
+
{"version":3,"file":"T.js","sourceRoot":"","sources":["../../../src/server/inline/T.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAuD;AACvD,sEAAgD;AAChD,0EAAoD;AACpD,+BAAiC;AACjC,wDAAkC;AAClC,8CAAoF;AACpF,+EAAyD;AAOzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,SAAe,CAAC;wDAAC,EAWhB;;;YAVC,QAAQ,cAAA,EACR,EAAE,QAAA,EACF,OAAO,aAAA,EACP,SAAS,eAAA,EACT,gBAAgB,sBAAA;;;;oBAQhB,IAAI,CAAC,QAAQ,EAAE,CAAC;wBACd,sBAAO;oBACT,CAAC;oBAEK,UAAU,GAAG,IAAA,uBAAa,GAAE,CAAC;oBACpB,qBAAM,IAAA,mBAAS,GAAE,EAAA;;oBAA1B,MAAM,GAAG,SAAiB;oBAC1B,aAAa,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;oBAC9C,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;oBAKnE,IAAI,mBAAmB,EAAE,CAAC;wBACxB,mBAAmB,GAAG,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC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AC,IAAI,CAAC,EAAE,EAAE,CAAC;wBACpE,kCAAkC;wBAClC,iDAAiD;wBACjD,wGAAwG;wBACxG,sBAAO,aAAa,EAAC;oBACvB,CAAC;oBAED,8DAA8D;oBAC9D,uDAAuD;oBACvD,sBAAO,CACL,uBAAC,gBAAQ,IAAC,QAAQ,EAAE,eAAe,YACjC,uBAAC,kBAAQ,IAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,GAAI,GAC/C,CACZ,EAAC;;;;CACH;AAED,CAAC,CAAC,gBAAgB,GAAG,kBAAkB,CAAC;AAExC,kBAAe,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gt-next",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "A Next.js library for automatic internationalization.",
|
|
5
5
|
"main": "dist/index.server.js",
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"generaltranslation": "^
|
|
8
|
-
"
|
|
7
|
+
"@generaltranslation/supported-locales": "^0.0.2",
|
|
8
|
+
"generaltranslation": "^4.1.2",
|
|
9
|
+
"gt-react-cli": "^0.2.2",
|
|
9
10
|
"next": ">=13.0.0",
|
|
10
11
|
"react": ">=16.8.0 || >=19.0.0-rc",
|
|
11
12
|
"react-dom": ">=16.8.0 || >=19.0.0-rc"
|
|
@@ -121,6 +122,6 @@
|
|
|
121
122
|
"i18n"
|
|
122
123
|
],
|
|
123
124
|
"dependencies": {
|
|
124
|
-
"gt-react": "^6.1.
|
|
125
|
+
"gt-react": "^6.1.5"
|
|
125
126
|
}
|
|
126
127
|
}
|