Custom Error Messages & Toasts
Override every user-visible error and success message the SDK produces. Ships with three curated copy presets.
The Unidy SDK produces user-visible strings for every error and success event — sign-in failure, newsletter subscription, profile save, and so on. The plugin ships a Messages system that catches those strings and swaps them for your own copy. Configure under Unidy → Auth → Fehlermeldungen & Bestätigungen.
Presets
A preset is a curated copy set for the roughly 30 messages the SDK can produce. Three ship out of the box:
- Casual DE (default) — Du-Ansprache, terse, friendly.
- Formal DE — Sie-Ansprache, full sentences, admin-portal tone.
- English — US-English mirror of Casual.
- Custom — your own overrides only; no preset applied.
Click a preset card to activate it. Descriptions on each card summarize the tone.
Per-code overrides
Below the preset picker, every registered code is listed with its level (error / success / info / warning) and an editable input. The placeholder shows what the active preset would display if you leave the field empty.
Type your own copy to override a single message without switching the whole preset. Overrides win against presets; the resolved order is:
- Admin override (typed by you)
- Active preset
- Plugin-registered default
- Raw code (only as a fallback)
Codes are grouped by module (Auth, Newsletter, Profile, Tickets) so you can spot which module owns which message.
Message levels
Each code has a level that drives its visual style (color, icon):
- Error — red tint. Something failed, visitor action required.
- Success — green tint. An action completed successfully.
- Info — blue tint. Neutral confirmation (e.g. "code sent to your email").
- Warning — orange tint. Something worked but with caveats.
You cannot change a code's level from the admin — it's a plugin-side decision that reflects the message's meaning.
Message aliases
Some SDK flows emit pre-translated prose instead of machine codes. For example, the SDK might send "Sie haben sich erfolgreich abonniert" directly, not the code newsletter_subscribed. The plugin registers aliases — text-to-code mappings — for the most common SDK strings so your overrides catch both variants.
Additional aliases can be registered from a companion mu-plugin via the unidy_sdk_message_aliases filter.
Reset
At the top of the override list, a Alle zurücksetzen button appears when you have one or more overrides. Clicking it clears every override in one action — the active preset (or plugin default) takes over again.
Applying changes and legacy aliases
Save your settings and reload a representative page to verify error, success, info, and warning messages. Current releases supply configured SDK translations when components initialize. They do not rely on watching and replacing arbitrary toast DOM text after rendering.
The unidy_sdk_message_aliases filter remains a legacy text-to-code extension point for companion plugins. It is not the current mechanism for overriding SDK-rendered copy. Use the admin code editor for catalogued messages; ask your Unidy contact to map new SDK codes when needed.
Message-code examples
The editor groups the installed catalog by module. The legacy catalog below is useful when locating a message or reporting an untranslated code; the installed release and active locale determine the actual resolved wording.
| Module | Code | Level and meaning |
|---|---|---|
| Auth | invalid_email | Error: invalid email |
| Auth | email_not_found | Error: account not found |
| Auth | email_already_taken | Error: email already registered |
| Auth | invalid_password | Error: incorrect password |
| Auth | password_too_short | Error: password too short |
| Auth | invalid_verification_code | Error: incorrect verification code |
| Auth | expired_verification_code | Error: verification code expired |
| Auth | expired_magic_code | Error: sign-in code expired |
| Auth | rate_limited | Error: too many requests |
| Auth | network_error | Error: connection failed |
| Auth | unauthorized | Error: authentication required |
| Auth | token_expired | Error: session expired |
| Auth | oauth_provider_error | Error: provider sign-in failed |
| Auth | unknown_error | Error: unclassified failure |
| Auth | missing_required_field | Error: required profile data missing |
| Auth | consent_required | Error: required consent missing |
| Auth | signin_success | Success: signed in |
| Auth | signup_success | Success: registration completed |
| Auth | logout_success | Success: signed out |
| Auth | password_reset_sent | Info: password-reset link sent |
| Auth | magic_code_sent | Info: sign-in code sent |
| Newsletter | newsletter_subscribed | Success: subscribed |
| Newsletter | newsletter_unsubscribed | Success: unsubscribed |
| Newsletter | newsletter_preferences_updated | Success: preferences saved |
| Newsletter | newsletter_doi_sent | Info: confirmation link sent |
| Newsletter | newsletter_confirmed | Success: subscription confirmed |
| Newsletter | newsletter_already_subscribed | Info: already subscribed |
| Profile | profile_saved | Success: profile saved |
| Profile | profile_save_failed | Error: profile save failed |
| Tickets | ticket_download_failed | Error: ticket download failed |
| Tickets | wallet_export_failed | Error: wallet export failed |
The admin message code missing_required_field is singular. The SDK translation key errors.missing_required_fields is a separate identifier. Use the admin code when locating its override; the plugin maps it to the SDK's translated field error.