Add missing labels for Account Console (v3) (#21807)
This commit is contained in:
parent
4885d349dc
commit
1d24a8b316
9 changed files with 58 additions and 41 deletions
|
@ -18,6 +18,7 @@
|
|||
"client": "العميل",
|
||||
"clients": "العملاء",
|
||||
"close": "إغلاق",
|
||||
"confirm": "يتأكد",
|
||||
"credentialCreatedAt": "<0>أنشئ في</0> {{date}}.",
|
||||
"currentSession": "الجلسة الحالية",
|
||||
"delete": "حذف",
|
||||
|
@ -147,6 +148,7 @@
|
|||
"unLinkError": "لم يكن بالاستطاعة إلغاء ربط الحساب بسبب الخطأ: {{error}}",
|
||||
"unLinkSuccess": "تم إلغاء ربط الحساب بنجاح",
|
||||
"unShare": "إلغاء مشاركة الكل",
|
||||
"unShareAllConfirm": "هل أنت متأكد أنك تريد إزالة جميع ما تم مشاركته سابقًا؟",
|
||||
"unShareError": "لم يكن بالاستطاعة إلغاء مشاركة المورد بسبب الخطأ: {{error}}",
|
||||
"unShareSuccess": "تم إلغاء مشاركة المورد بنجاح.",
|
||||
"update": "تحديث",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"client": "Client",
|
||||
"clients": "Clients",
|
||||
"close": "Close",
|
||||
"confirm": "Confirm",
|
||||
"credentialCreatedAt": "<0>Created</0> {{date}}.",
|
||||
"currentSession": "Current session",
|
||||
"delete": "Delete",
|
||||
|
@ -97,7 +98,7 @@
|
|||
"removeConsentError": "Could not remove consent due to: {{error}}",
|
||||
"removeConsentSuccess": "Successfully removed consent",
|
||||
"removeCred": "Remove {{0}}",
|
||||
"removeModalMessage": "Hiermee wordt de momenteel verleende toegangsrechten voor {{0}} verwijderd. U moet opnieuw toegang verlenen als u deze app wilt gebruiken.",
|
||||
"removeModalMessage": "This will remove the currently granted access permission for {{0}}. You will need to grant access again if you want to use this app.",
|
||||
"requestor": "Requestor",
|
||||
"required": "Required",
|
||||
"resourceAlreadyShared": "Resource is already shared with this user.",
|
||||
|
@ -147,6 +148,7 @@
|
|||
"unLinkError": "Could not unlink due to: {{error}}",
|
||||
"unLinkSuccess": "Successfully unlinked account",
|
||||
"unShare": "Unshare all",
|
||||
"unShareAllConfirm": "Are you sure you want to completely remove all shares?",
|
||||
"unShareError": "Could not un-share the resource due to: {{error}}",
|
||||
"unShareSuccess": "Resource successfully un-shared.",
|
||||
"update": "Update",
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"client": "مشتری",
|
||||
"clients": "مشتریها",
|
||||
"close": "بستن",
|
||||
"confirm": "تایید",
|
||||
"credentialCreatedAt": "<0>ایجاد شد</0> {{date}}.",
|
||||
"currentSession": "نشست فعلی",
|
||||
"deny": "رد کردن",
|
||||
|
@ -142,6 +143,7 @@
|
|||
"unLinkError": "به دلیل: {{error}} لغو پیوند ممکن نشد",
|
||||
"unLinkSuccess": "حساب با موفقیت نامرتبط شد",
|
||||
"unShare": "خروج از استراک همه",
|
||||
"unShareAllConfirm": "آیا از حذف تمام اشتراکگذاریها اطمینان دارید؟",
|
||||
"unShareError": "خروج منبع از اشتراک موفقیت آمیز نبود: {{error}}",
|
||||
"unShareSuccess": "منبع با موفقیت از اشتراک خارج شد.",
|
||||
"update": "به روزرسانی",
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
"client": "Cliënt",
|
||||
"clients": "Cliënten",
|
||||
"close": "Sluiten",
|
||||
"confirm": "Bevestigen",
|
||||
"credentialCreatedAt": "<0>Aangemaakt op</0> {{date}}.",
|
||||
"currentSession": "Huidige sessie",
|
||||
"delete": "Verwijderen",
|
||||
|
@ -97,7 +98,7 @@
|
|||
"removeConsentError": "Kan toestemming niet verwijderen vanwege: {{error}}",
|
||||
"removeConsentSuccess": "Toestemming verwijderd",
|
||||
"removeCred": "Verwijder {{0}}",
|
||||
"removeModalMessage": "This will remove the currently granted access permission for {{0}}. You will need to grant access again if you want to use this app.",
|
||||
"removeModalMessage": "Hiermee wordt de momenteel verleende toegangsrechten voor {{0}} verwijderd. U moet opnieuw toegang verlenen als u deze app wilt gebruiken.",
|
||||
"requestor": "Aanvrager",
|
||||
"required": "Vereist",
|
||||
"resourceAlreadyShared": "Resource is al gedeeld met deze gebruiker.",
|
||||
|
@ -147,6 +148,7 @@
|
|||
"unLinkError": "Kan niet ontkoppelen vanwege: {{error}}",
|
||||
"unLinkSuccess": "Account is ontkoppeld",
|
||||
"unShare": "Delen ongedaan maken",
|
||||
"unShareAllConfirm": "Weet u zeker dat u delen overal ongedaan wilt maken?",
|
||||
"unShareError": "Kon het delen van de resource niet ongedaan maken vanwege: {{error}}",
|
||||
"unShareSuccess": "Resouce succesvol ontkoppeld.",
|
||||
"update": "Bijwerken",
|
||||
|
|
|
@ -129,9 +129,12 @@ const DeviceActivity = () => {
|
|||
<ContinueCancelModal
|
||||
buttonTitle={t("signOutAllDevices")}
|
||||
modalTitle={t("signOutAllDevices")}
|
||||
modalMessage={t("signOutAllDevicesWarning")}
|
||||
continueLabel={t("confirm")}
|
||||
cancelLabel={t("cancel")}
|
||||
onContinue={() => signOutAll()}
|
||||
/>
|
||||
>
|
||||
{t("signOutAllDevicesWarning")}
|
||||
</ContinueCancelModal>
|
||||
)}
|
||||
</SplitItem>
|
||||
</Split>
|
||||
|
@ -174,10 +177,13 @@ const DeviceActivity = () => {
|
|||
<ContinueCancelModal
|
||||
buttonTitle={t("signOut")}
|
||||
modalTitle={t("signOut")}
|
||||
continueLabel={t("confirm")}
|
||||
cancelLabel={t("cancel")}
|
||||
buttonVariant="secondary"
|
||||
modalMessage={t("signOutWarning")}
|
||||
onContinue={() => signOutSession(session, device)}
|
||||
/>
|
||||
>
|
||||
{t("signOutWarning")}
|
||||
</ContinueCancelModal>
|
||||
)}
|
||||
</GridItem>
|
||||
<GridItem span={11}>
|
||||
|
|
|
@ -173,14 +173,13 @@ const SigningIn = () => {
|
|||
>
|
||||
{container.removeable ? (
|
||||
<ContinueCancelModal
|
||||
buttonTitle="remove"
|
||||
buttonVariant="danger"
|
||||
buttonTitle={t("delete")}
|
||||
modalTitle={t("removeCred", [
|
||||
label(meta.credential),
|
||||
])}
|
||||
modalMessage={t("stopUsingCred", [
|
||||
label(meta.credential),
|
||||
])}
|
||||
continueLabel={t("confirm")}
|
||||
cancelLabel={t("cancel")}
|
||||
buttonVariant="danger"
|
||||
onContinue={async () => {
|
||||
try {
|
||||
await deleteCredentials(meta.credential);
|
||||
|
@ -199,7 +198,9 @@ const SigningIn = () => {
|
|||
);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
>
|
||||
{t("stopUsingCred", [label(meta.credential)])}
|
||||
</ContinueCancelModal>
|
||||
) : (
|
||||
<Button
|
||||
variant="secondary"
|
||||
|
|
|
@ -239,15 +239,15 @@ const Applications = () => {
|
|||
<hr />
|
||||
<GridItem>
|
||||
<ContinueCancelModal
|
||||
buttonTitle="removeAccess"
|
||||
buttonTitle={t("removeAccess")}
|
||||
modalTitle={t("removeAccess")}
|
||||
continueLabel={t("confirm")}
|
||||
cancelLabel={t("cancel")}
|
||||
buttonVariant="secondary"
|
||||
modalTitle="removeAccess"
|
||||
modalMessage={t("removeModalMessage", [
|
||||
application.clientId,
|
||||
])}
|
||||
continueLabel="confirmButton"
|
||||
onContinue={() => removeConsent(application.clientId)} // required
|
||||
/>
|
||||
onContinue={() => removeConsent(application.clientId)}
|
||||
>
|
||||
{t("removeModalMessage", [application.clientId])}
|
||||
</ContinueCancelModal>
|
||||
</GridItem>
|
||||
<GridItem>
|
||||
<InfoAltIcon /> {t("infoMessage")}
|
||||
|
|
|
@ -235,20 +235,22 @@ export const ResourcesTab = () => {
|
|||
</DropdownItem>,
|
||||
<ContinueCancelModal
|
||||
key="unShare"
|
||||
isDisabled={
|
||||
details[resource._id]?.permissions?.length === 0
|
||||
}
|
||||
buttonTitle={
|
||||
<>
|
||||
<Remove2Icon /> {t("unShare")}
|
||||
</>
|
||||
}
|
||||
modalTitle={t("unShare")}
|
||||
continueLabel={t("confirm")}
|
||||
cancelLabel={t("cancel")}
|
||||
component={DropdownItem}
|
||||
modalTitle="unShare"
|
||||
modalMessage="unShareAllConfirm"
|
||||
continueLabel="confirmButton"
|
||||
onContinue={() => removeShare(resource)}
|
||||
/>,
|
||||
isDisabled={
|
||||
details[resource._id]?.permissions?.length === 0
|
||||
}
|
||||
>
|
||||
{t("unShareAllConfirm")}
|
||||
</ContinueCancelModal>,
|
||||
]}
|
||||
/>
|
||||
</OverflowMenuItem>
|
||||
|
@ -287,20 +289,22 @@ export const ResourcesTab = () => {
|
|||
</OverflowMenuDropdownItem>,
|
||||
<ContinueCancelModal
|
||||
key="unShare"
|
||||
isDisabled={
|
||||
details[resource._id]?.permissions?.length === 0
|
||||
}
|
||||
buttonTitle={
|
||||
<>
|
||||
<Remove2Icon /> {t("unShare")}
|
||||
</>
|
||||
}
|
||||
modalTitle={t("unShare")}
|
||||
continueLabel={t("confirm")}
|
||||
cancelLabel={t("cancel")}
|
||||
component={OverflowMenuDropdownItem}
|
||||
modalTitle="unShare"
|
||||
modalMessage="unShareAllConfirm"
|
||||
continueLabel="confirmButton"
|
||||
onContinue={() => removeShare(resource)}
|
||||
/>,
|
||||
isDisabled={
|
||||
details[resource._id]?.permissions?.length === 0
|
||||
}
|
||||
>
|
||||
{t("unShareAllConfirm")}
|
||||
</ContinueCancelModal>,
|
||||
]}
|
||||
/>
|
||||
</OverflowMenuControl>
|
||||
|
|
|
@ -3,26 +3,24 @@ import { Button, ButtonProps, Modal, ModalProps } from "@patternfly/react-core";
|
|||
|
||||
export type ContinueCancelModalProps = Omit<ModalProps, "ref" | "children"> & {
|
||||
modalTitle: string;
|
||||
modalMessage?: string;
|
||||
continueLabel: string;
|
||||
cancelLabel: string;
|
||||
buttonTitle: string | ReactNode;
|
||||
buttonVariant?: ButtonProps["variant"];
|
||||
isDisabled?: boolean;
|
||||
onContinue: () => void;
|
||||
continueLabel?: string;
|
||||
cancelLabel?: string;
|
||||
component?: React.ElementType<any> | React.ComponentType<any>;
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
export const ContinueCancelModal = ({
|
||||
modalTitle,
|
||||
modalMessage,
|
||||
continueLabel,
|
||||
cancelLabel,
|
||||
buttonTitle,
|
||||
isDisabled,
|
||||
buttonVariant,
|
||||
onContinue,
|
||||
continueLabel = "continue",
|
||||
cancelLabel = "doCancel",
|
||||
component = Button,
|
||||
children,
|
||||
...rest
|
||||
|
@ -67,7 +65,7 @@ export const ContinueCancelModal = ({
|
|||
</Button>,
|
||||
]}
|
||||
>
|
||||
{modalMessage ? modalMessage : children}
|
||||
{children}
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue