From 083c8ce6d4e95b7a81ac5845740290705da624c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=A8=20Audrey=20=E2=9C=A8?= Date: Wed, 15 Jan 2025 15:49:03 -0500 Subject: [PATCH] add new translation keys --- .../generator/core/src/metadata/algorithm-metadata.ts | 8 +++++++- libs/tools/generator/core/src/metadata/email/catchall.ts | 4 +++- .../generator/core/src/metadata/email/plus-address.ts | 6 ++++-- .../generator/core/src/metadata/password/eff-word-list.ts | 4 +++- .../core/src/metadata/password/random-password.ts | 4 +++- .../generator/core/src/metadata/username/eff-word-list.ts | 4 +++- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/libs/tools/generator/core/src/metadata/algorithm-metadata.ts b/libs/tools/generator/core/src/metadata/algorithm-metadata.ts index 95e05ea53ef..f776dd76e54 100644 --- a/libs/tools/generator/core/src/metadata/algorithm-metadata.ts +++ b/libs/tools/generator/core/src/metadata/algorithm-metadata.ts @@ -31,9 +31,15 @@ export type AlgorithmMetadata = { /** labels the generate action */ generateCredential: string; - /** labels the generated output */ + /** message informing users when the generator produces a new credential */ credentialGenerated: string; + /* labels the action that assigns a generated value to a domain object */ + useCredential: string; + + /** labels the generated output */ + credentialType: string; + /** labels the copy output action */ copyCredential: string; }; diff --git a/libs/tools/generator/core/src/metadata/email/catchall.ts b/libs/tools/generator/core/src/metadata/email/catchall.ts index 2005651ddc0..0711e5c3719 100644 --- a/libs/tools/generator/core/src/metadata/email/catchall.ts +++ b/libs/tools/generator/core/src/metadata/email/catchall.ts @@ -19,9 +19,11 @@ const catchall: GeneratorMetadata = deepFreeze({ i18nKeys: { name: "catchallEmail", description: "catchallEmailDesc", + credentialType: "email", generateCredential: "generateEmail", - credentialGenerated: "email", + credentialGenerated: "emailGenerated", copyCredential: "copyEmail", + useCredential: "useThisEmail", }, capabilities: { autogenerate: true, diff --git a/libs/tools/generator/core/src/metadata/email/plus-address.ts b/libs/tools/generator/core/src/metadata/email/plus-address.ts index 98c04e1b8f8..0db0acd415c 100644 --- a/libs/tools/generator/core/src/metadata/email/plus-address.ts +++ b/libs/tools/generator/core/src/metadata/email/plus-address.ts @@ -19,9 +19,11 @@ const plusAddress: GeneratorMetadata = deepFreeze({ i18nKeys: { name: "plusAddressedEmail", description: "plusAddressedEmailDesc", + credentialType: "email", generateCredential: "generateEmail", - credentialGenerated: "email", + credentialGenerated: "emailGenerated", copyCredential: "copyEmail", + useCredential: "useThisEmail", }, capabilities: { autogenerate: true, @@ -60,7 +62,7 @@ const plusAddress: GeneratorMetadata = deepFreeze({ constraints: { default: {}, create(_policy, context) { - return new SubaddressConstraints(context.email); + return new SubaddressConstraints(context.email ?? ""); }, }, }, diff --git a/libs/tools/generator/core/src/metadata/password/eff-word-list.ts b/libs/tools/generator/core/src/metadata/password/eff-word-list.ts index 68203aedba2..fc86032bf6b 100644 --- a/libs/tools/generator/core/src/metadata/password/eff-word-list.ts +++ b/libs/tools/generator/core/src/metadata/password/eff-word-list.ts @@ -19,9 +19,11 @@ const passphrase: GeneratorMetadata = { weight: 110, i18nKeys: { name: "passphrase", + credentialType: "passphrase", generateCredential: "generatePassphrase", - credentialGenerated: "passphrase", + credentialGenerated: "passphraseGenerated", copyCredential: "copyPassphrase", + useCredential: "useThisPassphrase", }, capabilities: { autogenerate: false, diff --git a/libs/tools/generator/core/src/metadata/password/random-password.ts b/libs/tools/generator/core/src/metadata/password/random-password.ts index a154e687f99..693236b0967 100644 --- a/libs/tools/generator/core/src/metadata/password/random-password.ts +++ b/libs/tools/generator/core/src/metadata/password/random-password.ts @@ -20,8 +20,10 @@ const password: GeneratorMetadata = deepFreeze({ i18nKeys: { name: "password", generateCredential: "generatePassword", - credentialGenerated: "password", + credentialGenerated: "passwordGenerated", + credentialType: "password", copyCredential: "copyPassword", + useCredential: "useThisPassword", }, capabilities: { autogenerate: true, diff --git a/libs/tools/generator/core/src/metadata/username/eff-word-list.ts b/libs/tools/generator/core/src/metadata/username/eff-word-list.ts index f8cb1432f10..6373daf8ed5 100644 --- a/libs/tools/generator/core/src/metadata/username/eff-word-list.ts +++ b/libs/tools/generator/core/src/metadata/username/eff-word-list.ts @@ -18,9 +18,11 @@ const effWordList: GeneratorMetadata = deepFreeze( weight: 400, i18nKeys: { name: "randomWord", + credentialType: "username", generateCredential: "generateUsername", - credentialGenerated: "username", + credentialGenerated: "usernameGenerated", copyCredential: "copyUsername", + useCredential: "useThisUsername", }, capabilities: { autogenerate: true,