@digitaldefiance/i18n-lib 3.6.4 → 3.7.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/README.md +124 -3
- package/package.json +1 -1
- package/src/errors/context-error.d.ts +33 -1
- package/src/errors/context-error.d.ts.map +1 -1
- package/src/errors/context-error.js +46 -3
- package/src/errors/context-error.js.map +1 -1
- package/src/errors/enhanced-error-base.d.ts +120 -0
- package/src/errors/enhanced-error-base.d.ts.map +1 -0
- package/src/errors/enhanced-error-base.js +165 -0
- package/src/errors/enhanced-error-base.js.map +1 -0
- package/src/errors/handleable.d.ts +38 -2
- package/src/errors/handleable.d.ts.map +1 -1
- package/src/errors/handleable.js +38 -2
- package/src/errors/handleable.js.map +1 -1
- package/src/errors/i18n-error.d.ts +91 -27
- package/src/errors/i18n-error.d.ts.map +1 -1
- package/src/errors/i18n-error.js +150 -40
- package/src/errors/i18n-error.js.map +1 -1
- package/src/errors/index.d.ts +1 -0
- package/src/errors/index.d.ts.map +1 -1
- package/src/errors/index.js +1 -0
- package/src/errors/index.js.map +1 -1
- package/src/errors/translatable-generic.d.ts +55 -1
- package/src/errors/translatable-generic.d.ts.map +1 -1
- package/src/errors/translatable-generic.js +64 -1
- package/src/errors/translatable-generic.js.map +1 -1
- package/src/errors/translatable-handleable-generic.d.ts +88 -1
- package/src/errors/translatable-handleable-generic.d.ts.map +1 -1
- package/src/errors/translatable-handleable-generic.js +77 -1
- package/src/errors/translatable-handleable-generic.js.map +1 -1
- package/src/errors/translatable.d.ts +55 -0
- package/src/errors/translatable.d.ts.map +1 -1
- package/src/errors/translatable.js +66 -0
- package/src/errors/translatable.js.map +1 -1
- package/src/errors/typed-handleable.d.ts +48 -0
- package/src/errors/typed-handleable.d.ts.map +1 -1
- package/src/errors/typed-handleable.js +48 -0
- package/src/errors/typed-handleable.js.map +1 -1
- package/src/errors/typed.d.ts +120 -4
- package/src/errors/typed.d.ts.map +1 -1
- package/src/errors/typed.js +120 -4
- package/src/errors/typed.js.map +1 -1
- package/src/icu/compiler.d.ts.map +1 -1
- package/src/icu/compiler.js +8 -2
- package/src/icu/compiler.js.map +1 -1
- package/src/icu/formatters/number-formatter.d.ts.map +1 -1
- package/src/icu/formatters/number-formatter.js +3 -0
- package/src/icu/formatters/number-formatter.js.map +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -1
- package/src/index.js.map +1 -1
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import { I18nEngine } from '../core';
|
|
2
|
+
import { GenderCategory } from '../gender/gender-categories';
|
|
2
3
|
/**
|
|
3
|
-
* Generic translatable error that works with any plugin engine and component
|
|
4
|
+
* Generic translatable error that works with any plugin engine and component.
|
|
5
|
+
*
|
|
6
|
+
* **Full i18n 3.0/3.5 Feature Support:**
|
|
7
|
+
* - ICU MessageFormat (all formatters: plural, select, selectordinal)
|
|
8
|
+
* - Pluralization for 37 languages with CLDR rules
|
|
9
|
+
* - Gender-aware translations (male, female, neutral, other)
|
|
10
|
+
* - Number formatting (integer, currency, percent)
|
|
11
|
+
* - Date/Time formatting (short, medium, long, full)
|
|
12
|
+
* - Nested messages up to 4 levels deep
|
|
13
|
+
* - Context variable injection
|
|
14
|
+
*
|
|
15
|
+
* **Usage Examples:**
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Plural-aware error
|
|
18
|
+
* new TranslatableGenericError('component', 'errorKey', { count: 5 });
|
|
19
|
+
* // Translation: \"{count, plural, one {# error} other {# errors}}\"
|
|
20
|
+
*
|
|
21
|
+
* // Gender-aware error
|
|
22
|
+
* new TranslatableGenericError('component', 'userError', { gender: 'female', name: 'Alice' });
|
|
23
|
+
* // Translation: \"{gender, select, male {He} female {She}} {name} caused an error\"
|
|
24
|
+
*
|
|
25
|
+
* // Number formatting
|
|
26
|
+
* new TranslatableGenericError('component', 'thresholdError', { value: 1500.50, limit: 1000 });
|
|
27
|
+
* // Translation: \"Value {value, number, currency} exceeds {limit, number, currency}\"
|
|
28
|
+
*
|
|
29
|
+
* // SelectOrdinal
|
|
30
|
+
* new TranslatableGenericError('component', 'stepError', { step: 3 });
|
|
31
|
+
* // Translation: \"Failed at {step, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step\"
|
|
32
|
+
* ```
|
|
4
33
|
*/
|
|
5
34
|
export declare class TranslatableGenericError<TStringKey extends string = string> extends Error {
|
|
6
35
|
readonly stringKey: TStringKey;
|
|
@@ -26,5 +55,30 @@ export declare class TranslatableGenericError<TStringKey extends string = string
|
|
|
26
55
|
* Retranslate the error message in a different language
|
|
27
56
|
*/
|
|
28
57
|
retranslate(language: string, instanceKey?: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Create error with plural count
|
|
60
|
+
* Translation string should use ICU plural format
|
|
61
|
+
*/
|
|
62
|
+
static withCount<TStringKey extends string>(componentId: string, stringKey: TStringKey, count: number, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string): TranslatableGenericError<TStringKey>;
|
|
63
|
+
/**
|
|
64
|
+
* Create error with gender context
|
|
65
|
+
* Translation string should use ICU select format
|
|
66
|
+
*/
|
|
67
|
+
static withGender<TStringKey extends string>(componentId: string, stringKey: TStringKey, gender: GenderCategory, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string): TranslatableGenericError<TStringKey>;
|
|
68
|
+
/**
|
|
69
|
+
* Create error with ordinal number
|
|
70
|
+
* Translation string should use ICU selectordinal format
|
|
71
|
+
*/
|
|
72
|
+
static withOrdinal<TStringKey extends string>(componentId: string, stringKey: TStringKey, ordinalNumber: number, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string): TranslatableGenericError<TStringKey>;
|
|
73
|
+
/**
|
|
74
|
+
* Create error with number formatting
|
|
75
|
+
* Translation string should use ICU number format
|
|
76
|
+
*/
|
|
77
|
+
static withNumberFormat<TStringKey extends string>(componentId: string, stringKey: TStringKey, value: number, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string): TranslatableGenericError<TStringKey>;
|
|
78
|
+
/**
|
|
79
|
+
* Create error with multiple i18n features combined
|
|
80
|
+
* Translation string can use nested ICU messages
|
|
81
|
+
*/
|
|
82
|
+
static withMultipleFeatures<TStringKey extends string>(componentId: string, stringKey: TStringKey, features: Record<string, string | number>, language?: string, instanceKey?: string): TranslatableGenericError<TStringKey>;
|
|
29
83
|
}
|
|
30
84
|
//# sourceMappingURL=translatable-generic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC
|
|
1
|
+
{"version":3,"file":"translatable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,wBAAwB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IACrF,SAAgB,SAAS,EAAE,UAAU,CAAC;IACtC,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClC,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5D,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE/C;;;;;;;;OAQG;gBAED,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,E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S,EAAE,UAAU,EACrB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,UAAU,CAAC;IAWvC;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,UAAU,SAAS,MAAM,EAC/C,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,UAAU,CAAC;IAWvC;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,UAAU,SAAS,MAAM,EACnD,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACzC,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,UAAU,CAAC;CAUxC"}
|
|
@@ -3,7 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TranslatableGenericError = void 0;
|
|
4
4
|
const core_1 = require("../core");
|
|
5
5
|
/**
|
|
6
|
-
* Generic translatable error that works with any plugin engine and component
|
|
6
|
+
* Generic translatable error that works with any plugin engine and component.
|
|
7
|
+
*
|
|
8
|
+
* **Full i18n 3.0/3.5 Feature Support:**
|
|
9
|
+
* - ICU MessageFormat (all formatters: plural, select, selectordinal)
|
|
10
|
+
* - Pluralization for 37 languages with CLDR rules
|
|
11
|
+
* - Gender-aware translations (male, female, neutral, other)
|
|
12
|
+
* - Number formatting (integer, currency, percent)
|
|
13
|
+
* - Date/Time formatting (short, medium, long, full)
|
|
14
|
+
* - Nested messages up to 4 levels deep
|
|
15
|
+
* - Context variable injection
|
|
16
|
+
*
|
|
17
|
+
* **Usage Examples:**
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // Plural-aware error
|
|
20
|
+
* new TranslatableGenericError('component', 'errorKey', { count: 5 });
|
|
21
|
+
* // Translation: \"{count, plural, one {# error} other {# errors}}\"
|
|
22
|
+
*
|
|
23
|
+
* // Gender-aware error
|
|
24
|
+
* new TranslatableGenericError('component', 'userError', { gender: 'female', name: 'Alice' });
|
|
25
|
+
* // Translation: \"{gender, select, male {He} female {She}} {name} caused an error\"
|
|
26
|
+
*
|
|
27
|
+
* // Number formatting
|
|
28
|
+
* new TranslatableGenericError('component', 'thresholdError', { value: 1500.50, limit: 1000 });
|
|
29
|
+
* // Translation: \"Value {value, number, currency} exceeds {limit, number, currency}\"
|
|
30
|
+
*
|
|
31
|
+
* // SelectOrdinal
|
|
32
|
+
* new TranslatableGenericError('component', 'stepError', { step: 3 });
|
|
33
|
+
* // Translation: \"Failed at {step, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step\"
|
|
34
|
+
* ```
|
|
7
35
|
*/
|
|
8
36
|
class TranslatableGenericError extends Error {
|
|
9
37
|
stringKey;
|
|
@@ -66,6 +94,41 @@ class TranslatableGenericError extends Error {
|
|
|
66
94
|
return `[${this.componentId}.${this.stringKey}]`;
|
|
67
95
|
}
|
|
68
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Create error with plural count
|
|
99
|
+
* Translation string should use ICU plural format
|
|
100
|
+
*/
|
|
101
|
+
static withCount(componentId, stringKey, count, otherVars, language, instanceKey) {
|
|
102
|
+
return new TranslatableGenericError(componentId, stringKey, { ...otherVars, count }, language, undefined, instanceKey);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Create error with gender context
|
|
106
|
+
* Translation string should use ICU select format
|
|
107
|
+
*/
|
|
108
|
+
static withGender(componentId, stringKey, gender, otherVars, language, instanceKey) {
|
|
109
|
+
return new TranslatableGenericError(componentId, stringKey, { ...otherVars, gender }, language, undefined, instanceKey);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create error with ordinal number
|
|
113
|
+
* Translation string should use ICU selectordinal format
|
|
114
|
+
*/
|
|
115
|
+
static withOrdinal(componentId, stringKey, ordinalNumber, otherVars, language, instanceKey) {
|
|
116
|
+
return new TranslatableGenericError(componentId, stringKey, { ...otherVars, ordinalNumber }, language, undefined, instanceKey);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Create error with number formatting
|
|
120
|
+
* Translation string should use ICU number format
|
|
121
|
+
*/
|
|
122
|
+
static withNumberFormat(componentId, stringKey, value, otherVars, language, instanceKey) {
|
|
123
|
+
return new TranslatableGenericError(componentId, stringKey, { ...otherVars, value }, language, undefined, instanceKey);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Create error with multiple i18n features combined
|
|
127
|
+
* Translation string can use nested ICU messages
|
|
128
|
+
*/
|
|
129
|
+
static withMultipleFeatures(componentId, stringKey, features, language, instanceKey) {
|
|
130
|
+
return new TranslatableGenericError(componentId, stringKey, features, language, undefined, instanceKey);
|
|
131
|
+
}
|
|
69
132
|
}
|
|
70
133
|
exports.TranslatableGenericError = TranslatableGenericError;
|
|
71
134
|
//# sourceMappingURL=translatable-generic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable-generic.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":";;;AAAA,kCAAqC;
|
|
1
|
+
{"version":3,"file":"translatable-generic.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":";;;AAAA,kCAAqC;AAIrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,wBAA6D,SAAQ,KAAK;IACrE,SAAS,CAAa;I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;OAGG;IACH,MAAM,CAAC,WAAW,CAChB,WAAmB,EACnB,SAAqB,EACrB,aAAqB,EACrB,SAA2C,EAC3C,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,aAAa,EAAE,EAC/B,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CACrB,WAAmB,EACnB,SAAqB,EACrB,KAAa,EACb,SAA2C,EAC3C,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,EACvB,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CACzB,WAAmB,EACnB,SAAqB,EACrB,QAAyC,EACzC,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;CACF;AA5MD,4DA4MC"}
|
|
@@ -1,7 +1,49 @@
|
|
|
1
1
|
import { IHandleable } from '../interfaces/handleable';
|
|
2
2
|
import { TranslatableGenericError } from './translatable-generic';
|
|
3
|
+
import { GenderCategory } from '../gender/gender-categories';
|
|
3
4
|
/**
|
|
4
|
-
* Generic translatable error
|
|
5
|
+
* Generic translatable handleable error with full i18n feature support.
|
|
6
|
+
*
|
|
7
|
+
* Combines translation capabilities with handleable error patterns and provides
|
|
8
|
+
* static factory methods for all i18n features.
|
|
9
|
+
*
|
|
10
|
+
* **Supported i18n Features:**
|
|
11
|
+
* - ICU MessageFormat: plural, select, selectordinal
|
|
12
|
+
* - Pluralization: 37 languages with CLDR rules
|
|
13
|
+
* - Gender support: male, female, neutral, other
|
|
14
|
+
* - Number formatting: integer, currency, percent
|
|
15
|
+
* - Nested messages: complex multi-level patterns
|
|
16
|
+
*
|
|
17
|
+
* **Usage Examples:**
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // Pluralization with handleable options
|
|
20
|
+
* throw TranslatableHandleableGenericError.withCount(
|
|
21
|
+
* 'api', 'validationError', 5,
|
|
22
|
+
* {}, 'en-US', 'default',
|
|
23
|
+
* { statusCode: 400 }
|
|
24
|
+
* );
|
|
25
|
+
*
|
|
26
|
+
* // Gender-aware messages
|
|
27
|
+
* throw TranslatableHandleableGenericError.withGender(
|
|
28
|
+
* 'user', 'accountError', 'female',
|
|
29
|
+
* {}, 'en-US', 'default',
|
|
30
|
+
* { statusCode: 403 }
|
|
31
|
+
* );
|
|
32
|
+
*
|
|
33
|
+
* // Number formatting with error handling
|
|
34
|
+
* throw TranslatableHandleableGenericError.withNumberFormat(
|
|
35
|
+
* 'payment', 'amountExceeded', 1599.99,
|
|
36
|
+
* { limit: 1000 }, 'en-US', 'default',
|
|
37
|
+
* { statusCode: 402 }
|
|
38
|
+
* );
|
|
39
|
+
*
|
|
40
|
+
* // Ordinal formatting (1st, 2nd, 3rd)
|
|
41
|
+
* throw TranslatableHandleableGenericError.withOrdinal(
|
|
42
|
+
* 'workflow', 'stepFailed', 3,
|
|
43
|
+
* {}, 'en-US', 'default',
|
|
44
|
+
* { statusCode: 500, retryable: true }
|
|
45
|
+
* );
|
|
46
|
+
* ```
|
|
5
47
|
*/
|
|
6
48
|
export declare class TranslatableHandleableGenericError<TStringKey extends string = string> extends TranslatableGenericError<TStringKey> implements IHandleable {
|
|
7
49
|
private _handled;
|
|
@@ -25,5 +67,50 @@ export declare class TranslatableHandleableGenericError<TStringKey extends strin
|
|
|
25
67
|
get handled(): boolean;
|
|
26
68
|
set handled(value: boolean);
|
|
27
69
|
toJSON(): Record<string, unknown>;
|
|
70
|
+
/**
|
|
71
|
+
* Create error with pluralization support
|
|
72
|
+
* Translation string should include: "{count, plural, one {...} other {...}}"
|
|
73
|
+
*/
|
|
74
|
+
static withCount<TStringKey extends string>(componentId: string, stringKey: TStringKey, count: number, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string, handleableOptions?: {
|
|
75
|
+
statusCode?: number;
|
|
76
|
+
cause?: Error;
|
|
77
|
+
sourceData?: unknown;
|
|
78
|
+
}): TranslatableHandleableGenericError<TStringKey>;
|
|
79
|
+
/**
|
|
80
|
+
* Create error with gender-aware messages
|
|
81
|
+
* Translation string should include: "{gender, select, male {...} female {...} other {...}}"
|
|
82
|
+
*/
|
|
83
|
+
static withGender<TStringKey extends string>(componentId: string, stringKey: TStringKey, gender: GenderCategory, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string, handleableOptions?: {
|
|
84
|
+
statusCode?: number;
|
|
85
|
+
cause?: Error;
|
|
86
|
+
sourceData?: unknown;
|
|
87
|
+
}): TranslatableHandleableGenericError<TStringKey>;
|
|
88
|
+
/**
|
|
89
|
+
* Create error with ordinal formatting (1st, 2nd, 3rd)
|
|
90
|
+
* Translation string should include: "{number, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}"
|
|
91
|
+
*/
|
|
92
|
+
static withOrdinal<TStringKey extends string>(componentId: string, stringKey: TStringKey, ordinalNumber: number, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string, handleableOptions?: {
|
|
93
|
+
statusCode?: number;
|
|
94
|
+
cause?: Error;
|
|
95
|
+
sourceData?: unknown;
|
|
96
|
+
}): TranslatableHandleableGenericError<TStringKey>;
|
|
97
|
+
/**
|
|
98
|
+
* Create error with number formatting (currency, percent, integer)
|
|
99
|
+
* Translation string should include: "{value, number, integer}" or "{amount, number, currency}"
|
|
100
|
+
*/
|
|
101
|
+
static withNumberFormat<TStringKey extends string>(componentId: string, stringKey: TStringKey, value: number, otherVars?: Record<string, string | number>, language?: string, instanceKey?: string, handleableOptions?: {
|
|
102
|
+
statusCode?: number;
|
|
103
|
+
cause?: Error;
|
|
104
|
+
sourceData?: unknown;
|
|
105
|
+
}): TranslatableHandleableGenericError<TStringKey>;
|
|
106
|
+
/**
|
|
107
|
+
* Create error with multiple i18n features combined
|
|
108
|
+
* Translation string can combine: plural, select, number formatting, etc.
|
|
109
|
+
*/
|
|
110
|
+
static withMultipleFeatures<TStringKey extends string>(componentId: string, stringKey: TStringKey, features: Record<string, string | number>, language?: string, instanceKey?: string, handleableOptions?: {
|
|
111
|
+
statusCode?: number;
|
|
112
|
+
cause?: Error;
|
|
113
|
+
sourceData?: unknown;
|
|
114
|
+
}): TranslatableHandleableGenericError<TStringKey>;
|
|
28
115
|
}
|
|
29
116
|
//# sourceMappingURL=translatable-handleable-generic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable-handleable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-handleable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"translatable-handleable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-handleable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBAAa,kCAAkC,CAC3C,UAAU,SAAS,MAAM,GAAG,MAAM,CAEpC,SAAQ,wBAAwB,CAAC,UAAU,CAC3C,YAAW,WAAW;IAEtB,OAAO,CAAC,QAAQ,CAAS;IACzB,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,UAAU,EAAE,MAAM,CA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AAM,GAAG,MAAM,CAAC,EACzC,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,iBAAiB,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAC/E,kCAAkC,CAAC,UAAU,CAAC;CAWlD"}
|
|
@@ -3,7 +3,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TranslatableHandleableGenericError = void 0;
|
|
4
4
|
const translatable_generic_1 = require("./translatable-generic");
|
|
5
5
|
/**
|
|
6
|
-
* Generic translatable error
|
|
6
|
+
* Generic translatable handleable error with full i18n feature support.
|
|
7
|
+
*
|
|
8
|
+
* Combines translation capabilities with handleable error patterns and provides
|
|
9
|
+
* static factory methods for all i18n features.
|
|
10
|
+
*
|
|
11
|
+
* **Supported i18n Features:**
|
|
12
|
+
* - ICU MessageFormat: plural, select, selectordinal
|
|
13
|
+
* - Pluralization: 37 languages with CLDR rules
|
|
14
|
+
* - Gender support: male, female, neutral, other
|
|
15
|
+
* - Number formatting: integer, currency, percent
|
|
16
|
+
* - Nested messages: complex multi-level patterns
|
|
17
|
+
*
|
|
18
|
+
* **Usage Examples:**
|
|
19
|
+
* ```typescript
|
|
20
|
+
* // Pluralization with handleable options
|
|
21
|
+
* throw TranslatableHandleableGenericError.withCount(
|
|
22
|
+
* 'api', 'validationError', 5,
|
|
23
|
+
* {}, 'en-US', 'default',
|
|
24
|
+
* { statusCode: 400 }
|
|
25
|
+
* );
|
|
26
|
+
*
|
|
27
|
+
* // Gender-aware messages
|
|
28
|
+
* throw TranslatableHandleableGenericError.withGender(
|
|
29
|
+
* 'user', 'accountError', 'female',
|
|
30
|
+
* {}, 'en-US', 'default',
|
|
31
|
+
* { statusCode: 403 }
|
|
32
|
+
* );
|
|
33
|
+
*
|
|
34
|
+
* // Number formatting with error handling
|
|
35
|
+
* throw TranslatableHandleableGenericError.withNumberFormat(
|
|
36
|
+
* 'payment', 'amountExceeded', 1599.99,
|
|
37
|
+
* { limit: 1000 }, 'en-US', 'default',
|
|
38
|
+
* { statusCode: 402 }
|
|
39
|
+
* );
|
|
40
|
+
*
|
|
41
|
+
* // Ordinal formatting (1st, 2nd, 3rd)
|
|
42
|
+
* throw TranslatableHandleableGenericError.withOrdinal(
|
|
43
|
+
* 'workflow', 'stepFailed', 3,
|
|
44
|
+
* {}, 'en-US', 'default',
|
|
45
|
+
* { statusCode: 500, retryable: true }
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
7
48
|
*/
|
|
8
49
|
class TranslatableHandleableGenericError extends translatable_generic_1.TranslatableGenericError {
|
|
9
50
|
_handled = false;
|
|
@@ -40,6 +81,41 @@ class TranslatableHandleableGenericError extends translatable_generic_1.Translat
|
|
|
40
81
|
sourceData: this.sourceData,
|
|
41
82
|
};
|
|
42
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Create error with pluralization support
|
|
86
|
+
* Translation string should include: "{count, plural, one {...} other {...}}"
|
|
87
|
+
*/
|
|
88
|
+
static withCount(componentId, stringKey, count, otherVars, language, instanceKey, handleableOptions) {
|
|
89
|
+
return new TranslatableHandleableGenericError(componentId, stringKey, { count, ...otherVars }, language, undefined, instanceKey, handleableOptions);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create error with gender-aware messages
|
|
93
|
+
* Translation string should include: "{gender, select, male {...} female {...} other {...}}"
|
|
94
|
+
*/
|
|
95
|
+
static withGender(componentId, stringKey, gender, otherVars, language, instanceKey, handleableOptions) {
|
|
96
|
+
return new TranslatableHandleableGenericError(componentId, stringKey, { gender, ...otherVars }, language, undefined, instanceKey, handleableOptions);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Create error with ordinal formatting (1st, 2nd, 3rd)
|
|
100
|
+
* Translation string should include: "{number, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}"
|
|
101
|
+
*/
|
|
102
|
+
static withOrdinal(componentId, stringKey, ordinalNumber, otherVars, language, instanceKey, handleableOptions) {
|
|
103
|
+
return new TranslatableHandleableGenericError(componentId, stringKey, { number: ordinalNumber, ...otherVars }, language, undefined, instanceKey, handleableOptions);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Create error with number formatting (currency, percent, integer)
|
|
107
|
+
* Translation string should include: "{value, number, integer}" or "{amount, number, currency}"
|
|
108
|
+
*/
|
|
109
|
+
static withNumberFormat(componentId, stringKey, value, otherVars, language, instanceKey, handleableOptions) {
|
|
110
|
+
return new TranslatableHandleableGenericError(componentId, stringKey, { value, ...otherVars }, language, undefined, instanceKey, handleableOptions);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Create error with multiple i18n features combined
|
|
114
|
+
* Translation string can combine: plural, select, number formatting, etc.
|
|
115
|
+
*/
|
|
116
|
+
static withMultipleFeatures(componentId, stringKey, features, language, instanceKey, handleableOptions) {
|
|
117
|
+
return new TranslatableHandleableGenericError(componentId, stringKey, features, language, undefined, instanceKey, handleableOptions);
|
|
118
|
+
}
|
|
43
119
|
}
|
|
44
120
|
exports.TranslatableHandleableGenericError = TranslatableHandleableGenericError;
|
|
45
121
|
//# sourceMappingURL=translatable-handleable-generic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable-handleable-generic.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-handleable-generic.ts"],"names":[],"mappings":";;;AACA,iEAAkE;
|
|
1
|
+
{"version":3,"file":"translatable-handleable-generic.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-handleable-generic.ts"],"names":[],"mappings":";;;AACA,iEAAkE;AAIlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAa,kCAGX,SAAQ,+CAAoC;IAGpC,QAAQ,GAAG,KAAK,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B,SAA2C,EAC3C,QAAiB,EACjB,WAAoB,EACpB,iBAAgF;QAEhF,OAAO,IAAI,kCAAkC,CAC3C,WAAW,EACX,SAAS,EACT,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EACxB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAU,WAAW,CACzB,WAAmB,EACnB,SAAqB,EACrB,aAAqB,EACrB,SAA2C,EAC3C,QAAiB,EACjB,WAAoB,EACpB,iBAAgF;QAEhF,OAAO,IAAI,kCAAkC,CAC3C,WAAW,EACX,SAAS,EACT,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,EACvC,QAAQ,EACR,SAAS,EACT,WAAW,EACX,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAU,gBAAgB,CAC9B,WAAmB,EACnB,SAAqB,EACrB,KAAa,EACb,SAA2C,EAC3C,QAAiB,EACjB,WAAoB,EACpB,iBAAgF;QAEhF,OAAO,IAAI,kCAAkC,CAC3C,WAAW,EACX,SAAS,EACT,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EACvB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,iBAAiB,CAClB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAU,oBAAoB,CAClC,WAAmB,EACnB,SAAqB,EACrB,QAAyC,EACzC,QAAiB,EACjB,WAAoB,EACpB,iBAAgF;QAEhF,OAAO,IAAI,kCAAkC,CAC3C,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACX,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AA5KD,gFA4KC"}
|
|
@@ -1,4 +1,59 @@
|
|
|
1
|
+
import { GenderCategory } from '../gender/gender-categories';
|
|
2
|
+
/**
|
|
3
|
+
* Translatable error class with full i18n 3.0/3.5 feature support.
|
|
4
|
+
*
|
|
5
|
+
* **Supported Features:**
|
|
6
|
+
* - ICU MessageFormat (variables, plural, select, selectordinal)
|
|
7
|
+
* - Pluralization (37 languages, CLDR rules)
|
|
8
|
+
* - Gender-aware translations
|
|
9
|
+
* - Number formatting (integer, currency, percent)
|
|
10
|
+
* - Date/Time formatting
|
|
11
|
+
* - Nested messages (4 levels deep)
|
|
12
|
+
* - Context variables
|
|
13
|
+
*
|
|
14
|
+
* **Translation String Examples:**
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // ICU plural
|
|
17
|
+
* "{count, plural, one {# error occurred} other {# errors occurred}}"
|
|
18
|
+
*
|
|
19
|
+
* // ICU select + gender
|
|
20
|
+
* "{gender, select, male {He encountered} female {She encountered}} an error"
|
|
21
|
+
*
|
|
22
|
+
* // Number formatting
|
|
23
|
+
* "Threshold {limit, number, integer} exceeded by {value, number, percent}"
|
|
24
|
+
*
|
|
25
|
+
* // SelectOrdinal
|
|
26
|
+
* "Failed at {step, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step"
|
|
27
|
+
*
|
|
28
|
+
* // Nested messages
|
|
29
|
+
* "{severity, select, low {Minor: {count, plural, one {# issue} other {# issues}}} high {Critical error}}"
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
1
32
|
export declare class TranslatableError<TStringKey extends string = string> extends Error {
|
|
33
|
+
readonly componentId: string;
|
|
34
|
+
readonly stringKey: TStringKey;
|
|
35
|
+
readonly variables?: Record<string, string | number>;
|
|
36
|
+
readonly language?: string;
|
|
2
37
|
constructor(componentId: string, stringKey: TStringKey, otherVars?: Record<string, string | number>, language?: string);
|
|
38
|
+
/**
|
|
39
|
+
* Create error with plural count
|
|
40
|
+
* Translation string should use: {count, plural, one {...} other {...}}
|
|
41
|
+
*/
|
|
42
|
+
static withCount<TStringKey extends string>(componentId: string, stringKey: TStringKey, count: number, otherVars?: Record<string, string | number>, language?: string): TranslatableError<TStringKey>;
|
|
43
|
+
/**
|
|
44
|
+
* Create error with gender context
|
|
45
|
+
* Translation string should use: {gender, select, male {...} female {...} other {...}}
|
|
46
|
+
*/
|
|
47
|
+
static withGender<TStringKey extends string>(componentId: string, stringKey: TStringKey, gender: GenderCategory, otherVars?: Record<string, string | number>, language?: string): TranslatableError<TStringKey>;
|
|
48
|
+
/**
|
|
49
|
+
* Create error with ordinal number
|
|
50
|
+
* Translation string should use: {number, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}
|
|
51
|
+
*/
|
|
52
|
+
static withOrdinal<TStringKey extends string>(componentId: string, stringKey: TStringKey, number: number, otherVars?: Record<string, string | number>, language?: string): TranslatableError<TStringKey>;
|
|
53
|
+
/**
|
|
54
|
+
* Create error with formatted number
|
|
55
|
+
* Translation string should use: {value, number, integer|currency|percent}
|
|
56
|
+
*/
|
|
57
|
+
static withNumber<TStringKey extends string>(componentId: string, stringKey: TStringKey, value: number, otherVars?: Record<string, string | number>, language?: string): TranslatableError<TStringKey>;
|
|
3
58
|
}
|
|
4
59
|
//# sourceMappingURL=translatable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"translatable.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,iBAAiB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IAC9E,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,SAAS,EAAE,UAAU,CAAC;IACtC,SAAgB,SAAS,CAAC,EAAE,MAA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MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,GAChB,iBAAiB,CAAC,UAAU,CAAC;CAQjC"}
|
|
@@ -2,13 +2,79 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TranslatableError = void 0;
|
|
4
4
|
const i18n_engine_1 = require("../core/i18n-engine");
|
|
5
|
+
/**
|
|
6
|
+
* Translatable error class with full i18n 3.0/3.5 feature support.
|
|
7
|
+
*
|
|
8
|
+
* **Supported Features:**
|
|
9
|
+
* - ICU MessageFormat (variables, plural, select, selectordinal)
|
|
10
|
+
* - Pluralization (37 languages, CLDR rules)
|
|
11
|
+
* - Gender-aware translations
|
|
12
|
+
* - Number formatting (integer, currency, percent)
|
|
13
|
+
* - Date/Time formatting
|
|
14
|
+
* - Nested messages (4 levels deep)
|
|
15
|
+
* - Context variables
|
|
16
|
+
*
|
|
17
|
+
* **Translation String Examples:**
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // ICU plural
|
|
20
|
+
* "{count, plural, one {# error occurred} other {# errors occurred}}"
|
|
21
|
+
*
|
|
22
|
+
* // ICU select + gender
|
|
23
|
+
* "{gender, select, male {He encountered} female {She encountered}} an error"
|
|
24
|
+
*
|
|
25
|
+
* // Number formatting
|
|
26
|
+
* "Threshold {limit, number, integer} exceeded by {value, number, percent}"
|
|
27
|
+
*
|
|
28
|
+
* // SelectOrdinal
|
|
29
|
+
* "Failed at {step, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step"
|
|
30
|
+
*
|
|
31
|
+
* // Nested messages
|
|
32
|
+
* "{severity, select, low {Minor: {count, plural, one {# issue} other {# issues}}} high {Critical error}}"
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
5
35
|
class TranslatableError extends Error {
|
|
36
|
+
componentId;
|
|
37
|
+
stringKey;
|
|
38
|
+
variables;
|
|
39
|
+
language;
|
|
6
40
|
constructor(componentId, stringKey, otherVars, language) {
|
|
7
41
|
const engine = i18n_engine_1.I18nEngine.getInstance('default');
|
|
8
42
|
super(engine.safeTranslate(componentId, stringKey, otherVars, language));
|
|
9
43
|
this.name = 'TranslatableError';
|
|
44
|
+
this.componentId = componentId;
|
|
45
|
+
this.stringKey = stringKey;
|
|
46
|
+
this.variables = otherVars;
|
|
47
|
+
this.language = language;
|
|
10
48
|
Object.setPrototypeOf(this, TranslatableError.prototype);
|
|
11
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Create error with plural count
|
|
52
|
+
* Translation string should use: {count, plural, one {...} other {...}}
|
|
53
|
+
*/
|
|
54
|
+
static withCount(componentId, stringKey, count, otherVars, language) {
|
|
55
|
+
return new TranslatableError(componentId, stringKey, { ...otherVars, count }, language);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create error with gender context
|
|
59
|
+
* Translation string should use: {gender, select, male {...} female {...} other {...}}
|
|
60
|
+
*/
|
|
61
|
+
static withGender(componentId, stringKey, gender, otherVars, language) {
|
|
62
|
+
return new TranslatableError(componentId, stringKey, { ...otherVars, gender }, language);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Create error with ordinal number
|
|
66
|
+
* Translation string should use: {number, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}
|
|
67
|
+
*/
|
|
68
|
+
static withOrdinal(componentId, stringKey, number, otherVars, language) {
|
|
69
|
+
return new TranslatableError(componentId, stringKey, { ...otherVars, number }, language);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create error with formatted number
|
|
73
|
+
* Translation string should use: {value, number, integer|currency|percent}
|
|
74
|
+
*/
|
|
75
|
+
static withNumber(componentId, stringKey, value, otherVars, language) {
|
|
76
|
+
return new TranslatableError(componentId, stringKey, { ...otherVars, value }, language);
|
|
77
|
+
}
|
|
12
78
|
}
|
|
13
79
|
exports.TranslatableError = TranslatableError;
|
|
14
80
|
//# sourceMappingURL=translatable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translatable.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;
|
|
1
|
+
{"version":3,"file":"translatable.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAIjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,iBAAsD,SAAQ,KAAK;IAC9D,WAAW,CAAS;IACpB,SAAS,CAAa;IACtB,SAAS,CAAmC;IAC5C,QAAQ,CAAU;IAElC,YACE,WAAmB,EACnB,SAAqB,EACrB,SAA2C,EAC3C,QAAiB;QAEjB,MAAM,MAAM,GAAG,wBAAU,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjD,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,SAAS,CACd,WAAmB,EACnB,SAAqB,EACrB,KAAa,EACb,SAA2C,EAC3C,QAAiB;QAEjB,OAAO,IAAI,iBAAiB,CAC1B,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,EACvB,QAAQ,CACT,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAU,CACf,WAAmB,EACnB,SAAqB,EACrB,MAAsB,EACtB,SAA2C,EAC3C,QAAiB;QAEjB,OAAO,IAAI,iBAAiB,CAC1B,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,EACxB,QAAQ,CACT,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,WAAW,CAChB,WAAmB,EACnB,SAAqB,EACrB,MAAc,EACd,SAA2C,EAC3C,QAAiB;QAEjB,OAAO,IAAI,iBAAiB,CAC1B,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,EACxB,QAAQ,CACT,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAU,CACf,WAAmB,EACnB,SAAqB,EACrB,KAAa,EACb,SAA2C,EAC3C,QAAiB;QAEjB,OAAO,IAAI,iBAAiB,CAC1B,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,EACvB,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAjGD,8CAiGC"}
|
|
@@ -2,6 +2,54 @@ import { HandleableError } from './handleable';
|
|
|
2
2
|
import { IHandleable } from '../interfaces/handleable';
|
|
3
3
|
import { HandleableErrorOptions } from '../interfaces/handleable-error-options';
|
|
4
4
|
import { CompleteReasonMap } from './typed';
|
|
5
|
+
/**
|
|
6
|
+
* TypedHandleableError with full i18n feature support.
|
|
7
|
+
*
|
|
8
|
+
* Combines typed errors with handleable error patterns and full i18n capabilities.
|
|
9
|
+
*
|
|
10
|
+
* **Supported i18n Features** (via translation strings):
|
|
11
|
+
* - ICU MessageFormat: plural, select, selectordinal
|
|
12
|
+
* - Pluralization: 37 languages with CLDR rules
|
|
13
|
+
* - Gender support: male, female, neutral, other
|
|
14
|
+
* - Number formatting: integer, currency, percent
|
|
15
|
+
* - Nested messages: up to 4 levels deep
|
|
16
|
+
*
|
|
17
|
+
* **Translation String Examples:**
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // Define error types
|
|
20
|
+
* enum NetworkError {
|
|
21
|
+
* Timeout = 'timeout',
|
|
22
|
+
* RateLimit = 'rateLimit'
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* // Register translations with ICU
|
|
26
|
+
* engine.registerComponent({
|
|
27
|
+
* component: { id: 'network', stringKeys: ['timeout', 'rateLimit'] },
|
|
28
|
+
* strings: {
|
|
29
|
+
* 'en-US': {
|
|
30
|
+
* timeout: \"{count, plural, one {# request timed out} other {# requests timed out}} after {seconds, number, integer} seconds\",
|
|
31
|
+
* rateLimit: \"Rate limit exceeded. {remaining, number, integer} requests remaining. Resets in {minutes, number, integer} minutes.\"
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* // Use typed handleable error
|
|
37
|
+
* try {
|
|
38
|
+
* await apiCall();
|
|
39
|
+
* } catch (error) {
|
|
40
|
+
* throw new TypedHandleableError(
|
|
41
|
+
* 'network',
|
|
42
|
+
* NetworkError.Timeout,
|
|
43
|
+
* reasonMap,
|
|
44
|
+
* error,
|
|
45
|
+
* { retryable: true },
|
|
46
|
+
* 'en-US',
|
|
47
|
+
* { count: 1, seconds: 30 }
|
|
48
|
+
* );
|
|
49
|
+
* }
|
|
50
|
+
* // Result: \"1 request timed out after 30 seconds\"
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
5
53
|
export declare class TypedHandleableError<TEnum extends Record<string, string>, TStringKey extends string> extends HandleableError implements IHandleable {
|
|
6
54
|
readonly componentId: string;
|
|
7
55
|
readonly type: TEnum[keyof TEnum];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typed-handleable.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/typed-handleable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,sBAAsB,E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