This commit is contained in:
Meghdad committed 2026-07-10 04:20:13 +03:30
commit 8fe27cfa5e
52 files changed
+5299

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
# Translation Notes
`messages.php` contains backend translation strings and supports normal PHP translator comments.
`card.json` files are loaded by `Nova::translations()` for the Vue card. JSON does not support comments, so keep those files as valid JSON. The current frontend keys are:
- `nova-form-card.submit`: default submit button text.
- `nova-form-card.submitting`: loading text while a submission is in progress.
- `nova-form-card.could_not_submit`: fallback error toast when a request fails without a server message.
+5
View File
@@ -0,0 +1,5 @@
{
"nova-form-card.submit": "Submit",
"nova-form-card.submitting": "Submitting...",
"nova-form-card.could_not_submit": "The form could not be submitted."
}
+113
View File
@@ -0,0 +1,113 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Button Labels
|--------------------------------------------------------------------------
|
| These labels are used by the backend defaults. The frontend card has
| matching keys in card.json because Nova consumes JSON translations.
|
*/
'submit' => 'Submit',
'submitting' => 'Submitting...',
/*
|--------------------------------------------------------------------------
| Submission Errors
|--------------------------------------------------------------------------
|
| These messages are returned by the submit endpoint. Keep them short enough
| to work in Nova toast notifications and validation responses.
|
*/
'cannot_submit' => 'This form card cannot be submitted.',
'not_authorized_to_submit' => 'This form card is not authorized for submission.',
'fields_payload_must_be_object' => 'The fields payload must be an object.',
'invalid_data' => 'The given data was invalid.',
'could_not_submit' => 'The form could not be submitted.',
/*
|--------------------------------------------------------------------------
| Developer-Facing Exceptions
|--------------------------------------------------------------------------
|
| The unsupported_field message is shown to developers during serialization.
| Preserve the :field and :supported placeholders in custom translations.
|
*/
'unsupported_field' => 'The [:field] field is not supported by nova-form-card. Supported fields are: :supported.',
'app_key_required' => 'An application key is required to sign form card submissions.',
/*
|--------------------------------------------------------------------------
| Signed Submit Token Errors
|--------------------------------------------------------------------------
|
| These describe why a submitted form token could not be trusted. They are
| intentionally specific for logs and debugging, but are usually returned as
| a generic authorization failure to users.
|
*/
'token' => [
'missing' => 'The form card token is missing.',
'invalid_signature' => 'The form card token signature is invalid.',
'missing_card_class' => 'The form card token does not contain a card class.',
'expired' => 'The form card token has expired.',
'wrong_user' => 'The form card token belongs to another user.',
'invalid_card_class' => 'The form card token references an invalid card class.',
'invalid_payload' => 'The form card token payload is invalid.',
],
/*
|--------------------------------------------------------------------------
| Supported Field Names
|--------------------------------------------------------------------------
|
| These names are only used in developer-facing unsupported-field messages.
|
*/
'fields' => [
'text' => 'Text',
'textarea' => 'Textarea',
'select' => 'Select',
'boolean' => 'Boolean',
'number' => 'Number',
'date' => 'Date',
'file' => 'File',
'image' => 'Image',
'audio' => 'Audio',
'avatar' => 'Avatar',
'email' => 'Email',
'url' => 'URL',
'password' => 'Password',
'hidden' => 'Hidden',
'id' => 'ID',
'date_time' => 'DateTime',
'currency' => 'Currency',
'color' => 'Color',
'code' => 'Code',
'country' => 'Country',
'timezone' => 'Timezone',
'multi_select' => 'MultiSelect',
'boolean_group' => 'BooleanGroup',
'key_value' => 'KeyValue',
'slug' => 'Slug',
'token' => 'Token',
'badge' => 'Badge',
'heading' => 'Heading',
'line' => 'Line',
'stack' => 'Stack',
'sparkline' => 'Sparkline',
'status' => 'Status',
'gravatar' => 'Gravatar',
'ui_avatar' => 'UiAvatar',
'password_confirmation' => 'PasswordConfirmation',
],
];