gt-next 6.2.5-alpha.2 → 6.2.5-alpha.4
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/errors/createErrors.d.ts +1 -0
- package/dist/errors/createErrors.d.ts.map +1 -1
- package/dist/errors/createErrors.js +5 -1
- package/dist/errors/createErrors.js.map +1 -1
- package/dist/index.client.d.ts +2 -2
- package/dist/index.client.d.ts.map +1 -1
- package/dist/index.client.js +4 -2
- package/dist/index.client.js.map +1 -1
- package/dist/index.server.d.ts +2 -2
- package/dist/index.server.d.ts.map +1 -1
- package/dist/index.server.js +4 -2
- package/dist/index.server.js.map +1 -1
- package/dist/index.types.d.ts +2 -2
- package/dist/index.types.d.ts.map +1 -1
- package/dist/index.types.js +4 -2
- package/dist/index.types.js.map +1 -1
- package/dist/server-dir/buildtime/getTranslations.d.ts.map +1 -1
- package/dist/server-dir/buildtime/getTranslations.js +10 -7
- package/dist/server-dir/buildtime/getTranslations.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,6 +23,7 @@ export declare const createStringRenderError: (message: string, id: string | und
|
|
|
23
23
|
export declare const usingDefaultsWarning = "gt-next: Unable to access gt-next configuration. Using defaults.";
|
|
24
24
|
export declare const createNoEntryFoundWarning: (id: string) => string;
|
|
25
25
|
export declare const createInvalidDictionaryEntryWarning: (id: string) => string;
|
|
26
|
+
export declare const createInvalidDictionaryTranslationEntryWarning: (id: string) => string;
|
|
26
27
|
export declare const createUnsupportedLocalesWarning: (locales: string[]) => string;
|
|
27
28
|
export declare const createMismatchingHashWarning: (expectedHash: string, receivedHash: string) => string;
|
|
28
29
|
export declare const projectIdMissingWarn = "gt-next: Project ID missing! Set projectId as GT_PROJECT_ID in your environment or by passing the projectId parameter to withGTConfig(). Find your project ID: generaltranslation.com/dashboard.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createErrors.d.ts","sourceRoot":"","sources":["../../src/errors/createErrors.ts"],"names":[],"mapp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oBAAoB,qMAAqM,CAAC;AAEvO,eAAO,MAAM,YAAY,QAIoE,CAAC;AAE9F,eAAO,MAAM,iBAAiB,QAGqF,CAAC;AAEpH,eAAO,MAAM,+BAA+B,GAAI,8BAI7C;IACD,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,WAK8E,CAAC;AAEhF,eAAO,MAAM,gCAAgC,4CAA4C,CAAC;AAE1F,eAAO,MAAM,yBAAyB,uLAAuL,CAAC;AAE9N,eAAO,MAAM,0BAA0B,GAAI,SAAS,MAAM,EAAE,WAC8B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// ---- ERRORS ---- //
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.standardizedLocalesWarning = exports.dictionaryNotFoundWarning = exports.runtimeTranslationTimeoutWarning = exports.createTranslationLoadingWarning = exports.APIKeyMissingWarn = exports.noInitGTWarn = exports.projectIdMissingWarn = exports.createMismatchingHashWarning = exports.createUnsupportedLocalesWarning = exports.createInvalidDictionaryEntryWarning = exports.createNoEntryFoundWarning = exports.usingDefaultsWarning = exports.createStringRenderError = exports.missingVariablesError = exports.txUseClientError = exports.gtProviderUseClientError = exports.typesFileError = exports.unsupportedGetLocalePathBuildError = exports.conflictingConfigurationBuildError = exports.unresolvedGetLocaleBuildError = exports.unresolvedLoadTranslationsBuildError = exports.unresolvedLoadDictionaryBuildError = exports.unresolvedCustomLoadTranslationsError = exports.unresolvedCustomLoadDictionaryError = exports.dictionaryDisabledError = exports.createDictionarySubsetError = exports.devApiKeyIncludedInProductionError = exports.createRequiredPrefixError = exports.createDictionaryTranslationError = exports.createStringTranslationError = exports.createUnresolvedNextVersionError = exports.customLoadDictionaryWarning = exports.customLoadTranslationsError = exports.remoteTranslationsError = void 0;
|
|
4
|
+
exports.standardizedLocalesWarning = exports.dictionaryNotFoundWarning = exports.runtimeTranslationTimeoutWarning = exports.createTranslationLoadingWarning = exports.APIKeyMissingWarn = exports.noInitGTWarn = exports.projectIdMissingWarn = exports.createMismatchingHashWarning = exports.createUnsupportedLocalesWarning = exports.createInvalidDictionaryTranslationEntryWarning = exports.createInvalidDictionaryEntryWarning = exports.createNoEntryFoundWarning = exports.usingDefaultsWarning = exports.createStringRenderError = exports.missingVariablesError = exports.txUseClientError = exports.gtProviderUseClientError = exports.typesFileError = exports.unsupportedGetLocalePathBuildError = exports.conflictingConfigurationBuildError = exports.unresolvedGetLocaleBuildError = exports.unresolvedLoadTranslationsBuildError = exports.unresolvedLoadDictionaryBuildError = exports.unresolvedCustomLoadTranslationsError = exports.unresolvedCustomLoadDictionaryError = exports.dictionaryDisabledError = exports.createDictionarySubsetError = exports.devApiKeyIncludedInProductionError = exports.createRequiredPrefixError = exports.createDictionaryTranslationError = exports.createStringTranslationError = exports.createUnresolvedNextVersionError = exports.customLoadDictionaryWarning = exports.customLoadTranslationsError = exports.remoteTranslationsError = void 0;
|
|
5
5
|
var generaltranslation_1 = require("generaltranslation");
|
|
6
6
|
exports.remoteTranslationsError = 'gt-next Error: fetching remote translation.';
|
|
7
7
|
var customLoadTranslationsError = function (locale) {
|
|
@@ -81,6 +81,10 @@ var createInvalidDictionaryEntryWarning = function (id) {
|
|
|
81
81
|
return "gt-next: Invalid dictionary entry found for id: \"".concat(id, "\"");
|
|
82
82
|
};
|
|
83
83
|
exports.createInvalidDictionaryEntryWarning = createInvalidDictionaryEntryWarning;
|
|
84
|
+
var createInvalidDictionaryTranslationEntryWarning = function (id) {
|
|
85
|
+
return "gt-next: Invalid dictionary translation entry found for id: \"".concat(id, "\"");
|
|
86
|
+
};
|
|
87
|
+
exports.createInvalidDictionaryTranslationEntryWarning = createInvalidDictionaryTranslationEntryWarning;
|
|
84
88
|
var createUnsupportedLocalesWarning = function (locales) {
|
|
85
89
|
return "gt-next: The following locales are currently unsupported by our service: ".concat(locales
|
|
86
90
|
.map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Num, Currency, DateTime, T, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection } from 'gt-react/client';
|
|
2
|
-
import {
|
|
2
|
+
import { msg, decodeMsg, decodeOptions } from 'gt-react/internal';
|
|
3
3
|
import { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions } from 'gt-react';
|
|
4
4
|
export declare function GTProvider(): void;
|
|
5
5
|
export declare function Tx(): void;
|
|
6
|
-
export { T, Var, Num, Currency, DateTime, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions,
|
|
6
|
+
export { T, Var, Num, Currency, DateTime, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, msg, decodeMsg, decodeOptions, };
|
|
7
7
|
//# sourceMappingURL=index.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,CAAC,EACD,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,CAAC,EACD,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKlE,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAGlB,wBAAgB,UAAU,SAEzB;AAGD,wBAAgB,EAAE,SAEjB;AAED,OAAO,EACL,CAAC,EACD,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,GAAG,EACH,SAAS,EACT,aAAa,GACd,CAAC"}
|
package/dist/index.client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useLocaleDirection = exports.useLocaleProperties = exports.useGTClass = exports.useDefaultLocale = exports.useLocales = exports.useLocale = exports.useTranslations = exports.useGT = exports.RegionSelector = exports.LocaleSelector = exports.Plural = exports.Branch = exports.DateTime = exports.Currency = exports.Num = exports.Var = exports.T = void 0;
|
|
5
5
|
exports.GTProvider = GTProvider;
|
|
6
6
|
exports.Tx = Tx;
|
|
7
7
|
var client_1 = require("gt-react/client");
|
|
@@ -23,7 +23,9 @@ Object.defineProperty(exports, "useGTClass", { enumerable: true, get: function (
|
|
|
23
23
|
Object.defineProperty(exports, "useLocaleProperties", { enumerable: true, get: function () { return client_1.useLocaleProperties; } });
|
|
24
24
|
Object.defineProperty(exports, "useLocaleDirection", { enumerable: true, get: function () { return client_1.useLocaleDirection; } });
|
|
25
25
|
var internal_1 = require("gt-react/internal");
|
|
26
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "msg", { enumerable: true, get: function () { return internal_1.msg; } });
|
|
27
|
+
Object.defineProperty(exports, "decodeMsg", { enumerable: true, get: function () { return internal_1.decodeMsg; } });
|
|
28
|
+
Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: function () { return internal_1.decodeOptions; } });
|
|
27
29
|
var createErrors_1 = require("./errors/createErrors");
|
|
28
30
|
// Mock <GTProvider> which throws an error
|
|
29
31
|
function GTProvider() {
|
package/dist/index.client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AAiCb,gCAEC;AAGD,gBAEC;AAtCD,0CAkByB;AAwBvB,oFAzCA,YAAG,OAyCA;AACH,oFAzCA,YAAG,OAyCA;AACH,yFAzCA,iBAAQ,OAyCA;AACR,yFAzCA,iBAAQ,OAyCA;AAJR,kFApCA,UAAC,OAoCA;AAKD,uFAxCA,eAAM,OAwCA;AACN,uFAxCA,eAAM,OAwCA;AACN,+FAxCA,uBAAc,OAwCA;AACd,+FAxCA,uBAAc,OAwCA;AACd,sFAxCA,cAAK,OAwCA;AACL,gGAxCA,wBAAe,OAwCA;AACf,0FAxCA,kBAAS,OAwCA;AACT,2FAxCA,mBAAU,OAwCA;AACV,iGAxCA,yBAAgB,OAwCA;AAChB,2FAxCA,mBAAU,OAwCA;AACV,oGAxCA,4BAAmB,OAwCA;AACnB,mGAxCA,2BAAkB,OAwCA;AAtCpB,
|
|
1
|
+
{"version":3,"file":"index.client.js","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AAiCb,gCAEC;AAGD,gBAEC;AAtCD,0CAkByB;AAwBvB,oFAzCA,YAAG,OAyCA;AACH,oFAzCA,YAAG,OAyCA;AACH,yFAzCA,iBAAQ,OAyCA;AACR,yFAzCA,iBAAQ,OAyCA;AAJR,kFApCA,UAAC,OAoCA;AAKD,uFAxCA,eAAM,OAwCA;AACN,uFAxCA,eAAM,OAwCA;AACN,+FAxCA,uBAAc,OAwCA;AACd,+FAxCA,uBAAc,OAwCA;AACd,sFAxCA,cAAK,OAwCA;AACL,gGAxCA,wBAAe,OAwCA;AACf,0FAxCA,kBAAS,OAwCA;AACT,2FAxCA,mBAAU,OAwCA;AACV,iGAxCA,yBAAgB,OAwCA;AAChB,2FAxCA,mBAAU,OAwCA;AACV,oGAxCA,4BAAmB,OAwCA;AACnB,mGAxCA,2BAAkB,OAwCA;AAtCpB,8CAAkE;AA0ChE,oFA1CO,cAAG,OA0CP;AACH,0FA3CY,oBAAS,OA2CZ;AACT,8FA5CuB,wBAAa,OA4CvB;AA3Cf,sDAG+B;AAO/B,0CAA0C;AAC1C,SAAgB,UAAU;IACxB,MAAM,IAAI,KAAK,CAAC,uCAAwB,CAAC,CAAC;AAC5C,CAAC;AAED,kCAAkC;AAClC,SAAgB,EAAE;IAChB,MAAM,IAAI,KAAK,CAAC,+BAAgB,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/index.server.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { useGT } from './server-dir/buildtime/getGT';
|
|
|
11
11
|
import { useTranslations } from './server-dir/buildtime/getTranslations';
|
|
12
12
|
import { useLocale } from './request/getLocale';
|
|
13
13
|
import { useLocaleDirection } from './request/getLocaleDirection';
|
|
14
|
-
import {
|
|
14
|
+
import { msg, decodeMsg, decodeOptions } from 'gt-react/internal';
|
|
15
15
|
import { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions } from 'gt-react';
|
|
16
16
|
import { GT } from 'generaltranslation';
|
|
17
17
|
export { LocaleSelector, RegionSelector } from './index.client';
|
|
@@ -19,5 +19,5 @@ export declare function useGTClass(): GT;
|
|
|
19
19
|
export declare function useLocaleProperties(locale: string): import("generaltranslation/dist/locales/getLocaleProperties").LocaleProperties;
|
|
20
20
|
export declare function useLocales(): string[];
|
|
21
21
|
export declare function useDefaultLocale(): string;
|
|
22
|
-
export { GTProvider, T, Tx, Var, Num, Currency, DateTime, Branch, Plural, useGT, useTranslations, useLocale, useLocaleDirection, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions,
|
|
22
|
+
export { GTProvider, T, Tx, Var, Num, Currency, DateTime, Branch, Plural, useGT, useTranslations, useLocale, useLocaleDirection, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, msg, decodeMsg, decodeOptions, };
|
|
23
23
|
//# sourceMappingURL=index.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,iBAAiB,CAAC;AAClC,OAAO,GAAG,MAAM,iBAAiB,CAAC;AAClC,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,CAAC,MAAM,0BAA0B,CAAC;AACzC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,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AA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,GAAG,EACH,SAAS,EACT,aAAa,GACd,CAAC"}
|
package/dist/index.server.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useLocaleDirection = exports.useLocale = exports.useTranslations = exports.useGT = exports.Plural = exports.Branch = exports.DateTime = exports.Currency = exports.Num = exports.Var = exports.Tx = exports.T = exports.GTProvider = exports.RegionSelector = exports.LocaleSelector = void 0;
|
|
7
7
|
exports.useGTClass = useGTClass;
|
|
8
8
|
exports.useLocaleProperties = useLocaleProperties;
|
|
9
9
|
exports.useLocales = useLocales;
|
|
@@ -36,7 +36,9 @@ var getLocaleDirection_1 = require("./request/getLocaleDirection");
|
|
|
36
36
|
Object.defineProperty(exports, "useLocaleDirection", { enumerable: true, get: function () { return getLocaleDirection_1.useLocaleDirection; } });
|
|
37
37
|
var getI18NConfig_1 = __importDefault(require("./config-dir/getI18NConfig"));
|
|
38
38
|
var internal_1 = require("gt-react/internal");
|
|
39
|
-
Object.defineProperty(exports, "
|
|
39
|
+
Object.defineProperty(exports, "msg", { enumerable: true, get: function () { return internal_1.msg; } });
|
|
40
|
+
Object.defineProperty(exports, "decodeMsg", { enumerable: true, get: function () { return internal_1.decodeMsg; } });
|
|
41
|
+
Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: function () { return internal_1.decodeOptions; } });
|
|
40
42
|
var index_client_1 = require("./index.client");
|
|
41
43
|
Object.defineProperty(exports, "LocaleSelector", { enumerable: true, get: function () { return index_client_1.LocaleSelector; } });
|
|
42
44
|
Object.defineProperty(exports, "RegionSelector", { enumerable: true, get: function () { return index_client_1.RegionSelector; } });
|
package/dist/index.server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":";;;;;;AAwBA,gCAEC;AAED,kDAEC;AAED,gCAEC;AAED,4CAEC;AAtCD,wDAAkC;AA4ChC,cA5CK,aAAG,CA4CL;AA3CL,wDAAkC;AA4ChC,cA5CK,aAAG,CA4CL;AA3CL,kEAA4C;AA4C1C,mBA5CK,kBAAQ,CA4CL;AA3CV,kEAA4C;AA4C1C,mBA5CK,kBAAQ,CA4CL;AA3CV,+DAAyC;AAsCvC,YAtCK,WAAC,CAsCL;AArCH,6DAAuC;AA2CrC,iBA3CK,gBAAM,CA2CL;AA1CR,6DAAuC;AA2CrC,iBA3CK,gBAAM,CA2CL;AA1CR,qEAA+C;AAkC7C,qBAlCK,oBAAU,CAkCL;AAjCZ,mCAA8B;AAmC5B,mFAnCO,WAAE,OAmCP;AAlCJ,sDAAqD;AAyCnD,sFAzCO,aAAK,OAyCP;AAxCP,0EAAyE;AAyCvE,gGAzCO,iCAAe,OAyCP;AAxCjB,iDAAgD;AAyC9C,0FAzCO,qBAAS,OAyCP;AAxCX,mEAAkE;AAyChE,mGAzCO,uCAAkB,OAyCP;AAxCpB,6EAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"index.server.js","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":";;;;;;AAwBA,gCAEC;AAED,kDAEC;AAED,gCAEC;AAED,4CAEC;AAtCD,wDAAkC;AA4ChC,cA5CK,aAAG,CA4CL;AA3CL,wDAAkC;AA4ChC,cA5CK,aAAG,CA4CL;AA3CL,kEAA4C;AA4C1C,mBA5CK,kBAAQ,CA4CL;AA3CV,kEAA4C;AA4C1C,mBA5CK,kBAAQ,CA4CL;AA3CV,+DAAyC;AAsCvC,YAtCK,WAAC,CAsCL;AArCH,6DAAuC;AA2CrC,iBA3CK,gBAAM,CA2CL;AA1CR,6DAAuC;AA2CrC,iBA3CK,gBAAM,CA2CL;AA1CR,qEAA+C;AAkC7C,qBAlCK,oBAAU,CAkCL;AAjCZ,mCAA8B;AAmC5B,mFAnCO,WAAE,OAmCP;AAlCJ,sDAAqD;AAyCnD,sFAzCO,aAAK,OAyCP;AAxCP,0EAAyE;AAyCvE,gGAzCO,iCAAe,OAyCP;AAxCjB,iDAAgD;AAyC9C,0FAzCO,qBAAS,OAyCP;AAxCX,mEAAkE;AAyChE,mGAzCO,uCAAkB,OAyCP;AAxCpB,6EAAuD;AACvD,8CAAkE;AA2ChE,oFA3CO,cAAG,OA2CP;AACH,0FA5CY,oBAAS,OA4CZ;AACT,8FA7CuB,wBAAa,OA6CvB;AArCf,+CAAgE;AAAvD,8GAAA,cAAc,OAAA;AAAE,8GAAA,cAAc,OAAA;AAEvC,SAAgB,UAAU;IACxB,OAAO,IAAA,uBAAa,GAAE,CAAC,UAAU,EAAE,CAAC;AACtC,CAAC;AAED,SAAgB,mBAAmB,CAAC,MAAc;IAChD,OAAQ,UAAU,EAAS,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC1D,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,IAAA,uBAAa,GAAE,CAAC,UAAU,EAAE,CAAC;AACtC,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,uBAAa,GAAE,CAAC,gBAAgB,EAAE,CAAC;AAC5C,CAAC"}
|
package/dist/index.types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import _GTProvider from './provider/GTProvider';
|
|
|
2
2
|
import _T from './server-dir/buildtime/T';
|
|
3
3
|
import { useGT as _useGT, useTranslations as _useTranslations, useLocale as _useLocale, useLocales as _useLocales, useDefaultLocale as _useDefaultLocale, useGTClass as _useGTClass, useLocaleProperties as _useLocaleProperties, Currency as _Currency, DateTime as _DateTime, Num as _Num, Var as _Var, Branch as _Branch, Plural as _Plural, LocaleSelector as _LocaleSelector, RegionSelector as _RegionSelector, useLocaleDirection as _useLocaleDirection } from 'gt-react/client';
|
|
4
4
|
import { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions } from 'gt-react';
|
|
5
|
-
import {
|
|
5
|
+
import { msg, decodeMsg, decodeOptions } from 'gt-react/internal';
|
|
6
6
|
/**
|
|
7
7
|
* Provides General Translation context to its children, which can then access `useGT`, `useLocale`, and `useDefaultLocale`.
|
|
8
8
|
*
|
|
@@ -289,5 +289,5 @@ export declare const useLocaleDirection: typeof _useLocaleDirection;
|
|
|
289
289
|
*/
|
|
290
290
|
export declare const RegionSelector: typeof _RegionSelector;
|
|
291
291
|
export { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, };
|
|
292
|
-
export {
|
|
292
|
+
export { msg, decodeMsg, decodeOptions };
|
|
293
293
|
//# sourceMappingURL=index.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../src/index.types.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC1C,OAAO,EACL,KAAK,IAAI,MAAM,EACf,eAAe,IAAI,gBAAgB,EACnC,SAAS,IAAI,UAAU,EACvB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,UAAU,IAAI,WAAW,EACzB,mBAAmB,IAAI,oBAAoB,EAC3C,QAAQ,IAAI,SAAS,EACrB,QAAQ,IAAI,SAAS,EACrB,GAAG,IAAI,IAAI,EACX,GAAG,IAAI,IAAI,EACX,MAAM,IAAI,OAAO,EACjB,MAAM,IAAI,OAAO,EACjB,cAAc,IAAI,eAAe,EACjC,cAAc,IAAI,eAAe,EACjC,kBAAkB,IAAI,mBAAmB,EAC1C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;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;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,OAE3B,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,MAAM,EAAE,OAAO,OAE3B,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,eAEnC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK,EAAE,OAAO,MAE1B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,gBAEpC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,UAE9B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,WAE/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,iBAErC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,WAE/B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,oBAExC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,mBAEvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,eAEnC,CAAC;AAEF,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.types.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.decodeOptions = exports.decodeMsg = exports.msg = exports.RegionSelector = exports.useLocaleDirection = exports.useLocaleProperties = exports.useGTClass = exports.useDefaultLocale = exports.useLocales = exports.useLocale = exports.useTranslations = exports.useGT = exports.LocaleSelector = exports.Plural = exports.Branch = exports.Var = exports.Num = exports.DateTime = exports.Currency = exports.T = exports.GTProvider = void 0;
|
|
4
4
|
var createErrors_1 = require("./errors/createErrors");
|
|
5
5
|
var internal_1 = require("gt-react/internal");
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "msg", { enumerable: true, get: function () { return internal_1.msg; } });
|
|
7
|
+
Object.defineProperty(exports, "decodeMsg", { enumerable: true, get: function () { return internal_1.decodeMsg; } });
|
|
8
|
+
Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: function () { return internal_1.decodeOptions; } });
|
|
7
9
|
/**
|
|
8
10
|
* Provides General Translation context to its children, which can then access `useGT`, `useLocale`, and `useDefaultLocale`.
|
|
9
11
|
*
|
package/dist/index.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../src/index.types.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AA0BvD,
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../src/index.types.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AA0BvD,8CAAkE;AAyWzD,oFAzWA,cAAG,OAyWA;AAAE,0FAzWA,oBAAS,OAyWA;AAAE,8FAzWA,wBAAa,OAyWA;AAvWtC;;;;;;;;GAQG;AACI,IAAM,UAAU,GAAuB;IAC5C,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACI,IAAM,CAAC,GAAc;IAC1B,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,CAAC,KAEZ;AACF,gEAAgE;AAChE,SAAC,CAAC,IAAI,GAA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,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,IAAM,cAAc,GAA2B;IACpD,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslations.d.ts","sourceRoot":"","sources":["../../../src/server-dir/buildtime/getTranslations.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAI7B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"getTranslations.d.ts","sourceRoot":"","sources":["../../../src/server-dir/buildtime/getTranslations.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAI7B,MAAM,mBAAmB,CAAC;AAiB3B;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CACnC,EAAE,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,KAAK,MAAM,CAAC,CA+KzE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,EAAE,CAAC,EAAE,MAAM,QA9L3B,MAAM,YAAY,4BAA4B,KAAK,MAAM,CAgMxE"}
|
|
@@ -117,7 +117,7 @@ function getTranslations(id) {
|
|
|
117
117
|
if (options === void 0) { options = {}; }
|
|
118
118
|
// Check if is a message
|
|
119
119
|
var isMessage = false;
|
|
120
|
-
var messageOptions = internal_2.
|
|
120
|
+
var messageOptions = (0, internal_2.decodeOptions)(id);
|
|
121
121
|
if (messageOptions) {
|
|
122
122
|
isMessage = true;
|
|
123
123
|
options = messageOptions;
|
|
@@ -126,7 +126,7 @@ function getTranslations(id) {
|
|
|
126
126
|
id = !isMessage ? getId(id) : id;
|
|
127
127
|
var value = !isMessage
|
|
128
128
|
? (0, internal_1.getDictionaryEntry)(dictionary, id)
|
|
129
|
-
: internal_2.
|
|
129
|
+
: (0, internal_2.decodeMsg)(id);
|
|
130
130
|
// Check: no entry found
|
|
131
131
|
if (!value) {
|
|
132
132
|
console.warn((0, createErrors_1.createNoEntryFoundWarning)(id));
|
|
@@ -156,9 +156,10 @@ function getTranslations(id) {
|
|
|
156
156
|
// Get dictionaryTranslation
|
|
157
157
|
var dictionaryTranslation = (0, internal_1.getDictionaryEntry)(dictionaryTranslations || {}, id);
|
|
158
158
|
// Check: invalid entry
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
if (dictionaryTranslation !== undefined &&
|
|
160
|
+
(!(0, internal_1.isValidDictionaryEntry)(dictionaryTranslation) ||
|
|
161
|
+
typeof dictionaryTranslation !== 'string')) {
|
|
162
|
+
console.warn((0, createErrors_1.createInvalidDictionaryTranslationEntryWarning)(id));
|
|
162
163
|
return renderContent(entry, [defaultLocale]);
|
|
163
164
|
}
|
|
164
165
|
// Render dictionaryTranslation
|
|
@@ -169,7 +170,9 @@ function getTranslations(id) {
|
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
172
|
// ---------- TRANSLATION ---------- //
|
|
172
|
-
var hash =
|
|
173
|
+
var hash = !isMessage
|
|
174
|
+
? (0, id_1.hashSource)(__assign(__assign({ source: entry }, ((metadata === null || metadata === void 0 ? void 0 : metadata.$context) && { context: metadata.$context })), { id: id, dataFormat: 'ICU' }))
|
|
175
|
+
: (options === null || options === void 0 ? void 0 : options.$_hash) || '';
|
|
173
176
|
var translationEntry = translations === null || translations === void 0 ? void 0 : translations[hash];
|
|
174
177
|
// ----- RENDER TRANSLATION ----- //
|
|
175
178
|
// If a translation already exists
|
|
@@ -189,7 +192,7 @@ function getTranslations(id) {
|
|
|
189
192
|
I18NConfig.translateIcu({
|
|
190
193
|
source: entry,
|
|
191
194
|
targetLocale: locale,
|
|
192
|
-
options: __assign(__assign({}, ((metadata === null || metadata === void 0 ? void 0 : metadata.$context) && { context: metadata.$context })), { id: id, hash: hash }),
|
|
195
|
+
options: __assign(__assign(__assign({}, ((metadata === null || metadata === void 0 ? void 0 : metadata.$context) && { context: metadata.$context })), (isMessage && { id: id })), { hash: hash }),
|
|
193
196
|
}).then(function (result) {
|
|
194
197
|
// Log the translation result for debugging purposes
|
|
195
198
|
// eslint-disable-next-line no-console
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslations.js","sourceRoot":"","sources":["../../../src/server-dir/buildtime/getTranslations.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getTranslations.js","sourceRoot":"","sources":["../../../src/server-dir/buildtime/getTranslations.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,0CAiLC;AAeD,0CAEC;AArOD,8CAK2B;AAE3B,iFAA2D;AAC3D,0DAMmC;AACnC,iFAA2D;AAC3D,qDAAoD;AACpD,yDAAmD;AACnD,4CAAmD;AACnD,wDAAkC;AAClC,8CAA6D;AAE7D;;;;;;;;;;;;GAYG;AACH,SAAsB,eAAe,CACnC,EAAW;;;;;;oBAIL,KAAK,GAAG,UAAC,MAAc;wBAC3B,OAAO,EAAE,CAAC,CAAC,CAAC,UAAG,EAAE,cAAI,MAAM,CAAE,CAAC,CAAC,CAAC,MAAM,CAAC;oBACzC,CAAC,CAAC;oBAEkB,qBAAM,IAAA,uBAAa,GAAE,EAAA;;oBAAnC,UAAU,GAAG,CAAC,SAAqB,CAAC,IAAI,EAAE;oBAE1C,UAAU,GAAG,IAAA,uBAAa,GAAE,CAAC;oBACpB,qBAAM,IAAA,qBAAS,GAAE,EAAA;;oBAA1B,MAAM,GAAG,SAAiB;oBAC1B,aAAa,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;oBAC7C,mBAAmB,GAAI,UAAU,CA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AAO,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,GACtD,CAAC,SAAS,IAAI,EAAE,EAAE,IAAA,EAAE,CAAC,KACxB,IAAI,MAAA,GACL;6BACF,CAAC,CAAC,IAAI,CAAC,UAAC,MAAM;gCACb,oDAAoD;gCACpD,sCAAsC;gCACtC,OAAO,CAAC,IAAI,CACV,IAAA,8CAA+B,wBAC1B,CAAC,EAAE,IAAI,EAAE,EAAE,IAAA,EAAE,CAAC,KACjB,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,CAAC,aAAa,CAAC,CAAC,EAC7C,WAAW,EAAE,aAAa,CAAC,MAAgB,EAAE;wCAC3C,MAAM;wCACN,aAAa;qCACd,CAAC,IACF,CACH,CAAC;4BACJ,CAAC,CAAC,CAAC;wBACL,CAAC;wBAAC,OAAO,KAAK,EAAE,CAAC;4BACf,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBACtB,CAAC;wBAED,qEAAqE;wBACrE,OAAO,aAAa,CAAC,KAAK,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;oBAC/C,CAAC,CAAC;oBAEF,sBAAO,CAAC,EAAC;;;;CACV;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,eAAe,CAAC,EAAW;IACzC,OAAO,IAAA,aAAG,EAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gt-next",
|
|
3
|
-
"version": "6.2.5-alpha.
|
|
3
|
+
"version": "6.2.5-alpha.4",
|
|
4
4
|
"description": "A Next.js library for automatic internationalization.",
|
|
5
5
|
"main": "dist/index.server.js",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@generaltranslation/supported-locales": "^2.0.13",
|
|
17
17
|
"generaltranslation": "^7.4.1",
|
|
18
|
-
"gt-react": "^10.3.2-alpha.
|
|
18
|
+
"gt-react": "^10.3.2-alpha.4"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"patch": "npm version patch",
|