generaltranslation 7.8.0 → 7.9.1
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/CHANGELOG.md +12 -0
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/internal.d.ts +2 -1
- package/dist/types-dir/{enqueueEntries.d.ts → api/enqueueEntries.d.ts} +1 -1
- package/dist/types-dir/{enqueueFiles.d.ts → api/enqueueFiles.d.ts} +1 -1
- package/dist/types-dir/{entry.d.ts → api/entry.d.ts} +1 -1
- package/dist/types-dir/{translate.d.ts → api/translate.d.ts} +1 -1
- package/dist/types-dir/{uploadFiles.d.ts → api/uploadFiles.d.ts} +1 -1
- package/dist/types-dir/transformations.d.ts +6 -0
- package/dist/types.cjs.min.cjs.map +1 -1
- package/dist/types.d.ts +6 -4
- package/dist/types.esm.min.mjs.map +1 -1
- package/package.json +1 -1
- /package/dist/types-dir/{checkFileTranslations.d.ts → api/checkFileTranslations.d.ts} +0 -0
- /package/dist/types-dir/{downloadFile.d.ts → api/downloadFile.d.ts} +0 -0
- /package/dist/types-dir/{downloadFileBatch.d.ts → api/downloadFileBatch.d.ts} +0 -0
- /package/dist/types-dir/{fetchTranslations.d.ts → api/fetchTranslations.d.ts} +0 -0
- /package/dist/types-dir/{file.d.ts → api/file.d.ts} +0 -0
- /package/dist/types-dir/{project.d.ts → api/project.d.ts} +0 -0
- /package/dist/types-dir/{translateMany.d.ts → api/translateMany.d.ts} +0 -0
- /package/dist/types-dir/{translationStatus.d.ts → api/translationStatus.d.ts} +0 -0
- /package/dist/types-dir/{content.d.ts → jsx/content.d.ts} +0 -0
- /package/dist/types-dir/{variables.d.ts → jsx/variables.d.ts} +0 -0
package/dist/internal.d.ts
CHANGED
|
@@ -84,11 +84,12 @@ type JsxChild = string | JsxElement | Variable;
|
|
|
84
84
|
*/
|
|
85
85
|
type JsxChildren = JsxChild | JsxChild[];
|
|
86
86
|
|
|
87
|
+
type VariableTransformationSuffix = 'variable' | 'number' | 'datetime' | 'currency';
|
|
88
|
+
|
|
87
89
|
/**
|
|
88
90
|
* @deprecated Use {@link Content} instead.
|
|
89
91
|
*/
|
|
90
92
|
type _Content = string | Array<string | Variable>;
|
|
91
|
-
type VariableTransformationSuffix = 'variable' | 'number' | 'datetime' | 'currency';
|
|
92
93
|
|
|
93
94
|
declare function isVariable(obj: unknown): obj is Variable;
|
|
94
95
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transformations are made from a prefix and a suffix.
|
|
3
|
+
*/
|
|
4
|
+
export type Transformation = 'translate-client' | 'translate-server' | 'translate-runtime' | 'variable-variable' | 'variable-currency' | 'variable-datetime' | 'variable-number' | 'plural' | 'branch';
|
|
5
|
+
export type TransformationPrefix = 'translate' | 'variable' | 'plural' | 'branch' | 'fragment';
|
|
6
|
+
export type VariableTransformationSuffix = 'variable' | 'number' | 'datetime' | 'currency';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs.min.cjs","sources":["../src/types-dir/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | 'ICU' | 'I18NEXT';\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n"],"names":["pl","ti","alt","arl","arb","ard"],"mappings":"wCAKkC,CAChCA,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
|
|
1
|
+
{"version":3,"file":"types.cjs.min.cjs","sources":["../src/types-dir/jsx/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | 'ICU' | 'I18NEXT';\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n"],"names":["pl","ti","alt","arl","arb","ard"],"mappings":"wCAKkC,CAChCA,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
|
package/dist/types.d.ts
CHANGED
|
@@ -304,16 +304,18 @@ type TranslationResult = RequestSuccess | TranslationError;
|
|
|
304
304
|
*/
|
|
305
305
|
type TranslateManyResult = Array<TranslationResult>;
|
|
306
306
|
|
|
307
|
-
/**
|
|
308
|
-
* @deprecated Use {@link Content} instead.
|
|
309
|
-
*/
|
|
310
|
-
type _Content = string | Array<string | Variable>;
|
|
311
307
|
/**
|
|
312
308
|
* Transformations are made from a prefix and a suffix.
|
|
313
309
|
*/
|
|
314
310
|
type Transformation = 'translate-client' | 'translate-server' | 'translate-runtime' | 'variable-variable' | 'variable-currency' | 'variable-datetime' | 'variable-number' | 'plural' | 'branch';
|
|
315
311
|
type TransformationPrefix = 'translate' | 'variable' | 'plural' | 'branch' | 'fragment';
|
|
316
312
|
type VariableTransformationSuffix = 'variable' | 'number' | 'datetime' | 'currency';
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @deprecated Use {@link Content} instead.
|
|
316
|
+
*/
|
|
317
|
+
type _Content = string | Array<string | Variable>;
|
|
318
|
+
|
|
317
319
|
type Metadata = {
|
|
318
320
|
context?: string;
|
|
319
321
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.min.mjs","sources":["../src/types-dir/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | 'ICU' | 'I18NEXT';\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n"],"names":["HTML_CONTENT_PROPS","pl","ti","alt","arl","arb","ard"],"mappings":"AAKO,IAAMA,EAAqB,CAChCC,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
|
|
1
|
+
{"version":3,"file":"types.esm.min.mjs","sources":["../src/types-dir/jsx/content.ts"],"sourcesContent":["import { Variable } from './variables';\n\n/**\n * Map of data-_gt properties to their corresponding React props\n */\nexport const HTML_CONTENT_PROPS = {\n pl: 'placeholder',\n ti: 'title',\n alt: 'alt',\n arl: 'aria-label',\n arb: 'aria-labelledby',\n ard: 'aria-describedby',\n} as const;\n\nexport type HtmlContentPropKeysRecord = Partial<\n Record<keyof typeof HTML_CONTENT_PROPS, string>\n>;\nexport type HtmlContentPropValuesRecord = Partial<\n Record<(typeof HTML_CONTENT_PROPS)[keyof typeof HTML_CONTENT_PROPS], string>\n>;\n\n/**\n * GTProp is an internal property used to contain data for translating and rendering elements.\n * note, transformations are only read on the server side if they are 'plural' or 'branch'\n */\nexport type GTProp = {\n b?: Record<string, JsxChildren>; // Branches\n t?: 'p' | 'b'; // Branch Transformation\n} & HtmlContentPropKeysRecord;\n\nexport type JsxElement = {\n t?: string; // tag name\n i?: number; // id\n d?: GTProp; // GT data\n c?: JsxChildren; // children\n};\n\nexport type JsxChild = string | JsxElement | Variable;\n\n/**\n * The format of the content\n */\nexport type DataFormat = 'JSX' | 'ICU' | 'I18NEXT';\n\n/**\n * A content type representing JSX, ICU, and I18next messages\n */\nexport type Content = JsxChildren | IcuMessage | I18nextMessage;\n\n/**\n * A content type representing JSX elements\n */\nexport type JsxChildren = JsxChild | JsxChild[];\n\n/**\n * A content type representing ICU messages\n */\nexport type IcuMessage = string;\n\n/**\n * A content type representing I18next messages\n */\nexport type I18nextMessage = string;\n"],"names":["HTML_CONTENT_PROPS","pl","ti","alt","arl","arb","ard"],"mappings":"AAKO,IAAMA,EAAqB,CAChCC,GAAI,cACJC,GAAI,QACJC,IAAK,MACLC,IAAK,aACLC,IAAK,kBACLC,IAAK"}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|