Skip to content

Commit 31ecb38

Browse files
feat(mosaic): seed the errors catalog from the legacy English copy (#10048)
1 parent aba0334 commit 31ecb38

3 files changed

Lines changed: 48 additions & 2 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

‎packages/mosaic/src/features/api-keys/api-keys-table.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function createErrorMessage(
9595
return m.nameTakenError;
9696
}
9797
}
98-
// TODO: Move the token_quota_exceeded and token_creation_conflict copy into the errors catalog, let the model propagate Clerk errors, and give useForm an errorFallback so m.createError replaces the raw message.
98+
// TODO: Let the model propagate Clerk errors, now that the errors catalog covers token_quota_exceeded and token_creation_conflict, and give useForm an errorFallback so m.createError replaces the raw message.
9999
return error instanceof Error ? error.message : m.createError;
100100
}
101101

‎packages/mosaic/src/localization/errors.messages.ts‎

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
// TODO: Seed this catalog from the unstable__errors entries in @clerk/localizations so existing copy and translations carry over.
21
export const errorMessages: { readonly generic: string } & Readonly<Record<string, string>> = {
32
generic: 'Something went wrong. Please try again.',
43
action_blocked: "This action couldn't be completed. Please try again later or contact support if this persists.",
54
avatar_file_count_exceeded: 'Only one file can be uploaded at a time.',
65
avatar_file_size_exceeded: 'File size exceeds the maximum limit of 10MB. Please choose a smaller file.',
76
avatar_file_type_invalid: 'File type not supported. Please upload a JPG, PNG, GIF, or WEBP image.',
7+
captcha_unavailable:
8+
'Sign up unsuccessful due to failed bot validation. Please refresh the page to try again or reach out to support for more assistance.',
89
connected_account_unavailable: 'This connected account is no longer available.',
910
enterprise_connection_unavailable: 'This enterprise connection is no longer available.',
1011
form_new_password_matches_current: 'New password cannot be the same as the current password.',
@@ -15,11 +16,54 @@ export const errorMessages: { readonly generic: string } & Readonly<Record<strin
1516
form_password_not_strong_enough: 'Your password is not strong enough.',
1617
form_password_pwned:
1718
'This password has been found as part of a breach and can not be used, please try another password instead.',
19+
form_password_pwned__sign_in:
20+
'This password has been found as part of a breach and can not be used, please reset your password.',
1821
form_password_size_in_bytes_exceeded:
1922
'Your password has exceeded the maximum number of bytes allowed, please shorten it or remove some special characters.',
23+
form_password_untrusted__sign_in:
24+
'Your password may be compromised. To protect your account, please continue with an alternative sign-in method. You will be required to reset your password after signing in.',
2025
form_password_validation_failed: 'Incorrect Password',
2126
form_username_invalid_length: 'Your username must be between {min_length} and {max_length} characters long.',
2227
form_username_needs_non_number_char: 'Your username must contain at least one non-numeric character.',
28+
insufficient_seats_change_plan:
29+
'Your organization does not have enough seats to invite the desired number of members. Please change to a plan that supports the number of members you are attempting to invite.',
30+
insufficient_seats_contact_support:
31+
'Your organization does not have enough seats to invite the desired number of members. Please contact support.',
2332
network_error: 'Unable to reach the server. Check your connection and try again.',
33+
oauth_access_denied: 'You did not grant access to your account.',
2434
oauth_missing_verification_url: 'The connection could not start. Please try again.',
35+
organization_membership_quota_exceeded:
36+
'You have reached your limit of organization memberships, including outstanding invitations.',
37+
organization_not_found_or_unauthorized:
38+
'You are no longer a member of this organization. Please choose or create another one.',
39+
organization_not_found_or_unauthorized_with_create_organization_disabled:
40+
'You are no longer a member of this organization. Please choose another one.',
41+
passkey_already_exists: 'A passkey is already registered with this device.',
42+
passkey_not_supported: 'Passkeys are not supported on this device.',
43+
passkey_pa_not_supported: 'Registration requires a platform authenticator but the device does not support it.',
44+
passkey_registration_cancelled: 'Passkey registration was cancelled or timed out.',
45+
passkey_retrieval_cancelled: 'Passkey verification was cancelled or timed out.',
46+
protect_check_execution_failed: "Verification didn't complete. Please try again.",
47+
protect_check_invalid_script: "Couldn't load verification. Please contact support if this persists.",
48+
protect_check_invalid_sdk_url: "Verification couldn't start. Please contact support.",
49+
protect_check_required:
50+
"This sign-in needs an extra verification step that can't be shown here. Please try again or use a different sign-in method.",
51+
protect_check_script_load_failed:
52+
"Couldn't load verification. This may be caused by a network issue or a Content Security Policy that blocks the verification script. Please try again or contact support.",
53+
protect_check_timed_out: "Verification didn't complete in time. Please try again.",
54+
protect_check_unsupported_environment:
55+
"Verification isn't supported in this environment. Please continue in a standard browser or contact support.",
56+
sso_bypass_domain_not_served:
57+
'This member could not be added because their email address is not served by a connection.',
58+
ticket_expired_code: 'This link has expired. Please start again or request a new link.',
59+
ticket_invalid_code:
60+
'This link is no longer valid or has already been used. Please start again or request a new link.',
61+
token_creation_conflict: 'API Key name already exists.',
62+
token_quota_exceeded: 'You have reached your usage limit. You can remove the limit by upgrading to a paid plan.',
63+
too_many_unverified_identifications:
64+
'Too many verifications are pending on this account. Remove an unverified email address, phone number, or wallet you no longer need, or wait a few minutes for an incomplete passkey setup to expire, then try again.',
65+
web3_missing_identifier: 'A Web3 Wallet extension cannot be found. Please install one to continue.',
66+
web3_signature_request_rejected: 'You have rejected the signature request. Please try again to continue.',
67+
web3_solana_signature_generation_failed:
68+
'An error occurred while generating the signature. Please try again to continue.',
2569
};

0 commit comments

Comments
 (0)