From bda90faa7ef54e970b753106470ebcde5b459b42 Mon Sep 17 00:00:00 2001 From: jaasen-livefront Date: Mon, 25 Nov 2024 10:51:57 -0800 Subject: [PATCH 1/4] update copy for free trial banner --- apps/web/src/locales/en/messages.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 0c1558a35d9a..f1cb788ec43f 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -3880,7 +3880,7 @@ } }, "freeTrialEndPromptAboveTwoDays": { - "message": "$ORGANIZATION$, your free trial ends in $COUNT$ days. To maintain your subscription,", + "message": "$ORGANIZATION$, your free trial ends in $COUNT$ days.", "placeholders": { "count": { "content": "$2", @@ -3893,7 +3893,7 @@ } }, "freeTrialEndPromptForOneDay": { - "message": "$ORGANIZATION$, your free trial ends tomorrow. To maintain your subscription,", + "message": "$ORGANIZATION$, your free trial ends tomorrow.", "placeholders": { "organization": { "content": "$1", @@ -3902,10 +3902,10 @@ } }, "freeTrialEndPromptForOneDayNoOrgName": { - "message": "Your free trial ends tomorrow. To maintain your subscription," + "message": "Your free trial ends tomorrow." }, "freeTrialEndPromptForLessThanADay": { - "message": "$ORGANIZATION$, your free trial ends today. To maintain your subscription,", + "message": "$ORGANIZATION$, your free trial ends today.", "placeholders": { "organization": { "content": "$1", @@ -3914,10 +3914,10 @@ } }, "freeTrialEndingSoonWithoutOrgName": { - "message": "Your free trial ends today. To maintain your subscription," + "message": "Your free trial ends today." }, "routeToPaymentMethodTrigger": { - "message": "add a payment method." + "message": "Click here to add a payment method." }, "joinOrganization": { "message": "Join organization" From 2c63143289ec49107e3eadfb8bb4b025f64b006f Mon Sep 17 00:00:00 2001 From: jaasen-livefront Date: Mon, 25 Nov 2024 11:15:45 -0800 Subject: [PATCH 2/4] add v2 translation keys --- ...organization-payment-method.component.html | 2 +- .../billing/services/trial-flow.service.ts | 6 +- .../shared/payment-method.component.html | 2 +- .../vault-banners.component.html | 2 +- .../vault-banners/vault-banners.component.ts | 9 +- .../app/vault/org-vault/vault.component.html | 2 +- apps/web/src/locales/en/messages.json | 84 ++++++++++++------- .../overview/overview.component.html | 2 +- 8 files changed, 67 insertions(+), 42 deletions(-) diff --git a/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html b/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html index 7a6e8558baee..2ac9a1218542 100644 --- a/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html +++ b/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html @@ -14,7 +14,7 @@ class="tw-cursor-pointer" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTrigger" | i18n }} + {{ "routeToPaymentMethodTriggerV2" | i18n }} diff --git a/apps/web/src/app/billing/services/trial-flow.service.ts b/apps/web/src/app/billing/services/trial-flow.service.ts index 3135a8116657..622f1e7e680a 100644 --- a/apps/web/src/app/billing/services/trial-flow.service.ts +++ b/apps/web/src/app/billing/services/trial-flow.service.ts @@ -52,11 +52,11 @@ export class TrialFlowService { getFreeTrialMessage(trialRemainingDays: number): string { if (trialRemainingDays >= 2) { - return this.i18nService.t("freeTrialEndPrompt", trialRemainingDays); + return this.i18nService.t("freeTrialEndPromptV2", trialRemainingDays); } else if (trialRemainingDays === 1) { - return this.i18nService.t("freeTrialEndPromptForOneDayNoOrgName"); + return this.i18nService.t("freeTrialEndPromptForOneDayNoOrgNameV2"); } else { - return this.i18nService.t("freeTrialEndingSoonWithoutOrgName"); + return this.i18nService.t("freeTrialEndingSoonWithoutOrgNameV2"); } } diff --git a/apps/web/src/app/billing/shared/payment-method.component.html b/apps/web/src/app/billing/shared/payment-method.component.html index 1d4675847a1b..a71d08c3966f 100644 --- a/apps/web/src/app/billing/shared/payment-method.component.html +++ b/apps/web/src/app/billing/shared/payment-method.component.html @@ -14,7 +14,7 @@ class="tw-cursor-pointer" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTrigger" | i18n }} + {{ "routeToPaymentMethodTriggerV2" | i18n }} diff --git a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html index f3ecead886b1..3c6cb47a36d8 100644 --- a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html +++ b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html @@ -14,7 +14,7 @@ rel="noreferrer noopener" class="tw-cursor-pointer" > - {{ "routeToPaymentMethodTrigger" | i18n }} + {{ "routeToPaymentMethodTriggerV2" | i18n }} diff --git a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts index 72b14d5ca05f..d96e29c1883d 100644 --- a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts @@ -69,14 +69,17 @@ export class VaultBannersComponent implements OnInit { freeTrialMessage(organization: FreeTrial) { if (organization.remainingDays >= 2) { return this.i18nService.t( - "freeTrialEndPromptAboveTwoDays", + "freeTrialEndPromptAboveTwoDaysV2", organization.organizationName, organization.remainingDays.toString(), ); } else if (organization.remainingDays === 1) { - return this.i18nService.t("freeTrialEndPromptForOneDay", organization.organizationName); + return this.i18nService.t("freeTrialEndPromptForOneDayV2", organization.organizationName); } else { - return this.i18nService.t("freeTrialEndPromptForLessThanADay", organization.organizationName); + return this.i18nService.t( + "freeTrialEndPromptForLessThanADayV2", + organization.organizationName, + ); } } diff --git a/apps/web/src/app/vault/org-vault/vault.component.html b/apps/web/src/app/vault/org-vault/vault.component.html index 9e9264e77cd5..94110bd0624a 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.html +++ b/apps/web/src/app/vault/org-vault/vault.component.html @@ -15,7 +15,7 @@ class="tw-cursor-pointer" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTrigger" | i18n }} + {{ "routeToPaymentMethodTriggerV2" | i18n }} diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index f1cb788ec43f..81ac42783b24 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -1642,27 +1642,9 @@ "passwordHistory": { "message": "Password history" }, - "generatorHistory": { - "message": "Generator history" - }, - "clearGeneratorHistoryTitle": { - "message": "Clear generator history" - }, - "cleargGeneratorHistoryDescription": { - "message": "If you continue, all entries will be permanently deleted from generator's history. Are you sure you want to continue?" - }, "noPasswordsInList": { "message": "There are no passwords to list." }, - "clearHistory": { - "message": "Clear history" - }, - "nothingToShow": { - "message": "Nothing to show" - }, - "nothingGeneratedRecently": { - "message": "You haven't generated anything recently" - }, "clear": { "message": "Clear", "description": "To clear something out. Example: To clear browser history." @@ -3879,7 +3861,29 @@ } } }, + "freeTrialEndPromptV2": { + "message": "Your free trial ends in $COUNT$ days.", + "placeholders": { + "count": { + "content": "$1", + "example": "You must set up 2FA on your user account before you can join this organization." + } + } + }, "freeTrialEndPromptAboveTwoDays": { + "message": "$ORGANIZATION$, your free trial ends in $COUNT$ days. To maintain your subscription,", + "placeholders": { + "count": { + "content": "$2", + "example": "organization name" + }, + "organization": { + "content": "$1", + "example": "remaining days" + } + } + }, + "freeTrialEndPromptAboveTwoDaysV2": { "message": "$ORGANIZATION$, your free trial ends in $COUNT$ days.", "placeholders": { "count": { @@ -3893,6 +3897,15 @@ } }, "freeTrialEndPromptForOneDay": { + "message": "$ORGANIZATION$, your free trial ends tomorrow. To maintain your subscription,", + "placeholders": { + "organization": { + "content": "$1", + "example": "organization name" + } + } + }, + "freeTrialEndPromptForOneDayV2": { "message": "$ORGANIZATION$, your free trial ends tomorrow.", "placeholders": { "organization": { @@ -3902,9 +3915,21 @@ } }, "freeTrialEndPromptForOneDayNoOrgName": { + "message": "Your free trial ends tomorrow. To maintain your subscription," + }, + "freeTrialEndPromptForOneDayNoOrgNameV2": { "message": "Your free trial ends tomorrow." }, "freeTrialEndPromptForLessThanADay": { + "message": "$ORGANIZATION$, your free trial ends today. To maintain your subscription,", + "placeholders": { + "organization": { + "content": "$1", + "example": "organization name" + } + } + }, + "freeTrialEndPromptForLessThanADayV2": { "message": "$ORGANIZATION$, your free trial ends today.", "placeholders": { "organization": { @@ -3914,10 +3939,16 @@ } }, "freeTrialEndingSoonWithoutOrgName": { + "message": "Your free trial ends today. To maintain your subscription," + }, + "freeTrialEndingSoonWithoutOrgNameV2": { "message": "Your free trial ends today." }, "routeToPaymentMethodTrigger": { - "message": "Click here to add a payment method." + "message": "add a payment method." + }, + "routeToPaymentMethodTriggerV2": { + "message": "Click here add a payment method." }, "joinOrganization": { "message": "Join organization" @@ -8069,18 +8100,9 @@ "loginInitiated": { "message": "Login initiated" }, - "rememberThisDeviceToMakeFutureLoginsSeamless": { - "message": "Remember this device to make future logins seamless" - }, "deviceApprovalRequired": { "message": "Device approval required. Select an approval option below:" }, - "deviceApprovalRequiredV2": { - "message": "Device approval required" - }, - "selectAnApprovalOptionBelow": { - "message": "Select an approval option below" - }, "rememberThisDevice": { "message": "Remember this device" }, @@ -8310,9 +8332,6 @@ "userEmailMissing": { "message": "User email missing" }, - "activeUserEmailNotFoundLoggingYouOut": { - "message": "Active user email not found. Logging you out." - }, "deviceTrusted": { "message": "Device trusted" }, @@ -8408,6 +8427,9 @@ "collectionManagementDesc": { "message": "Manage the collection behavior for the organization" }, + "limitCollectionCreationDeletionDesc": { + "message": "Limit collection creation and deletion to owners and admins" + }, "limitCollectionCreationDesc": { "message": "Limit collection creation to owners and admins" }, diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html index 31746e7601c8..e0545f76a9ca 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html @@ -15,7 +15,7 @@ (click)="navigateToPaymentMethod()" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTrigger" | i18n }} + {{ "routeToPaymentMethodTriggerV2" | i18n }} From cafaa13358613d83826a80ad4eb7f70b9fe873cc Mon Sep 17 00:00:00 2001 From: jaasen-livefront Date: Mon, 25 Nov 2024 11:26:35 -0800 Subject: [PATCH 3/4] remove old keys. don't use V2 in new key name --- ...organization-payment-method.component.html | 2 +- .../billing/services/trial-flow.service.ts | 6 +- .../vault-banners.component.html | 2 +- .../vault-banners/vault-banners.component.ts | 9 +-- .../app/vault/org-vault/vault.component.html | 2 +- apps/web/src/locales/en/messages.json | 63 +++---------------- .../overview/overview.component.html | 2 +- 7 files changed, 17 insertions(+), 69 deletions(-) diff --git a/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html b/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html index 2ac9a1218542..cfbc9a93260d 100644 --- a/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html +++ b/apps/web/src/app/billing/organizations/payment-method/organization-payment-method.component.html @@ -14,7 +14,7 @@ class="tw-cursor-pointer" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTriggerV2" | i18n }} + {{ "clickHereToAddPaymentMethod" | i18n }} diff --git a/apps/web/src/app/billing/services/trial-flow.service.ts b/apps/web/src/app/billing/services/trial-flow.service.ts index 622f1e7e680a..ef3ddf3380df 100644 --- a/apps/web/src/app/billing/services/trial-flow.service.ts +++ b/apps/web/src/app/billing/services/trial-flow.service.ts @@ -52,11 +52,11 @@ export class TrialFlowService { getFreeTrialMessage(trialRemainingDays: number): string { if (trialRemainingDays >= 2) { - return this.i18nService.t("freeTrialEndPromptV2", trialRemainingDays); + return this.i18nService.t("freeTrialEndPromptCount", trialRemainingDays); } else if (trialRemainingDays === 1) { - return this.i18nService.t("freeTrialEndPromptForOneDayNoOrgNameV2"); + return this.i18nService.t("freeTrialEndPromptTomorrowNoOrgName"); } else { - return this.i18nService.t("freeTrialEndingSoonWithoutOrgNameV2"); + return this.i18nService.t("freeTrialEndingTodayWithoutOrgName"); } } diff --git a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html index 3c6cb47a36d8..c968cf76e57b 100644 --- a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html +++ b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.html @@ -14,7 +14,7 @@ rel="noreferrer noopener" class="tw-cursor-pointer" > - {{ "routeToPaymentMethodTriggerV2" | i18n }} + {{ "clickHereToAddPaymentMethod" | i18n }} diff --git a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts index d96e29c1883d..32f41137bc4c 100644 --- a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts @@ -69,17 +69,14 @@ export class VaultBannersComponent implements OnInit { freeTrialMessage(organization: FreeTrial) { if (organization.remainingDays >= 2) { return this.i18nService.t( - "freeTrialEndPromptAboveTwoDaysV2", + "freeTrialEndPromptMultipleDays", organization.organizationName, organization.remainingDays.toString(), ); } else if (organization.remainingDays === 1) { - return this.i18nService.t("freeTrialEndPromptForOneDayV2", organization.organizationName); + return this.i18nService.t("freeTrialEndPromptTomorrow", organization.organizationName); } else { - return this.i18nService.t( - "freeTrialEndPromptForLessThanADayV2", - organization.organizationName, - ); + return this.i18nService.t("freeTrialEndPromptToday", organization.organizationName); } } diff --git a/apps/web/src/app/vault/org-vault/vault.component.html b/apps/web/src/app/vault/org-vault/vault.component.html index 94110bd0624a..f69f7392ed93 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.html +++ b/apps/web/src/app/vault/org-vault/vault.component.html @@ -15,7 +15,7 @@ class="tw-cursor-pointer" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTriggerV2" | i18n }} + {{ "clickHereToAddPaymentMethod" | i18n }} diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 81ac42783b24..ff6c26405e27 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -3852,16 +3852,7 @@ "updateBrowserDesc": { "message": "You are using an unsupported web browser. The web vault may not function properly." }, - "freeTrialEndPrompt": { - "message": "Your free trial ends in $COUNT$ days. To maintain your subscription,", - "placeholders": { - "count": { - "content": "$1", - "example": "You must set up 2FA on your user account before you can join this organization." - } - } - }, - "freeTrialEndPromptV2": { + "freeTrialEndPromptCount": { "message": "Your free trial ends in $COUNT$ days.", "placeholders": { "count": { @@ -3870,20 +3861,7 @@ } } }, - "freeTrialEndPromptAboveTwoDays": { - "message": "$ORGANIZATION$, your free trial ends in $COUNT$ days. To maintain your subscription,", - "placeholders": { - "count": { - "content": "$2", - "example": "organization name" - }, - "organization": { - "content": "$1", - "example": "remaining days" - } - } - }, - "freeTrialEndPromptAboveTwoDaysV2": { + "freeTrialEndPromptMultipleDays": { "message": "$ORGANIZATION$, your free trial ends in $COUNT$ days.", "placeholders": { "count": { @@ -3896,16 +3874,7 @@ } } }, - "freeTrialEndPromptForOneDay": { - "message": "$ORGANIZATION$, your free trial ends tomorrow. To maintain your subscription,", - "placeholders": { - "organization": { - "content": "$1", - "example": "organization name" - } - } - }, - "freeTrialEndPromptForOneDayV2": { + "freeTrialEndPromptTomorrow": { "message": "$ORGANIZATION$, your free trial ends tomorrow.", "placeholders": { "organization": { @@ -3914,22 +3883,10 @@ } } }, - "freeTrialEndPromptForOneDayNoOrgName": { - "message": "Your free trial ends tomorrow. To maintain your subscription," - }, - "freeTrialEndPromptForOneDayNoOrgNameV2": { + "freeTrialEndPromptTomorrowNoOrgName": { "message": "Your free trial ends tomorrow." }, - "freeTrialEndPromptForLessThanADay": { - "message": "$ORGANIZATION$, your free trial ends today. To maintain your subscription,", - "placeholders": { - "organization": { - "content": "$1", - "example": "organization name" - } - } - }, - "freeTrialEndPromptForLessThanADayV2": { + "freeTrialEndPromptToday": { "message": "$ORGANIZATION$, your free trial ends today.", "placeholders": { "organization": { @@ -3938,16 +3895,10 @@ } } }, - "freeTrialEndingSoonWithoutOrgName": { - "message": "Your free trial ends today. To maintain your subscription," - }, - "freeTrialEndingSoonWithoutOrgNameV2": { + "freeTrialEndingTodayWithoutOrgName": { "message": "Your free trial ends today." }, - "routeToPaymentMethodTrigger": { - "message": "add a payment method." - }, - "routeToPaymentMethodTriggerV2": { + "clickHereToAddPaymentMethod": { "message": "Click here add a payment method." }, "joinOrganization": { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html index e0545f76a9ca..ab8d85746f82 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.html @@ -15,7 +15,7 @@ (click)="navigateToPaymentMethod()" rel="noreferrer noopener" > - {{ "routeToPaymentMethodTriggerV2" | i18n }} + {{ "clickHereToAddPaymentMethod" | i18n }} From d096ced73fdefde321a71e5c48e92bb02b82def0 Mon Sep 17 00:00:00 2001 From: jaasen-livefront Date: Mon, 25 Nov 2024 11:34:38 -0800 Subject: [PATCH 4/4] re-add removed keys --- apps/web/src/locales/en/messages.json | 33 ++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index ff6c26405e27..a5e5212be92c 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -1642,9 +1642,27 @@ "passwordHistory": { "message": "Password history" }, + "generatorHistory": { + "message": "Generator history" + }, + "clearGeneratorHistoryTitle": { + "message": "Clear generator history" + }, + "cleargGeneratorHistoryDescription": { + "message": "If you continue, all entries will be permanently deleted from generator's history. Are you sure you want to continue?" + }, "noPasswordsInList": { "message": "There are no passwords to list." }, + "clearHistory": { + "message": "Clear history" + }, + "nothingToShow": { + "message": "Nothing to show" + }, + "nothingGeneratedRecently": { + "message": "You haven't generated anything recently" + }, "clear": { "message": "Clear", "description": "To clear something out. Example: To clear browser history." @@ -8051,9 +8069,18 @@ "loginInitiated": { "message": "Login initiated" }, + "rememberThisDeviceToMakeFutureLoginsSeamless": { + "message": "Remember this device to make future logins seamless" + }, "deviceApprovalRequired": { "message": "Device approval required. Select an approval option below:" }, + "deviceApprovalRequiredV2": { + "message": "Device approval required" + }, + "selectAnApprovalOptionBelow": { + "message": "Select an approval option below" + }, "rememberThisDevice": { "message": "Remember this device" }, @@ -8283,6 +8310,9 @@ "userEmailMissing": { "message": "User email missing" }, + "activeUserEmailNotFoundLoggingYouOut": { + "message": "Active user email not found. Logging you out." + }, "deviceTrusted": { "message": "Device trusted" }, @@ -8378,9 +8408,6 @@ "collectionManagementDesc": { "message": "Manage the collection behavior for the organization" }, - "limitCollectionCreationDeletionDesc": { - "message": "Limit collection creation and deletion to owners and admins" - }, "limitCollectionCreationDesc": { "message": "Limit collection creation to owners and admins" },