1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

[EC-772] Add i18n key typechecking in web (#4023)

This commit is contained in:
Thomas Rittson
2022-12-21 14:27:00 +10:00
committed by GitHub
parent b331f5b329
commit 5a1940f3f4
50 changed files with 176 additions and 109 deletions

View File

@@ -19,7 +19,7 @@ export class AdjustStorageComponent {
@Input() storageGbPrice = 0;
@Input() add = true;
@Input() organizationId: string;
@Input() interval = "year";
@Input() interval: "month" | "year" = "year";
@Output() onAdjusted = new EventEmitter<number>();
@Output() onCanceled = new EventEmitter();

View File

@@ -6,6 +6,8 @@ import { SecretVerificationRequest } from "@bitwarden/common/models/request/secr
import { ApiKeyResponse } from "@bitwarden/common/models/response/api-key.response";
import { Verification } from "@bitwarden/common/types/verification";
import { WebI18nKey } from "../core/web-i18n.service.implementation";
@Component({
selector: "app-api-key",
templateUrl: "api-key.component.html",
@@ -17,9 +19,9 @@ export class ApiKeyComponent {
entityId: string;
scope: string;
grantType: string;
apiKeyTitle: string;
apiKeyWarning: string;
apiKeyDescription: string;
apiKeyTitle: WebI18nKey;
apiKeyWarning: WebI18nKey;
apiKeyDescription: WebI18nKey;
masterPassword: Verification;
formPromise: Promise<ApiKeyResponse>;

View File

@@ -53,10 +53,7 @@
></i>
{{ t.details }}
</td>
<td
[ngClass]="{ 'text-strike': t.refunded }"
title="{{ (t.refunded ? 'refunded' : '') | i18n }}"
>
<td [ngClass]="{ 'text-strike': t.refunded }" [title]="t.refunded ? ('refunded' | i18n) : ''">
{{ t.amount | currency: "$" }}
</td>
</tr>