chore: translation for unauthorized workflow error (#8573)

* fix: translation for unauthorized workflow error

* change to dynamic string

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
pull/8946/head^2
Sai Deepesh 2023-05-30 19:54:17 +05:30 committed by GitHub
parent fba2a2e2ca
commit a062b5a355
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -1816,6 +1816,7 @@
"email_invite_team_bulk": "{{userCount}} users have been invited",
"error_collecting_card": "Error collecting card",
"image_size_limit_exceed": "Uploaded image shouldn't exceed 5mb size limit",
"unauthorized_workflow_error_message": "{{errorCode}}: You are not authorized to enable or disable this workflow",
"inline_embed": "Inline Embed",
"load_inline_content": "Loads your event type directly inline with your other website content.",
"floating_pop_up_button": "Floating pop-up button",

View File

@ -71,9 +71,12 @@ const WorkflowListItem = (props: ItemProps) => {
showToast(message, "error");
}
if (err.data?.code === "UNAUTHORIZED") {
// TODO: Add missing translation
const message = `${err.data.code}: You are not authorized to enable or disable this workflow`;
showToast(message, "error");
showToast(
t("unauthorized_workflow_error_message", {
errorCode: err.data.code,
}),
"error"
);
}
},
});

View File

@ -310,11 +310,11 @@ function UserDropdown({ small }: { small?: boolean }) {
</span>
{!small && (
<span className="flex flex-grow items-center truncate">
<span className="flex-grow truncate text-sm leading-none">
<span className="text-emphasis mb-1 block truncate font-medium leading-none">
<span className="flex-grow truncate text-sm">
<span className="text-emphasis mb-1 block truncate pb-1 font-medium leading-none">
{user.name || "Nameless User"}
</span>
<span className="text-default truncate font-normal leading-none">
<span className="text-default truncate pb-1 font-normal leading-none">
{user.username
? process.env.NEXT_PUBLIC_WEBSITE_URL === "https://cal.com"
? `cal.com/${user.username}`