@digitaldefiance/i18n-lib 4.2.2 → 4.3.0
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 +222 -0
- package/package.json +1 -1
- package/src/builders/i18n-builder.d.ts +13 -0
- package/src/builders/i18n-builder.d.ts.map +1 -1
- package/src/builders/i18n-builder.js +24 -1
- package/src/builders/i18n-builder.js.map +1 -1
- package/src/core/i18n-engine.d.ts +168 -1
- package/src/core/i18n-engine.d.ts.map +1 -1
- package/src/core/i18n-engine.js +185 -0
- package/src/core/i18n-engine.js.map +1 -1
- package/src/core/index.d.ts +2 -0
- package/src/core/index.d.ts.map +1 -1
- package/src/core/index.js +3 -1
- package/src/core/index.js.map +1 -1
- package/src/core/string-key-enum-registry.d.ts +238 -0
- package/src/core/string-key-enum-registry.d.ts.map +1 -0
- package/src/core/string-key-enum-registry.js +289 -0
- package/src/core/string-key-enum-registry.js.map +1 -0
- package/src/errors/i18n-error.d.ts +15 -0
- package/src/errors/i18n-error.d.ts.map +1 -1
- package/src/errors/i18n-error.js +19 -0
- package/src/errors/i18n-error.js.map +1 -1
- package/src/interfaces/i18n-engine.interface.d.ts +28 -0
- package/src/interfaces/i18n-engine.interface.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,24 @@ A production-ready TypeScript internationalization library with component-based
|
|
|
4
4
|
|
|
5
5
|
Part of [Express Suite](https://github.com/Digital-Defiance/express-suite)
|
|
6
6
|
|
|
7
|
+
## What's New in v4.3.0
|
|
8
|
+
|
|
9
|
+
✨ **String Key Enum Registration** - Register branded string key enums for direct translation without specifying component IDs.
|
|
10
|
+
|
|
11
|
+
**New Features:**
|
|
12
|
+
- **`registerStringKeyEnum()`**: Register branded enums for automatic component routing
|
|
13
|
+
- **`translateStringKey()`**: Translate keys directly - component ID resolved from branded enum
|
|
14
|
+
- **`safeTranslateStringKey()`**: Safe version returning placeholder on failure
|
|
15
|
+
- **`hasStringKeyEnum()` / `getStringKeyEnums()`**: Query registered enums
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
// Register your branded enum
|
|
19
|
+
engine.registerStringKeyEnum(MyBrandedKeys);
|
|
20
|
+
|
|
21
|
+
// Translate without component ID - it's resolved automatically
|
|
22
|
+
const text = engine.translateStringKey(MyBrandedKeys.Welcome, { name: 'Alice' });
|
|
23
|
+
```
|
|
24
|
+
|
|
7
25
|
## Features
|
|
8
26
|
|
|
9
27
|
- **Production-Grade Security**: Comprehensive protection against common attacks
|
|
@@ -464,6 +482,33 @@ const engine = I18nBuilder.create()
|
|
|
464
482
|
.build();
|
|
465
483
|
```
|
|
466
484
|
|
|
485
|
+
#### Builder with String Key Enum Registration
|
|
486
|
+
|
|
487
|
+
Register branded string key enums during engine construction for direct translation via `translateStringKey()`:
|
|
488
|
+
|
|
489
|
+
```typescript
|
|
490
|
+
import { I18nBuilder, createI18nStringKeysFromEnum } from '@digitaldefiance/i18n-lib';
|
|
491
|
+
|
|
492
|
+
// Create branded enum from your string keys
|
|
493
|
+
enum MyStringKeys {
|
|
494
|
+
Welcome = 'welcome',
|
|
495
|
+
Goodbye = 'goodbye',
|
|
496
|
+
}
|
|
497
|
+
const BrandedKeys = createI18nStringKeysFromEnum('my-component', MyStringKeys);
|
|
498
|
+
|
|
499
|
+
const engine = I18nBuilder.create()
|
|
500
|
+
.withLanguages([
|
|
501
|
+
{ id: 'en-US', name: 'English', code: 'en-US', isDefault: true },
|
|
502
|
+
])
|
|
503
|
+
.withStringKeyEnum(BrandedKeys) // Register single enum
|
|
504
|
+
// Or register multiple at once:
|
|
505
|
+
// .withStringKeyEnums([BrandedKeys, OtherKeys])
|
|
506
|
+
.build();
|
|
507
|
+
|
|
508
|
+
// Now you can translate directly without component ID
|
|
509
|
+
engine.translateStringKey(BrandedKeys.Welcome);
|
|
510
|
+
```
|
|
511
|
+
|
|
467
512
|
### Context Integration
|
|
468
513
|
|
|
469
514
|
```typescript
|
|
@@ -674,6 +719,11 @@ LanguageCodes.UK // 'uk'
|
|
|
674
719
|
- `validate()` - Validate all components
|
|
675
720
|
- `registerBrandedComponent(registration)` - Register component with branded string keys
|
|
676
721
|
- `getCollisionReport()` - Get map of key collisions across components
|
|
722
|
+
- `registerStringKeyEnum(enum)` - Register a branded string key enum for direct translation
|
|
723
|
+
- `translateStringKey(key, variables?, language?)` - Translate a branded string key directly
|
|
724
|
+
- `safeTranslateStringKey(key, variables?, language?)` - Safe version returning placeholder on failure
|
|
725
|
+
- `hasStringKeyEnum(enum)` - Check if a branded enum is registered
|
|
726
|
+
- `getStringKeyEnums()` - Get all registered branded enums
|
|
677
727
|
|
|
678
728
|
### Branded Enum Functions
|
|
679
729
|
|
|
@@ -924,6 +974,77 @@ const allValues = getStringKeyValues(AllKeys);
|
|
|
924
974
|
|
|
925
975
|
For complete migration guide, see [BRANDED_ENUM_MIGRATION.md](docs/BRANDED_ENUM_MIGRATION.md).
|
|
926
976
|
|
|
977
|
+
### String Key Enum Registration
|
|
978
|
+
|
|
979
|
+
Register branded string key enums with the engine for direct translation without specifying component IDs. This simplifies translation calls and enables automatic component routing.
|
|
980
|
+
|
|
981
|
+
#### Registering String Key Enums
|
|
982
|
+
|
|
983
|
+
```typescript
|
|
984
|
+
import { createI18nStringKeysFromEnum, PluginI18nEngine } from '@digitaldefiance/i18n-lib';
|
|
985
|
+
|
|
986
|
+
// Create a branded enum from your string keys
|
|
987
|
+
enum MyStringKeys {
|
|
988
|
+
Welcome = 'welcome',
|
|
989
|
+
Goodbye = 'goodbye',
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
const BrandedKeys = createI18nStringKeysFromEnum('my-component', MyStringKeys);
|
|
993
|
+
|
|
994
|
+
// Create engine and register component
|
|
995
|
+
const engine = PluginI18nEngine.createInstance('myapp', languages);
|
|
996
|
+
engine.registerBrandedComponent({
|
|
997
|
+
component: {
|
|
998
|
+
id: 'my-component',
|
|
999
|
+
name: 'My Component',
|
|
1000
|
+
brandedStringKeys: BrandedKeys,
|
|
1001
|
+
},
|
|
1002
|
+
strings: {
|
|
1003
|
+
[LanguageCodes.EN_US]: {
|
|
1004
|
+
[BrandedKeys.Welcome]: 'Welcome!',
|
|
1005
|
+
[BrandedKeys.Goodbye]: 'Goodbye!',
|
|
1006
|
+
},
|
|
1007
|
+
},
|
|
1008
|
+
});
|
|
1009
|
+
|
|
1010
|
+
// Register the enum for direct translation
|
|
1011
|
+
engine.registerStringKeyEnum(BrandedKeys);
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
#### Direct Translation with translateStringKey
|
|
1015
|
+
|
|
1016
|
+
Once registered, translate keys directly without specifying the component ID:
|
|
1017
|
+
|
|
1018
|
+
```typescript
|
|
1019
|
+
// Before: Required component ID
|
|
1020
|
+
const text = engine.translate('my-component', BrandedKeys.Welcome, { name: 'Alice' });
|
|
1021
|
+
|
|
1022
|
+
// After: Component ID resolved automatically from branded enum
|
|
1023
|
+
const text = engine.translateStringKey(BrandedKeys.Welcome, { name: 'Alice' });
|
|
1024
|
+
|
|
1025
|
+
// Safe version returns placeholder on failure instead of throwing
|
|
1026
|
+
const safeText = engine.safeTranslateStringKey(BrandedKeys.Welcome, { name: 'Alice' });
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
#### Checking Registration Status
|
|
1030
|
+
|
|
1031
|
+
```typescript
|
|
1032
|
+
// Check if an enum is registered
|
|
1033
|
+
if (engine.hasStringKeyEnum(BrandedKeys)) {
|
|
1034
|
+
console.log('BrandedKeys is registered');
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// Get all registered enums
|
|
1038
|
+
const registeredEnums = engine.getStringKeyEnums();
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
#### Benefits
|
|
1042
|
+
|
|
1043
|
+
- **Cleaner Code**: No need to repeat component IDs in every translation call
|
|
1044
|
+
- **Automatic Routing**: Component ID resolved from branded enum metadata
|
|
1045
|
+
- **Type Safety**: Full TypeScript support with branded enum types
|
|
1046
|
+
- **Idempotent**: Safe to call `registerStringKeyEnum()` multiple times
|
|
1047
|
+
|
|
927
1048
|
### Branded Enum Translation
|
|
928
1049
|
|
|
929
1050
|
The enum translation system supports branded enums from `@digitaldefiance/branded-enum`, enabling automatic name inference and type-safe enum value translations.
|
|
@@ -1123,6 +1244,107 @@ Contributions welcome! Please:
|
|
|
1123
1244
|
|
|
1124
1245
|
## ChangeLog
|
|
1125
1246
|
|
|
1247
|
+
### Version 4.3.0
|
|
1248
|
+
|
|
1249
|
+
**String Key Enum Registration for Direct Translation**
|
|
1250
|
+
|
|
1251
|
+
This release adds the ability to register branded string key enums with the I18nEngine for direct translation via `translateStringKey()`. This enables automatic component ID resolution from branded enum values.
|
|
1252
|
+
|
|
1253
|
+
**New Features:**
|
|
1254
|
+
|
|
1255
|
+
- **`registerStringKeyEnum()`**: Register a branded string key enum for direct translation support
|
|
1256
|
+
```typescript
|
|
1257
|
+
import { createI18nStringKeysFromEnum } from '@digitaldefiance/i18n-lib';
|
|
1258
|
+
|
|
1259
|
+
const MyKeys = createI18nStringKeysFromEnum('my-component', MyStringKeyEnum);
|
|
1260
|
+
engine.registerStringKeyEnum(MyKeys);
|
|
1261
|
+
```
|
|
1262
|
+
|
|
1263
|
+
- **`translateStringKey()`**: Translate a branded string key value directly without specifying component ID
|
|
1264
|
+
```typescript
|
|
1265
|
+
// Before: engine.translate('my-component', MyKeys.Welcome, { name: 'Alice' });
|
|
1266
|
+
// After:
|
|
1267
|
+
engine.translateStringKey(MyKeys.Welcome, { name: 'Alice' });
|
|
1268
|
+
```
|
|
1269
|
+
|
|
1270
|
+
- **`safeTranslateStringKey()`**: Safe version that returns a placeholder on failure instead of throwing
|
|
1271
|
+
|
|
1272
|
+
- **`hasStringKeyEnum()`**: Check if a branded enum is registered
|
|
1273
|
+
|
|
1274
|
+
- **`getStringKeyEnums()`**: Get all registered branded enums
|
|
1275
|
+
|
|
1276
|
+
**New Error Codes:**
|
|
1277
|
+
|
|
1278
|
+
- `INVALID_STRING_KEY_ENUM` - When a non-branded enum is passed to `registerStringKeyEnum()`
|
|
1279
|
+
- `STRING_KEY_NOT_REGISTERED` - When translating a key from an unregistered enum
|
|
1280
|
+
|
|
1281
|
+
**Benefits:**
|
|
1282
|
+
|
|
1283
|
+
- Cleaner translation calls without repeating component IDs
|
|
1284
|
+
- Automatic component routing based on branded enum metadata
|
|
1285
|
+
- Type-safe translations with full TypeScript support
|
|
1286
|
+
- Idempotent registration (safe to call multiple times)
|
|
1287
|
+
|
|
1288
|
+
### Version 4.2.0
|
|
1289
|
+
|
|
1290
|
+
**Branded Enum Translation Support**
|
|
1291
|
+
|
|
1292
|
+
This release adds comprehensive support for translating branded enums from `@digitaldefiance/branded-enum`, enabling automatic name inference and type-safe enum value translations.
|
|
1293
|
+
|
|
1294
|
+
**New Features:**
|
|
1295
|
+
|
|
1296
|
+
- **Automatic Name Inference**: When registering a branded enum, the name is automatically extracted from the enum's component ID
|
|
1297
|
+
```typescript
|
|
1298
|
+
const Status = createBrandedEnum('status', { Active: 'active', Inactive: 'inactive' });
|
|
1299
|
+
engine.registerEnum(Status, translations); // Name 'status' inferred automatically
|
|
1300
|
+
```
|
|
1301
|
+
|
|
1302
|
+
- **New Utility Functions**:
|
|
1303
|
+
- `isBrandedEnum()` - Type guard to detect branded enums
|
|
1304
|
+
- `getBrandedEnumComponentId()` - Extract component ID from branded enum
|
|
1305
|
+
- `getBrandedEnumId()` - Get raw brand ID for debugging
|
|
1306
|
+
|
|
1307
|
+
- **Enhanced `registerEnum()`**: Now accepts branded enums and returns the registered translations object
|
|
1308
|
+
|
|
1309
|
+
- **Property-Based Tests**: Comprehensive property tests for branded enum translation ensuring:
|
|
1310
|
+
- Registration idempotence
|
|
1311
|
+
- Translation consistency across languages
|
|
1312
|
+
- Proper error handling for missing translations
|
|
1313
|
+
|
|
1314
|
+
**Documentation:**
|
|
1315
|
+
|
|
1316
|
+
- Added "Branded Enum Translation" section to README
|
|
1317
|
+
- Comprehensive JSDoc documentation for all new utilities
|
|
1318
|
+
|
|
1319
|
+
### Version 4.1.0
|
|
1320
|
+
|
|
1321
|
+
**Enhanced Type Documentation and BrandedMasterStringsCollection**
|
|
1322
|
+
|
|
1323
|
+
This release focuses on improved documentation and ergonomic type aliases for working with branded enums.
|
|
1324
|
+
|
|
1325
|
+
**New Features:**
|
|
1326
|
+
|
|
1327
|
+
- **`BrandedMasterStringsCollection<E, TLanguage>`**: Ergonomic type alias for defining translation collections with branded enums
|
|
1328
|
+
```typescript
|
|
1329
|
+
const translations: BrandedMasterStringsCollection<typeof MyKeys, CoreLanguageCode> = {
|
|
1330
|
+
[LanguageCodes.EN_US]: { 'my.welcome': 'Welcome!' },
|
|
1331
|
+
[LanguageCodes.FR]: { 'my.welcome': 'Bienvenue!' },
|
|
1332
|
+
};
|
|
1333
|
+
```
|
|
1334
|
+
|
|
1335
|
+
- **`BrandedPluralMasterStringsCollection<E, TLanguage>`**: Type alias for plural-aware branded translations
|
|
1336
|
+
|
|
1337
|
+
- **Comprehensive Module Documentation**: Added extensive JSDoc documentation to `types.ts` explaining:
|
|
1338
|
+
- Traditional enums vs branded enums
|
|
1339
|
+
- Migration patterns from legacy enums
|
|
1340
|
+
- Complete examples for defining translations
|
|
1341
|
+
|
|
1342
|
+
**Documentation:**
|
|
1343
|
+
|
|
1344
|
+
- Step-by-step guide for creating branded string keys
|
|
1345
|
+
- Examples showing `BrandedMasterStringsCollection` usage
|
|
1346
|
+
- Migration guide from traditional `EnumLanguageTranslation` types
|
|
1347
|
+
|
|
1126
1348
|
### Version 4.0.4
|
|
1127
1349
|
|
|
1128
1350
|
**Branded Enums for Runtime String Key Identification**
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fluent builder for I18n Engine
|
|
3
3
|
*/
|
|
4
|
+
import type { AnyBrandedEnum } from '@digitaldefiance/branded-enum';
|
|
4
5
|
import { I18nEngine } from '../core/i18n-engine';
|
|
5
6
|
import { EngineConfig, LanguageDefinition } from '../interfaces';
|
|
6
7
|
export declare class I18nBuilder {
|
|
@@ -9,6 +10,7 @@ export declare class I18nBuilder {
|
|
|
9
10
|
private instanceKey;
|
|
10
11
|
private registerInstance;
|
|
11
12
|
private setAsDefault;
|
|
13
|
+
private stringKeyEnums;
|
|
12
14
|
private constructor();
|
|
13
15
|
static create(): I18nBuilder;
|
|
14
16
|
withLanguages(languages: readonly LanguageDefinition[]): this;
|
|
@@ -19,6 +21,17 @@ export declare class I18nBuilder {
|
|
|
19
21
|
withInstanceKey(key: string): this;
|
|
20
22
|
withRegisterInstance(register: boolean): this;
|
|
21
23
|
withSetAsDefault(setDefault: boolean): this;
|
|
24
|
+
/**
|
|
25
|
+
* Register a branded string key enum for direct translation via translateStringKey().
|
|
26
|
+
* Multiple enums can be registered by calling this method multiple times.
|
|
27
|
+
* @param stringKeyEnum - Branded enum created by createI18nStringKeys or createI18nStringKeysFromEnum
|
|
28
|
+
*/
|
|
29
|
+
withStringKeyEnum(stringKeyEnum: AnyBrandedEnum): this;
|
|
30
|
+
/**
|
|
31
|
+
* Register multiple branded string key enums for direct translation.
|
|
32
|
+
* @param stringKeyEnums - Array of branded enums
|
|
33
|
+
*/
|
|
34
|
+
withStringKeyEnums(stringKeyEnums: readonly AnyBrandedEnum[]): this;
|
|
22
35
|
isolated(): this;
|
|
23
36
|
asDefault(): this;
|
|
24
37
|
build(): I18nEngine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-builder.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/builders/i18n-builder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEjE,qBAAa,WAAW;IACtB,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CA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,EAAE,GAAG,IAAI;IAKnE,QAAQ,IAAI,IAAI;IAKhB,SAAS,IAAI,IAAI;IAKjB,KAAK,IAAI,UAAU;CAkBpB"}
|
|
@@ -12,6 +12,7 @@ class I18nBuilder {
|
|
|
12
12
|
instanceKey = 'default';
|
|
13
13
|
registerInstance = true;
|
|
14
14
|
setAsDefault = true;
|
|
15
|
+
stringKeyEnums = [];
|
|
15
16
|
constructor() { }
|
|
16
17
|
static create() {
|
|
17
18
|
return new I18nBuilder();
|
|
@@ -49,6 +50,23 @@ class I18nBuilder {
|
|
|
49
50
|
this.setAsDefault = setDefault;
|
|
50
51
|
return this;
|
|
51
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Register a branded string key enum for direct translation via translateStringKey().
|
|
55
|
+
* Multiple enums can be registered by calling this method multiple times.
|
|
56
|
+
* @param stringKeyEnum - Branded enum created by createI18nStringKeys or createI18nStringKeysFromEnum
|
|
57
|
+
*/
|
|
58
|
+
withStringKeyEnum(stringKeyEnum) {
|
|
59
|
+
this.stringKeyEnums.push(stringKeyEnum);
|
|
60
|
+
return this;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Register multiple branded string key enums for direct translation.
|
|
64
|
+
* @param stringKeyEnums - Array of branded enums
|
|
65
|
+
*/
|
|
66
|
+
withStringKeyEnums(stringKeyEnums) {
|
|
67
|
+
this.stringKeyEnums.push(...stringKeyEnums);
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
52
70
|
isolated() {
|
|
53
71
|
this.registerInstance = false;
|
|
54
72
|
return this;
|
|
@@ -61,11 +79,16 @@ class I18nBuilder {
|
|
|
61
79
|
if (this.languages.length === 0) {
|
|
62
80
|
throw new Error('At least one language must be provided');
|
|
63
81
|
}
|
|
64
|
-
|
|
82
|
+
const engine = new i18n_engine_1.I18nEngine(this.languages, this.config, {
|
|
65
83
|
instanceKey: this.instanceKey,
|
|
66
84
|
registerInstance: this.registerInstance,
|
|
67
85
|
setAsDefault: this.setAsDefault,
|
|
68
86
|
});
|
|
87
|
+
// Register all string key enums
|
|
88
|
+
for (const enumObj of this.stringKeyEnums) {
|
|
89
|
+
engine.registerStringKeyEnum(enumObj);
|
|
90
|
+
}
|
|
91
|
+
return engine;
|
|
69
92
|
}
|
|
70
93
|
}
|
|
71
94
|
exports.I18nBuilder = I18nBuilder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-builder.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/builders/i18n-builder.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,uDAAuD;;;
|
|
1
|
+
{"version":3,"file":"i18n-builder.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/builders/i18n-builder.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,uDAAuD;;;AAGvD,qDAAiD;AAGjD,MAAa,WAAW;IACd,SAAS,GAAyB,EAAE,CAAC;IACrC,MAAM,GAAiB,EAAE,CAAC;IAC1B,WAAW,GAAG,SAAS,CAAC;IACxB,gBAAgB,GAAG,IAAI,CAAC;IACxB,YAAY,GAAG,IAAI,CAAC;IACpB,cAAc,GAAqB,EAAE,CAAC;IAE9C,gBAAuB,CAAC;IAExB,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,WAAW,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa,CAAC,SAAwC;QACpD,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mBAAmB,CAAC,UAAkB;QACpC,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,UAAU,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,UAAkB;QACrC,IAAI,CAAC,MAAM,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,8DAA8D;IAC9D,aAAa,CAAC,SAA8B;QAC1C,IAAI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B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;QAEH,gCAAgC;QAChC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YAC1C,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAtGD,kCAsGC"}
|
|
@@ -14,6 +14,7 @@ export declare class I18nEngine implements II18nEngine {
|
|
|
14
14
|
private static readonly contextManager;
|
|
15
15
|
private readonly componentStore;
|
|
16
16
|
private readonly enumRegistry;
|
|
17
|
+
private readonly stringKeyEnumRegistry;
|
|
17
18
|
private readonly instanceKey;
|
|
18
19
|
private readonly config;
|
|
19
20
|
private readonly aliasToComponent;
|
|
@@ -241,7 +242,7 @@ export declare class I18nEngine implements II18nEngine {
|
|
|
241
242
|
*/
|
|
242
243
|
registerEnum<TEnum extends string | number>(enumObj: Record<string, TEnum> | AnyBrandedEnum | {
|
|
243
244
|
[key: string]: string | number;
|
|
244
|
-
}, translations: Record<string, Record<TEnum | string, string>>, enumName?: string): Record<string, Record<
|
|
245
|
+
}, translations: Record<string, Record<TEnum | string, string>>, enumName?: string): Record<string, Record<TEnum, string>>;
|
|
245
246
|
/**
|
|
246
247
|
* Translates an enum value for the current or specified language.
|
|
247
248
|
*
|
|
@@ -309,6 +310,172 @@ export declare class I18nEngine implements II18nEngine {
|
|
|
309
310
|
* @see {@link translateEnum} - Translate registered enum values
|
|
310
311
|
*/
|
|
311
312
|
hasEnum(enumObj: object): boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Registers a branded string key enum for automatic component ID resolution.
|
|
315
|
+
*
|
|
316
|
+
* This method enables direct translation of string key values without requiring
|
|
317
|
+
* per-component wrapper functions. Once registered, the engine can automatically
|
|
318
|
+
* resolve the component ID from any string key value belonging to the enum.
|
|
319
|
+
*
|
|
320
|
+
* ## Registration Behavior
|
|
321
|
+
*
|
|
322
|
+
* - Extracts the component ID from the branded enum's metadata
|
|
323
|
+
* - Stores a reference to the enum for later lookup
|
|
324
|
+
* - Idempotent: re-registering the same enum returns the same component ID
|
|
325
|
+
* - Skips re-registration if another enum with the same component ID exists
|
|
326
|
+
*
|
|
327
|
+
* ## Validation
|
|
328
|
+
*
|
|
329
|
+
* The method validates that the provided object is a branded enum created
|
|
330
|
+
* with `createI18nStringKeys` or `createBrandedEnum`. Non-branded objects
|
|
331
|
+
* will cause an error to be thrown.
|
|
332
|
+
*
|
|
333
|
+
* @param stringKeyEnum - Branded enum created by createI18nStringKeys
|
|
334
|
+
* @returns The extracted component ID
|
|
335
|
+
* @throws {I18nError} If not a valid branded enum (INVALID_STRING_KEY_ENUM)
|
|
336
|
+
*
|
|
337
|
+
* @example Basic registration
|
|
338
|
+
* ```typescript
|
|
339
|
+
* const UserKeys = createI18nStringKeys('user', {
|
|
340
|
+
* Welcome: 'user.welcome',
|
|
341
|
+
* Goodbye: 'user.goodbye',
|
|
342
|
+
* } as const);
|
|
343
|
+
*
|
|
344
|
+
* const componentId = engine.registerStringKeyEnum(UserKeys);
|
|
345
|
+
* console.log(componentId); // 'user'
|
|
346
|
+
* ```
|
|
347
|
+
*
|
|
348
|
+
* @example Idempotent registration
|
|
349
|
+
* ```typescript
|
|
350
|
+
* engine.registerStringKeyEnum(UserKeys); // 'user'
|
|
351
|
+
* engine.registerStringKeyEnum(UserKeys); // 'user' (same result, no duplicate)
|
|
352
|
+
* ```
|
|
353
|
+
*
|
|
354
|
+
* @see {@link translateStringKey} - Translate registered string key values
|
|
355
|
+
* @see {@link hasStringKeyEnum} - Check if an enum is registered
|
|
356
|
+
*/
|
|
357
|
+
registerStringKeyEnum(stringKeyEnum: AnyBrandedEnum): string;
|
|
358
|
+
/**
|
|
359
|
+
* Translates a branded string key value directly.
|
|
360
|
+
*
|
|
361
|
+
* This method automatically resolves the component ID from the branded string
|
|
362
|
+
* key value and calls the underlying `translate` method. It eliminates the need
|
|
363
|
+
* for per-component wrapper functions.
|
|
364
|
+
*
|
|
365
|
+
* ## Resolution Process
|
|
366
|
+
*
|
|
367
|
+
* 1. Resolves the component ID from the string key value using the registry
|
|
368
|
+
* 2. Calls `translate(componentId, stringKeyValue, variables, language)`
|
|
369
|
+
* 3. Returns the translated string
|
|
370
|
+
*
|
|
371
|
+
* ## Prerequisites
|
|
372
|
+
*
|
|
373
|
+
* The branded enum containing the string key value must be registered via
|
|
374
|
+
* {@link registerStringKeyEnum} before calling this method.
|
|
375
|
+
*
|
|
376
|
+
* @template E - The branded enum type
|
|
377
|
+
* @param stringKeyValue - Branded string key value to translate
|
|
378
|
+
* @param variables - Optional variables for template substitution
|
|
379
|
+
* @param language - Optional language code (defaults to current language)
|
|
380
|
+
* @returns Translated string
|
|
381
|
+
* @throws {I18nError} If the string key is not registered (STRING_KEY_NOT_REGISTERED)
|
|
382
|
+
* @throws {I18nError} If the translation key is not found (KEY_NOT_FOUND)
|
|
383
|
+
*
|
|
384
|
+
* @example Basic translation
|
|
385
|
+
* ```typescript
|
|
386
|
+
* const UserKeys = createI18nStringKeys('user', { Welcome: 'user.welcome' });
|
|
387
|
+
* engine.registerStringKeyEnum(UserKeys);
|
|
388
|
+
*
|
|
389
|
+
* engine.translateStringKey(UserKeys.Welcome); // 'Welcome!'
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* @example With variables
|
|
393
|
+
* ```typescript
|
|
394
|
+
* engine.translateStringKey(UserKeys.Greeting, { name: 'John' }); // 'Hello, John!'
|
|
395
|
+
* ```
|
|
396
|
+
*
|
|
397
|
+
* @example With explicit language
|
|
398
|
+
* ```typescript
|
|
399
|
+
* engine.translateStringKey(UserKeys.Welcome, undefined, 'es'); // '¡Bienvenido!'
|
|
400
|
+
* ```
|
|
401
|
+
*
|
|
402
|
+
* @see {@link registerStringKeyEnum} - Register enums for translation
|
|
403
|
+
* @see {@link safeTranslateStringKey} - Safe version that returns placeholder on failure
|
|
404
|
+
*/
|
|
405
|
+
translateStringKey<E extends AnyBrandedEnum>(stringKeyValue: BrandedEnumValue<E>, variables?: Record<string, unknown>, language?: string): string;
|
|
406
|
+
/**
|
|
407
|
+
* Safely translates a branded string key value.
|
|
408
|
+
*
|
|
409
|
+
* Returns a placeholder string on failure instead of throwing an exception.
|
|
410
|
+
* This is useful for UI code where a missing translation should not crash
|
|
411
|
+
* the application.
|
|
412
|
+
*
|
|
413
|
+
* ## Placeholder Format
|
|
414
|
+
*
|
|
415
|
+
* - If component ID is resolved: `[componentId.stringKeyValue]`
|
|
416
|
+
* - If component ID cannot be resolved: `[unknown.stringKeyValue]`
|
|
417
|
+
*
|
|
418
|
+
* @template E - The branded enum type
|
|
419
|
+
* @param stringKeyValue - Branded string key value to translate
|
|
420
|
+
* @param variables - Optional variables for template substitution
|
|
421
|
+
* @param language - Optional language code (defaults to current language)
|
|
422
|
+
* @returns Translated string or placeholder on failure
|
|
423
|
+
*
|
|
424
|
+
* @example Safe translation
|
|
425
|
+
* ```typescript
|
|
426
|
+
* engine.safeTranslateStringKey(UserKeys.Welcome); // 'Welcome!' or '[user.user.welcome]'
|
|
427
|
+
* ```
|
|
428
|
+
*
|
|
429
|
+
* @see {@link translateStringKey} - Throwing version
|
|
430
|
+
* @see {@link registerStringKeyEnum} - Register enums for translation
|
|
431
|
+
*/
|
|
432
|
+
safeTranslateStringKey<E extends AnyBrandedEnum>(stringKeyValue: BrandedEnumValue<E>, variables?: Record<string, unknown>, language?: string): string;
|
|
433
|
+
/**
|
|
434
|
+
* Checks if a branded string key enum is registered.
|
|
435
|
+
*
|
|
436
|
+
* Uses object reference equality to check registration status.
|
|
437
|
+
*
|
|
438
|
+
* @param stringKeyEnum - The branded enum to check
|
|
439
|
+
* @returns `true` if the enum is registered, `false` otherwise
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```typescript
|
|
443
|
+
* engine.hasStringKeyEnum(UserKeys); // false (not registered yet)
|
|
444
|
+
* engine.registerStringKeyEnum(UserKeys);
|
|
445
|
+
* engine.hasStringKeyEnum(UserKeys); // true
|
|
446
|
+
* ```
|
|
447
|
+
*
|
|
448
|
+
* @see {@link registerStringKeyEnum} - Register enums
|
|
449
|
+
* @see {@link getStringKeyEnums} - Get all registered enums
|
|
450
|
+
*/
|
|
451
|
+
hasStringKeyEnum(stringKeyEnum: AnyBrandedEnum): boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Gets all registered string key enums with their component IDs.
|
|
454
|
+
*
|
|
455
|
+
* Returns a readonly array of entries containing the enum reference
|
|
456
|
+
* and its associated component ID.
|
|
457
|
+
*
|
|
458
|
+
* @returns Readonly array of objects with enumObj and componentId
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* ```typescript
|
|
462
|
+
* engine.registerStringKeyEnum(UserKeys);
|
|
463
|
+
* engine.registerStringKeyEnum(AdminKeys);
|
|
464
|
+
*
|
|
465
|
+
* const enums = engine.getStringKeyEnums();
|
|
466
|
+
* // [
|
|
467
|
+
* // { enumObj: UserKeys, componentId: 'user' },
|
|
468
|
+
* // { enumObj: AdminKeys, componentId: 'admin' }
|
|
469
|
+
* // ]
|
|
470
|
+
* ```
|
|
471
|
+
*
|
|
472
|
+
* @see {@link registerStringKeyEnum} - Register enums
|
|
473
|
+
* @see {@link hasStringKeyEnum} - Check if an enum is registered
|
|
474
|
+
*/
|
|
475
|
+
getStringKeyEnums(): readonly {
|
|
476
|
+
enumObj: AnyBrandedEnum;
|
|
477
|
+
componentId: string;
|
|
478
|
+
}[];
|
|
312
479
|
/**
|
|
313
480
|
* Validates all registered components for missing translations or warnings.
|
|
314
481
|
* @returns ValidationResult containing errors and warnings.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-engine.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/core/i18n-engine.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAC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