Move locale files from language pack to core (#2408)

This commit is contained in:
Robert Korulczyk 2021-02-17 22:23:13 +01:00 committed by GitHub
parent 56d8301b2d
commit c4ebebe48e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 770 additions and 7 deletions

653
locale/core.yml Normal file
View File

@ -0,0 +1,653 @@
core:
##
# UNIQUE KEYS - The following keys are used in only one location each.
##
# Translations in this namespace are used by the admin interface.
admin:
# These translations are used in the Appearance page.
appearance:
colored_header_label: Colored Header
colors_heading: Colors
colors_text: "Choose two colors to theme your forum with. The first will be used as a highlight color, while the second will be used to style background elements."
custom_footer_heading: Custom Footer
custom_footer_text: => core.ref.custom_footer_text
custom_header_heading: Custom Header
custom_header_text: => core.ref.custom_header_text
custom_styles_heading: Custom Styles
custom_styles_text: Customize your forum's appearance by adding your own LESS/CSS code to be applied on top of Flarum's default styles.
dark_mode_label: Dark Mode
description: "Customize your forum's colors, logos, and other variables."
edit_css_button: Edit Custom CSS
edit_footer_button: => core.ref.custom_footer_title
edit_header_button: => core.ref.custom_header_title
enter_hex_message: Please enter a hexadecimal color code.
favicon_heading: Favicon
favicon_text: Upload an image to be displayed as the forum's shortcut icon.
logo_heading: Logo
logo_text: Upload an image to be displayed in place of the forum title.
submit_button: => core.ref.save_changes
title: Appearance
# These translations are used in the Basics page.
basics:
all_discussions_label: => core.ref.all_discussions
default_language_heading: Default Language
description: "Set your forum title, language, and other basic settings."
display_name_heading: User Display Name
display_name_text: Select the driver that should be used for users' display names. By default, the username is shown.
forum_description_heading: Forum Description
forum_description_text: Enter a short sentence or two that describes your community. This will appear in the meta tag and show up in search engines.
forum_title_heading: Forum Title
home_page_heading: Home Page
home_page_text: Choose the page which users will first see when they visit your forum.
saved_message: Your changes were saved.
show_language_selector_label: Show language selector
slug_driver_heading: "Slug Driver: {model}"
slug_driver_text: Select a driver to be used for slugging this model.
submit_button: => core.ref.save_changes
title: Basics
welcome_banner_heading: Welcome Banner
welcome_banner_text: Configure the text that displays in the banner on the All Discussions page. Use this to welcome guests to your forum.
# These translations are used in the Dashboard page.
dashboard:
clear_cache_button: Clear Cache
description: Your forum at a glance.
title: Dashboard
tools_button: Tools
# These translations are used in the Edit Custom CSS modal dialog.
edit_css:
customize_text: "Customize your forum's appearance by adding your own LESS/CSS code to be applied on top of Flarum's <a>default styles</a>."
submit_button: => core.ref.save_changes
title: Edit Custom CSS
# These translations are used in the Edit Custom Footer modal dialog.
edit_footer:
customize_text: => core.ref.custom_footer_text
submit_button: => core.ref.save_changes
title: => core.ref.custom_footer_title
# These translations are used in the Edit Group modal dialog.
edit_group:
color_label: => core.ref.color
delete_button: Delete Group
delete_confirmation: "Are you sure you want to delete this group? The group members will NOT be deleted."
hide_label: Hide on forum
icon_label: => core.ref.icon
icon_text: => core.ref.icon_text
name_label: Name
plural_placeholder: Plural (e.g. Mods)
singular_placeholder: Singular (e.g. Mod)
submit_button: => core.ref.save_changes
title: Create Group
# These translations are used in the Edit Custom Header modal dialog.
edit_header:
customize_text: => core.ref.custom_header_text
submit_button: => core.ref.save_changes
title: => core.ref.custom_header_title
# These translations are used in the email page of the admin interface.
email:
addresses_heading: Addresses
description: "Configure the driver, settings and addresses your forum will use to send email."
driver_heading: Choose a Driver
driver_label: Driver
from_label: Sender
mail_encryption_label: Encryption
mail_host_label: Host
mail_mailgun_domain_label: Domain
mail_mailgun_region_label: Region
mail_mailgun_secret_label: Secret key
mail_password_label: => core.ref.password
mail_port_label: Port
mail_username_label: => core.ref.username
mailgun_heading: Mailgun Settings
not_sending_message: Flarum currently does not send emails. This can be due to the selected driver, or errors in its configuration.
send_test_mail_button: Send
send_test_mail_heading: Send Test Mail
send_test_mail_success: "Test mail sent successfully!"
send_test_mail_text: "This will send an email using the above configuration to your email, {email}."
smtp_heading: SMTP Settings
submit_button: => core.ref.save_changes
title: => core.ref.email
# These translations are used on default extension pages.
extension:
confirm_uninstall: Uninstalling will remove all database entries and assets related to the extension. Are you sure you want to continue?
disabled: Disabled
enable_to_see: Enable the extension to view and change settings.
enabled: Enabled
info_links:
discuss: Discuss
documentation: Documentation
donate: Donate
source: Source
support: Support
website: Website
no_permissions: This extension has no permissions.
no_settings: This extension has no settings.
open_modal: Open Settings
permissions_title: Permissions
saved_message: Your changes were saved.
uninstall_button: Uninstall
# These translations are used in the secondary header.
header:
get_help: Get Help
log_out_button: => core.ref.log_out
# These translations are used in the modal dialog displayed when loading extensions.
loading:
title: Please Wait...
# These translations are used in the navigation bar.
nav:
appearance_button: => core.admin.appearance.title
appearance_title: => core.admin.appearance.description
basics_button: => core.admin.basics.title
basics_title: => core.admin.basics.description
categories:
authentication: Authentication
core: Core Configuration
discussion: Discussion
feature: Features
formatting: Formatting
language: Languages
moderation: Moderation
other: Other Extensions
theme: Themes
dashboard_button: => core.admin.dashboard.title
dashboard_title: => core.admin.dashboard.description
email_button: => core.ref.email
email_title: => core.admin.email.description
permissions_button: => core.admin.permissions.title
permissions_title: => core.admin.permissions.description
search_placeholder: Search Extensions
# These translations are used in the Permissions page of the admin interface.
permissions:
allow_post_editing_label: Allow post editing
allow_renaming_label: Allow renaming
create_heading: Create
delete_discussions_forever_label: Delete discussions forever
delete_discussions_label: Delete discussions
delete_posts_forever_label: Delete posts forever
delete_posts_label: Delete posts
description: Configure who can see and do what.
edit_posts_label: Edit posts
edit_users_label: Edit users
global_heading: Global
moderate_heading: Moderate
new_group_button: New Group
participate_heading: Participate
post_without_throttle_label: Reply multiple times without waiting
read_heading: Read
rename_discussions_label: Rename discussions
reply_to_discussions_label: Reply to discussions
sign_up_label: Sign up
start_discussions_label: Start discussions
title: Permissions
view_discussions_label: View discussions
view_hidden_groups_label: View hidden group badges
view_last_seen_at_label: Always view user last seen time
view_post_ips_label: View post IP addresses
view_user_list_label: View user list
# These translations are used in the dropdown menus on the Permissions page.
permissions_controls:
allow_indefinitely_button: Indefinitely
allow_some_minutes_button: "For {count} minute|For {count} minutes"
allow_ten_minutes_button: For 10 minutes
allow_until_reply_button: Until next reply
everyone_button: Everyone
members_button: => core.group.members
signup_closed_button: Closed
signup_open_button: Open
# These translations are used in the Settings modal dialog.
settings:
submit_button: => core.ref.save_changes
# These translations are used in image upload buttons.
upload_image:
remove_button: => core.ref.remove
upload_button: Choose an Image...
# Translations in this namespace are used by the forum user interface.
forum:
# These translations are used in the Change Email modal dialog.
change_email:
confirm_password_placeholder: => core.ref.confirm_password
confirmation_message: => core.ref.confirmation_email_sent
dismiss_button: => core.ref.okay
incorrect_password_message: The password you entered is incorrect.
submit_button: => core.ref.save_changes
title: => core.ref.change_email
# These translations are used in the Change Password modal dialog.
change_password:
send_button: Send Password Reset Email
text: Click the button below and check your email for a link to change your password.
title: => core.ref.change_password
# These translations are used by the composer controls.
composer:
close_tooltip: Close
exit_full_screen_tooltip: Exit Full Screen
full_screen_tooltip: Full Screen
minimize_tooltip: Minimize
preview_tooltip: Preview
# These translations are used by the composer when starting a discussion.
composer_discussion:
body_placeholder: Write a Post...
discard_confirmation: "You have not posted your discussion. Do you wish to discard it?"
submit_button: Post Discussion
title: => core.ref.start_a_discussion
title_placeholder: Discussion Title
# These translations are used by the composer when editing a post.
composer_edit:
discard_confirmation: "You have not saved your changes. Do you wish to discard them?"
edited_message: Your edit was made.
post_link: "Post #{number} in {discussion}"
submit_button: => core.ref.save_changes
view_button: => core.ref.view
# These translations are used by the composer when replying to a discussion.
composer_reply:
body_placeholder: => core.ref.write_a_reply
discard_confirmation: "You have not posted your reply. Do you wish to discard it?"
posted_message: Your reply was posted.
submit_button: Post Reply
view_button: => core.ref.view
# These translations are used by the discussion control buttons.
discussion_controls:
cannot_reply_button: Can't Reply
cannot_reply_text: You don't have permission to reply to this discussion.
delete_button: => core.ref.delete
delete_confirmation: "Are you sure you want to delete this discussion?"
delete_forever_button: => core.ref.delete_forever
log_in_to_reply_button: Log In to Reply
rename_button: => core.ref.rename
reply_button: => core.ref.reply
restore_button: => core.ref.restore
# These translations are used in the discussion list.
discussion_list:
empty_text: It looks as though there are no discussions here.
load_more_button: => core.ref.load_more
mark_as_read_tooltip: Mark as Read
replied_text: "{username} replied {ago}"
started_text: "{username} started {ago}"
# These translations are used in the Edit User modal dialog (admin function).
edit_user:
activate_button: Activate User
email_heading: => core.ref.email
email_label: => core.ref.email
groups_heading: Groups
password_heading: => core.ref.password
password_label: => core.ref.password
set_password_label: Set new password
submit_button: => core.ref.save_changes
title: Edit User
username_heading: => core.ref.username
username_label: => core.ref.username
# These translations are used in the Forgot Password modal dialog.
forgot_password:
dismiss_button: => core.ref.okay
email_placeholder: => core.ref.email
email_sent_message: We've sent you an email containing a link to reset your password. Check your spam folder if you don't receive it within the next minute or two.
not_found_message: There is no user registered with that email address.
submit_button: Recover Password
text: Enter your email address and we will send you a link to reset your password.
title: Forgot Password
# These translations are used in the header and session dropdown menu.
header:
admin_button: Administration
back_to_index_tooltip: Back to Discussion List
log_in_link: => core.ref.log_in
log_out_button: => core.ref.log_out
profile_button: Profile
search_placeholder: Search Forum
settings_button: => core.ref.settings
sign_up_link: => core.ref.sign_up
# These translations are used on the index page, peripheral to the discussion list.
index:
all_discussions_link: => core.ref.all_discussions
cannot_start_discussion_button: Can't Start Discussion
mark_all_as_read_confirmation: "Are you sure you want to mark all discussions as read?"
mark_all_as_read_tooltip: => core.ref.mark_all_as_read
meta_title_text: => core.ref.all_discussions
refresh_tooltip: Refresh
start_discussion_button: => core.ref.start_a_discussion
# These translations are used by the sorting control above the discussion list.
index_sort:
latest_button: Latest
newest_button: Newest
oldest_button: Oldest
relevance_button: Relevance
top_button: Top
# These translations are used in the Log In modal dialog.
log_in:
forgot_password_link: "Forgot password?"
invalid_login_message: Your login details were incorrect.
password_placeholder: => core.ref.password
remember_me_label: Remember Me
sign_up_text: "Don't have an account? <a>Sign Up</a>"
submit_button: => core.ref.log_in
title: => core.ref.log_in
username_or_email_placeholder: Username or Email
# These translations are used by the Notifications dropdown, a.k.a. "the bell".
notifications:
discussion_renamed_text: "{username} changed the title"
empty_text: No Notifications
mark_all_as_read_tooltip: => core.ref.mark_all_as_read
mark_as_read_tooltip: Mark as Read
title: => core.ref.notifications
tooltip: => core.ref.notifications
# These translations are used by tooltips displayed for individual posts.
post:
edited_text: Edited
edited_tooltip: "{username} edited {ago}"
number_tooltip: "Post #{number}"
# These translations are used by the post control buttons.
post_controls:
delete_button: => core.ref.delete
delete_confirmation: "Are you sure you want to delete this post forever? This action cannot be undone."
delete_forever_button: => core.ref.delete_forever
edit_button: => core.ref.edit
hide_confirmation: "Are you sure you want to delete this post?"
restore_button: => core.ref.restore
# These translations are used in the scrubber to the right of the post stream.
post_scrubber:
now_link: Now
original_post_link: Original Post
unread_text: "{count} unread"
viewing_text: "{index} of {count} post|{index} of {count} posts"
# These translations are displayed between posts in the post stream.
post_stream:
discussion_renamed_old_tooltip: 'The old title was: "{old}"'
discussion_renamed_text: "{username} changed the title to {new}."
load_more_button: => core.ref.load_more
reply_placeholder: => core.ref.write_a_reply
time_lapsed_text: "{period} later"
# These translations are used by the rename discussion modal.
rename_discussion:
submit_button: => core.ref.rename
title: Rename Discussion
# These translations are used by the search results dropdown list.
search:
all_discussions_button: 'Search all discussions for "{query}"'
discussions_heading: => core.ref.discussions
users_heading: => core.ref.users
# These translations are used in the Settings page.
settings:
account_heading: Account
change_email_button: => core.ref.change_email
change_password_button: => core.ref.change_password
notifications_heading: => core.ref.notifications
notify_by_email_heading: => core.ref.email
notify_by_web_heading: Web
notify_discussion_renamed_label: Someone renames a discussion I started
privacy_disclose_online_label: Allow others to see when I am online
privacy_heading: Privacy
title: => core.ref.settings
# These translations are used in the Sign Up modal dialog.
sign_up:
dismiss_button: => core.ref.okay
email_placeholder: => core.ref.email
log_in_text: "Already have an account? <a>Log In</a>"
password_placeholder: => core.ref.password
submit_button: => core.ref.sign_up
title: => core.ref.sign_up
username_placeholder: => core.ref.username
welcome_text: "Welcome, {username}!"
# These translations are used in the user profile page and profile popup.
user:
avatar_remove_button: => core.ref.remove
avatar_upload_button: Upload
avatar_upload_tooltip: Upload a new avatar
discussions_link: => core.ref.discussions
in_discussion_text: "In {discussion}"
joined_date_text: "Joined {ago}"
online_text: Online
posts_empty_text: It looks like there are no posts here.
posts_link: => core.ref.posts
posts_load_more_button: => core.ref.load_more
settings_link: => core.ref.settings
# These translations are found on the user profile page (admin function).
user_controls:
button: Controls
delete_button: => core.ref.delete
delete_confirmation: "Are you sure you want to delete this user? The user's posts will NOT be deleted."
delete_error_message: "Deletion of user <i>{username} ({email})</i> failed"
delete_success_message: "User <i>{username} ({email})</i> was deleted"
edit_button: => core.ref.edit
# These translations are used in the alert that is shown when a new user has not confirmed their email address.
user_email_confirmation:
alert_message: => core.ref.confirmation_email_sent
resend_button: Resend Confirmation Email
sent_message: Sent
# Translations in this namespace are used by the forum and admin interfaces.
lib:
# These translations are displayed as tooltips for discussion badges.
badge:
hidden_tooltip: Hidden
# These translations are displayed as error messages.
error:
dependent_extensions_message: "Cannot disable {extension} until the following dependent extensions are disabled: {extensions}"
generic_message: "Oops! Something went wrong. Please reload the page and try again."
missing_dependencies_message: "Cannot enable {extension} until the following dependencies are enabled: {extensions}"
not_found_message: The requested resource was not found.
permission_denied_message: You do not have permission to do that.
rate_limit_exceeded_message: You're going a little too quickly. Please try again in a few seconds.
# These translations are used as suffixes when abbreviating numbers.
number_suffix:
kilo_text: K
mega_text: M
# These translations are used to punctuate a series of items.
series:
glue_text: ", "
three_text: "{first}, {second}, and {third}"
two_text: "{first} and {second}"
# These translations are used to modify usernames.
username:
deleted_text: "[deleted]"
# Translations in this namespace are used in views other than Flarum's normal JS client.
views:
# Translations in this namespace are displayed by the basic HTML content loader.
content:
javascript_disabled_message: This site is best viewed in a modern browser with JavaScript enabled.
load_error_message: Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
loading_text: Loading...
# Translations in this namespace are displayed in the basic HTML discussion view.
discussion:
next_page_button: => core.ref.next_page
previous_page_button: => core.ref.previous_page
# Translations in this namespace are displayed when Flarum encounters an error.
error:
csrf_token_mismatch: You have been inactive for too long.
csrf_token_mismatch_return_link: Go back, to try again
invalid_confirmation_token: This confirmation link has already been used or is invalid.
not_authenticated: You do not have permission to access this page. Try again after logging in.
not_found: The page you requested could not be found.
not_found_return_link: "Return to {forum}"
permission_denied: You do not have permission to access this page.
unknown: An error occurred while trying to load this page.
# Translations in this namespace are displayed by the basic HTML discussion index.
index:
all_discussions_heading: => core.ref.all_discussions
next_page_button: => core.ref.next_page
previous_page_button: => core.ref.previous_page
# Translations in this namespace are displayed by the Log Out confirmation interface.
log_out:
log_out_button: => core.ref.log_out
log_out_confirmation: "Are you sure you want to log out of {forum}?"
title: => core.ref.log_out
# Translations in this namespace are displayed by the Reset Password interface.
reset_password:
confirm_password_label: Confirm New Password
new_password_label: New Password
submit_button: => core.ref.save_changes
title: => core.ref.reset_your_password
# Translations in this namespace are used in messages output by the API.
api:
invalid_username_message: "The username may only contain letters, numbers, and dashes."
# Translations in this namespace are used in emails sent by the forum.
email:
# These translations are used in emails sent when users register new accounts.
activate_account:
subject: Activate Your New Account
body: |
Hey {username}!
Someone (hopefully you!) has signed up to {forum} with this email address.
If this was you, simply click the following link and your account will be activated:
{url}
If you did not sign up, please ignore this email.
# These translations are used in emails sent when users change their email address.
confirm_email:
subject: Confirm Your New Email Address
body: |
Hey {username}!
Someone (hopefully you!) has changed their email address on {forum} to this one.
If this was you, simply click the following link and your email will be confirmed:
{url}
If this was not you, please ignore this email.
# These translations are used in emails sent when users ask to reset their passwords.
reset_password:
subject: => core.ref.reset_your_password
body: |
Hey {username}!
Someone (hopefully you!) has submitted a forgotten password request for your account on {forum}.
If this was you, click the following link to reset your password:
{url}
If you do not wish to change your password, just ignore this email and nothing will happen.
# These translations are used when testing mailing configuration
send_test:
subject: Flarum Email Test
body: |
Hey {username}!
This is a test email to confirm that your Flarum email configuration is working properly.
If this was you, this email means that your configuration works!
If this was not you, please ignore this email.
##
# REUSED TRANSLATIONS - These keys should not be used directly in code!
##
# Translations in this namespace are referenced by two or more unique keys.
ref:
all_discussions: All Discussions
change_email: Change Email
change_password: Change Password
color: Color # Referenced by flarum-tags.yml
confirm_password: Confirm Password
confirmation_email_sent: "We've sent a confirmation email to {email}. If it doesn't arrive soon, check your spam folder."
custom_footer_text: Add HTML to be displayed at the very bottom of the page.
custom_footer_title: Edit Custom Footer
custom_header_text: "Add HTML to be displayed at the very top of the page, above Flarum's own header."
custom_header_title: Edit Custom Header
delete: Delete
delete_forever: Delete Forever
discussions: Discussions # Referenced by flarum-statistics.yml
edit: Edit
email: Email
icon: Icon
icon_text: "Enter the name of any <a>FontAwesome</a> icon class, <em>including</em> the <code>fas fa-</code> prefix."
load_more: Load More
log_in: Log In
log_out: Log Out
mark_all_as_read: Mark All as Read
next_page: Next Page
notifications: Notifications
okay: OK # Referenced by flarum-tags.yml
password: Password
posts: Posts # Referenced by flarum-statistics.yml
previous_page: Previous Page
remove: Remove
rename: Rename
reply: Reply # Referenced by flarum-mentions.yml
reset_your_password: Reset Your Password
restore: Restore
save_changes: Save Changes # Referenced by flarum-suspend.yml, flarum-tags.yml
settings: Settings
sign_up: Sign Up
some_others: "{count} other|{count} others" # Referenced by flarum-likes.yml, flarum-mentions.yml
start_a_discussion: Start a Discussion
username: Username
users: Users # Referenced by flarum-statistics.yml
view: View
write_a_reply: Write a Reply...
you: You # Referenced by flarum-likes.yml, flarum-mentions.yml
##
# GROUP NAMES - These keys are translated at the back end.
##
# Translations in this namespace are used to translate default group names.
group:
admin: Admin
admins: Admins
guest: Guest
guests: Guests
member: Member
members: Members
mod: Mod
mods: Mods

108
locale/validation.yml Normal file
View File

@ -0,0 +1,108 @@
validation:
accepted: "The :attribute must be accepted."
active_url: "The :attribute is not a valid URL."
after: "The :attribute must be a date after :date."
after_or_equal: "The :attribute must be a date after or equal to :date."
alpha: "The :attribute may only contain letters."
alpha_dash: "The :attribute may only contain letters, numbers, dashes and underscores."
alpha_num: "The :attribute may only contain letters and numbers."
array: "The :attribute must be an array."
before: "The :attribute must be a date before :date."
before_or_equal: "The :attribute must be a date before or equal to :date."
between:
numeric: "The :attribute must be between :min and :max."
file: "The :attribute must be between :min and :max kilobytes."
string: "The :attribute must be between :min and :max characters."
array: "The :attribute must have between :min and :max items."
boolean: "The :attribute field must be true or false."
confirmed: "The :attribute confirmation does not match."
date: "The :attribute is not a valid date."
date_equals: "The :attribute must be a date equal to :date."
date_format: "The :attribute does not match the format :format."
different: "The :attribute and :other must be different."
digits: "The :attribute must be :digits digits."
digits_between: "The :attribute must be between :min and :max digits."
dimensions: "The :attribute has invalid image dimensions."
distinct: "The :attribute field has a duplicate value."
email: "The :attribute must be a valid email address."
ends_with: "The :attribute must end with one of the following: :values."
exists: "The selected :attribute is invalid."
file: "The :attribute must be a file."
filled: "The :attribute field must have a value."
gt:
numeric: "The :attribute must be greater than :value."
file: "The :attribute must be greater than :value kilobytes."
string: "The :attribute must be greater than :value characters."
array: "The :attribute must have more than :value items."
gte:
numeric: "The :attribute must be greater than or equal :value."
file: "The :attribute must be greater than or equal :value kilobytes."
string: "The :attribute must be greater than or equal :value characters."
array: "The :attribute must have :value items or more."
image: "The :attribute must be an image."
in: "The selected :attribute is invalid."
in_array: "The :attribute field does not exist in :other."
integer: "The :attribute must be an integer."
ip: "The :attribute must be a valid IP address."
ipv4: "The :attribute must be a valid IPv4 address."
ipv6: "The :attribute must be a valid IPv6 address."
json: "The :attribute must be a valid JSON string."
lt:
numeric: "The :attribute must be less than :value."
file: "The :attribute must be less than :value kilobytes."
string: "The :attribute must be less than :value characters."
array: "The :attribute must have less than :value items."
lte:
numeric: "The :attribute must be less than or equal :value."
file: "The :attribute must be less than or equal :value kilobytes."
string: "The :attribute must be less than or equal :value characters."
array: "The :attribute must not have more than :value items."
max:
numeric: "The :attribute may not be greater than :max."
file: "The :attribute may not be greater than :max kilobytes."
string: "The :attribute may not be greater than :max characters."
array: "The :attribute may not have more than :max items."
mimes: "The :attribute must be a file of type: :values."
mimetypes: "The :attribute must be a file of type: :values."
min:
numeric: "The :attribute must be at least :min."
file: "The :attribute must be at least :min kilobytes."
string: "The :attribute must be at least :min characters."
array: "The :attribute must have at least :min items."
not_in: "The selected :attribute is invalid."
not_regex: "The :attribute format is invalid."
numeric: "The :attribute must be a number."
password: "The password is incorrect."
present: "The :attribute field must be present."
regex: "The :attribute format is invalid."
required: "The :attribute field is required."
required_if: "The :attribute field is required when :other is :value."
required_unless: "The :attribute field is required unless :other is in :values."
required_with: "The :attribute field is required when :values is present."
required_with_all: "The :attribute field is required when :values are present."
required_without: "The :attribute field is required when :values is not present."
required_without_all: "The :attribute field is required when none of :values are present."
same: "The :attribute and :other must match."
size:
numeric: "The :attribute must be :size."
file: "The :attribute must be :size kilobytes."
string: "The :attribute must be :size characters."
array: "The :attribute must contain :size items."
starts_with: "The :attribute must start with one of the following: :values."
string: "The :attribute must be a string."
timezone: "The :attribute must be a valid zone."
unique: "The :attribute has already been taken."
uploaded: "The :attribute failed to upload."
url: "The :attribute format is invalid."
uuid: "The :attribute must be a valid UUID."
attributes:
username: username
password: password
email: email
title: title
content: content
name_singular: singular name
name_plural: plural name
tag_count_primary: number of primary tags
tag_count_secondary: number of secondary tags

View File

@ -57,6 +57,8 @@ class LocaleServiceProvider extends AbstractServiceProvider
$translator->setFallbackLocales(['en']);
$translator->addLoader('prefixed_yaml', new PrefixedYamlFileLoader());
$translator->addResource('prefixed_yaml', ['file' => __DIR__.'/../../locale/core.yml', 'prefix' => null], 'en');
$translator->addResource('prefixed_yaml', ['file' => __DIR__.'/../../locale/validation.yml', 'prefix' => null], 'en');
return $translator;
});

View File

@ -61,7 +61,7 @@ class CreateTest extends TestCase
[
'status' => '422',
'code' => 'validation_error',
'detail' => 'validation.required',
'detail' => 'The content field is required.',
'source' => ['pointer' => '/data/attributes/content'],
],
],
@ -97,7 +97,7 @@ class CreateTest extends TestCase
[
'status' => '422',
'code' => 'validation_error',
'detail' => 'validation.required',
'detail' => 'The title field is required.',
'source' => ['pointer' => '/data/attributes/title'],
],
],

View File

@ -57,19 +57,19 @@ class CreateTest extends TestCase
[
'status' => '422',
'code' => 'validation_error',
'detail' => 'validation.required',
'detail' => 'The username field is required.',
'source' => ['pointer' => '/data/attributes/username'],
],
[
'status' => '422',
'code' => 'validation_error',
'detail' => 'validation.required',
'detail' => 'The email field is required.',
'source' => ['pointer' => '/data/attributes/email'],
],
[
'status' => '422',
'code' => 'validation_error',
'detail' => 'validation.required',
'detail' => 'The password field is required.',
'source' => ['pointer' => '/data/attributes/password'],
],
],

View File

@ -72,7 +72,7 @@ class EventTest extends TestCase
$group = $this->buildGroup();
$this->assertEquals('core.group.admin', $group->name_singular);
$this->assertEquals('Admin', $group->name_singular);
}
/**
@ -85,7 +85,7 @@ class EventTest extends TestCase
$group = $this->buildGroup();
$this->assertEquals('core.group.admin', $group->name_singular);
$this->assertEquals('Admin', $group->name_singular);
}
/**