From f288c39373277dec1e05d4321832ceb1cb5b7aba Mon Sep 17 00:00:00 2001 From: merdan Date: Fri, 27 May 2022 17:54:34 +0500 Subject: [PATCH] validation localization --- lang/ru/auth.php | 19 ++ lang/ru/pagination.php | 19 ++ lang/ru/passwords.php | 22 +++ lang/ru/validation.php | 146 ++++++++++++++++ lang/tm/auth.php | 19 ++ lang/tm/pagination.php | 19 ++ lang/tm/passwords.php | 22 +++ lang/tm/validation.php | 146 ++++++++++++++++ .../Http/Requests/CustomerLoginRequest.php | 12 +- .../TPS/Shop/src/Resources/assets/js/app.js | 1 + .../customers/session/login-form.blade.php | 12 +- .../Resources/views/shop/home/index.blade.php | 12 +- resources/lang/en/auth.php | 19 ++ resources/lang/en/pagination.php | 19 ++ resources/lang/en/passwords.php | 22 +++ resources/lang/en/validation.php | 146 ++++++++++++++++ resources/lang/ru/auth.php | 19 ++ resources/lang/ru/pagination.php | 19 ++ resources/lang/ru/passwords.php | 22 +++ resources/lang/ru/validation.php | 139 +++++++++++++++ resources/lang/tm/auth.php | 19 ++ resources/lang/tm/pagination.php | 19 ++ resources/lang/tm/passwords.php | 22 +++ resources/lang/tm/validation.php | 163 ++++++++++++++++++ 24 files changed, 1070 insertions(+), 7 deletions(-) create mode 100644 lang/ru/auth.php create mode 100644 lang/ru/pagination.php create mode 100644 lang/ru/passwords.php create mode 100644 lang/ru/validation.php create mode 100644 lang/tm/auth.php create mode 100644 lang/tm/pagination.php create mode 100644 lang/tm/passwords.php create mode 100644 lang/tm/validation.php create mode 100644 resources/lang/en/auth.php create mode 100644 resources/lang/en/pagination.php create mode 100644 resources/lang/en/passwords.php create mode 100644 resources/lang/en/validation.php create mode 100644 resources/lang/ru/auth.php create mode 100644 resources/lang/ru/pagination.php create mode 100644 resources/lang/ru/passwords.php create mode 100644 resources/lang/ru/validation.php create mode 100644 resources/lang/tm/auth.php create mode 100644 resources/lang/tm/pagination.php create mode 100644 resources/lang/tm/passwords.php create mode 100644 resources/lang/tm/validation.php diff --git a/lang/ru/auth.php b/lang/ru/auth.php new file mode 100644 index 000000000..e5506df29 --- /dev/null +++ b/lang/ru/auth.php @@ -0,0 +1,19 @@ + 'These credentials do not match our records.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/lang/ru/pagination.php b/lang/ru/pagination.php new file mode 100644 index 000000000..d48141187 --- /dev/null +++ b/lang/ru/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/lang/ru/passwords.php b/lang/ru/passwords.php new file mode 100644 index 000000000..e5544d201 --- /dev/null +++ b/lang/ru/passwords.php @@ -0,0 +1,22 @@ + 'Passwords must be at least six characters and match the confirmation.', + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", + +]; diff --git a/lang/ru/validation.php b/lang/ru/validation.php new file mode 100644 index 000000000..b163c4240 --- /dev/null +++ b/lang/ru/validation.php @@ -0,0 +1,146 @@ + '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_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.', + '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.', + '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 is 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.', + ], + '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.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/lang/tm/auth.php b/lang/tm/auth.php new file mode 100644 index 000000000..e5506df29 --- /dev/null +++ b/lang/tm/auth.php @@ -0,0 +1,19 @@ + 'These credentials do not match our records.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/lang/tm/pagination.php b/lang/tm/pagination.php new file mode 100644 index 000000000..d48141187 --- /dev/null +++ b/lang/tm/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/lang/tm/passwords.php b/lang/tm/passwords.php new file mode 100644 index 000000000..e5544d201 --- /dev/null +++ b/lang/tm/passwords.php @@ -0,0 +1,22 @@ + 'Passwords must be at least six characters and match the confirmation.', + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", + +]; diff --git a/lang/tm/validation.php b/lang/tm/validation.php new file mode 100644 index 000000000..b163c4240 --- /dev/null +++ b/lang/tm/validation.php @@ -0,0 +1,146 @@ + '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_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.', + '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.', + '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 is 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.', + ], + '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.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/packages/TPS/Shop/src/Http/Requests/CustomerLoginRequest.php b/packages/TPS/Shop/src/Http/Requests/CustomerLoginRequest.php index 09de4d59d..84e07c2ee 100644 --- a/packages/TPS/Shop/src/Http/Requests/CustomerLoginRequest.php +++ b/packages/TPS/Shop/src/Http/Requests/CustomerLoginRequest.php @@ -13,10 +13,18 @@ class CustomerLoginRequest extends FormRequest * @var array */ private $rules = [ - 'phone' => 'required|numeric|digits:8', - 'password' => 'required', + 'phone' => 'required|numeric|digits:10', + 'password' => 'required|min:8', ]; +// private $messages = [ +// 'phone.required' => 'pr', +// 'phone.numeric' => 'pn', +// 'phone.digits' => 'pd', +// 'password.required' => 'pwdrex', +// 'password.min' => 'pwdmin', +// ]; + /** * Determine if the user is authorized to make this request. * diff --git a/packages/TPS/Shop/src/Resources/assets/js/app.js b/packages/TPS/Shop/src/Resources/assets/js/app.js index c52a75694..da5329b0c 100644 --- a/packages/TPS/Shop/src/Resources/assets/js/app.js +++ b/packages/TPS/Shop/src/Resources/assets/js/app.js @@ -28,6 +28,7 @@ Vue.use(VeeValidate, { Vue.prototype.$http = axios + window.eventBus = new Vue(); // Vue.component('image-slider', ImageSlider); diff --git a/packages/TPS/Shop/src/Resources/views/shop/customers/session/login-form.blade.php b/packages/TPS/Shop/src/Resources/views/shop/customers/session/login-form.blade.php index 0c9d050d4..78de51da5 100644 --- a/packages/TPS/Shop/src/Resources/views/shop/customers/session/login-form.blade.php +++ b/packages/TPS/Shop/src/Resources/views/shop/customers/session/login-form.blade.php @@ -88,12 +88,20 @@ }) .catch(function(error) { self.error_message = error.response.data.message; - + // self.$setErrorsFromResponse(error.response.data); self.disable_button = false; + let errorFields = Object.keys(error.response.data.errors); + errorFields.map(field => { + let errorString = error.response.data.errors[field].join(', '); + self.$validator.errors.add({ + field:field, + msg: errorString, + scope:scope + }); + }); }); } else { self.disable_button = false; - eventBus.$emit('onFormError') } }); diff --git a/packages/TPS/Shop/src/Resources/views/shop/home/index.blade.php b/packages/TPS/Shop/src/Resources/views/shop/home/index.blade.php index b7e55cb58..ffa669340 100644 --- a/packages/TPS/Shop/src/Resources/views/shop/home/index.blade.php +++ b/packages/TPS/Shop/src/Resources/views/shop/home/index.blade.php @@ -44,7 +44,9 @@
- @include('shop::home.slider', ['sliderData' => $bannerData->where('type','slider')->toArray()??null]) + @if(isset($bannerData)) + @include('shop::home.slider', ['sliderData' => $bannerData->where('type','slider')->toArray()]) + @endif @include('shop::home.weekly-offers')
@@ -54,9 +56,13 @@ {{-- {!! DbView::make($channel)->field('home_page_content')->with(['sliderData' => $sliderData])->render() !!}--}} {{-- @else--}} @include('shop::home.new-products') - @include('shop::home.banner',['banner'=>$bannerData->where('type','banner')->first()??null]) + @if(isset($bannerData)) + @include('shop::home.banner',['banner'=>$bannerData->where('type','banner')->first()]) + @endif @include('shop::home.discount-products') - @include('shop::home.banner',['banner'=>$bannerData->where('type','banner')->last()??null]) + @if(isset($bannerData)) + @include('shop::home.banner',['banner'=>$bannerData->where('type','banner')->last()]) + @endif @include('shop::home.featured-products') {{-- @endif--}} diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php new file mode 100644 index 000000000..e5506df29 --- /dev/null +++ b/resources/lang/en/auth.php @@ -0,0 +1,19 @@ + 'These credentials do not match our records.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php new file mode 100644 index 000000000..d48141187 --- /dev/null +++ b/resources/lang/en/pagination.php @@ -0,0 +1,19 @@ + '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php new file mode 100644 index 000000000..e5544d201 --- /dev/null +++ b/resources/lang/en/passwords.php @@ -0,0 +1,22 @@ + 'Passwords must be at least six characters and match the confirmation.', + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", + +]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php new file mode 100644 index 000000000..b163c4240 --- /dev/null +++ b/resources/lang/en/validation.php @@ -0,0 +1,146 @@ + '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_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.', + '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.', + '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 is 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.', + ], + '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.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/lang/ru/auth.php b/resources/lang/ru/auth.php new file mode 100644 index 000000000..70bea7454 --- /dev/null +++ b/resources/lang/ru/auth.php @@ -0,0 +1,19 @@ + 'Неверное имя пользователя или пароль.', + 'password' => 'Неверный пароль.', + 'throttle' => 'Слишком много попыток входа. Пожалуйста, попробуйте еще раз через :seconds секунд.', +]; diff --git a/resources/lang/ru/pagination.php b/resources/lang/ru/pagination.php new file mode 100644 index 000000000..ce5aeb242 --- /dev/null +++ b/resources/lang/ru/pagination.php @@ -0,0 +1,19 @@ + 'Вперёд »', + 'previous' => '« Наз' + +]; diff --git a/resources/lang/ru/passwords.php b/resources/lang/ru/passwords.php new file mode 100644 index 000000000..7caacbccb --- /dev/null +++ b/resources/lang/ru/passwords.php @@ -0,0 +1,22 @@ + 'Ваш пароль был сброшен!', + 'sent' => 'Ссылка на сброс пароля была отправлена!', + 'throttled' => 'Пожалуйста, подождите перед повторной попыткой.', + 'token' => 'Ошибочный код сброса пароля.', + 'user' => 'Не удалось найти пользователя с указанным электронным адресом.', + +]; diff --git a/resources/lang/ru/validation.php b/resources/lang/ru/validation.php new file mode 100644 index 000000000..deeb6047d --- /dev/null +++ b/resources/lang/ru/validation.php @@ -0,0 +1,139 @@ + 'Вы должны принять :attribute.', + 'accepted_if' => 'Вы должны принять :attribute, когда :other соответствует :value.', + 'active_url' => 'Значение поля :attribute не является действительным URL.', + 'after' => 'Значение поля :attribute должно быть датой после :date.', + 'after_or_equal' => 'Значение поля :attribute должно быть датой после или равной :date.', + 'alpha' => 'Значение поля :attribute может содержать только буквы.', + 'alpha_dash' => 'Значение поля :attribute может содержать только буквы, цифры, дефис и нижнее подчеркивание.', + 'alpha_num' => 'Значение поля :attribute может содержать только буквы и цифры.', + 'array' => 'Значение поля :attribute должно быть массивом.', + 'before' => 'Значение поля :attribute должно быть датой до :date.', + 'before_or_equal' => 'Значение поля :attribute должно быть датой до или равной :date.', + 'between' => [ + 'array' => 'Количество элементов в поле :attribute должно быть между :min и :max.', + 'file' => 'Размер файла в поле :attribute должен быть между :min и :max Килобайт(а).', + 'numeric' => 'Значение поля :attribute должно быть между :min и :max.', + 'string' => 'Количество символов в поле :attribute должно быть между :min и :max.', + ], + 'boolean' => 'Значение поля :attribute должно быть логического типа.', + 'confirmed' => 'Значение поля :attribute не совпадает с подтверждаемым.', + 'current_password' => 'Неверный пароль.', + 'date' => 'Значение поля :attribute не является датой.', + 'date_equals' => 'Значение поля :attribute должно быть датой равной :date.', + 'date_format' => 'Значение поля :attribute не соответствует формату даты :format.', + 'declined' => 'Поле :attribute должно быть отклонено.', + 'declined_if' => 'Поле :attribute должно быть отклонено, когда :other равно :value.', + 'different' => 'Значения полей :attribute и :other должны различаться.', + 'digits' => 'Длина значения цифрового поля :attribute должна быть :digits.', + 'digits_between' => 'Длина значения цифрового поля :attribute должна быть между :min и :max.', + 'dimensions' => 'Изображение в поле :attribute имеет недопустимые размеры.', + 'distinct' => 'Значения поля :attribute не должны повторяться.', + 'email' => 'Значение поля :attribute должно быть действительным электронным адресом.', + 'ends_with' => 'Поле :attribute должно заканчиваться одним из следующих значений: :values', + 'enum' => 'Выбранное значение для :attribute некорректно.', + 'exists' => 'Выбранное значение для :attribute некорректно.', + 'file' => 'В поле :attribute должен быть указан файл.', + 'filled' => 'Поле :attribute обязательно для заполнения.', + 'gt' => [ + 'array' => 'Количество элементов в поле :attribute должно быть больше :value.', + 'file' => 'Размер файла в поле :attribute должен быть больше :value Килобайт(а).', + 'numeric' => 'Значение поля :attribute должно быть больше :value.', + 'string' => 'Количество символов в поле :attribute должно быть больше :value.', + ], + 'gte' => [ + 'array' => 'Количество элементов в поле :attribute должно быть :value или больше.', + 'file' => 'Размер файла в поле :attribute должен быть :value Килобайт(а) или больше.', + 'numeric' => 'Значение поля :attribute должно быть :value или больше.', + 'string' => 'Количество символов в поле :attribute должно быть :value или больше.', + ], + 'image' => 'Файл в поле :attribute должен быть изображением.', + 'in' => 'Выбранное значение для :attribute некорректно.', + 'in_array' => 'Значение поля :attribute не существует в :other.', + 'integer' => 'Значение поля :attribute должно быть целым числом.', + 'ip' => 'Значение поля :attribute должно быть действительным IP-адресом.', + 'ipv4' => 'Значение поля :attribute должно быть действительным IPv4-адресом.', + 'ipv6' => 'Значение поля :attribute должно быть действительным IPv6-адресом.', + 'json' => 'Значение поля :attribute должно быть JSON строкой.', + 'lt' => [ + 'array' => 'Количество элементов в поле :attribute должно быть меньше :value.', + 'file' => 'Размер файла в поле :attribute должен быть меньше :value Килобайт(а).', + 'numeric' => 'Значение поля :attribute должно быть меньше :value.', + 'string' => 'Количество символов в поле :attribute должно быть меньше :value.', + ], + 'lte' => [ + 'array' => 'Количество элементов в поле :attribute должно быть :value или меньше.', + 'file' => 'Размер файла в поле :attribute должен быть :value Килобайт(а) или меньше.', + 'numeric' => 'Значение поля :attribute должно быть :value или меньше.', + 'string' => 'Количество символов в поле :attribute должно быть :value или меньше.', + ], + 'mac_address' => 'Значение поля :attribute должно быть корректным MAC-адресом.', + 'max' => [ + 'array' => 'Количество элементов в поле :attribute не может превышать :max.', + 'file' => 'Размер файла в поле :attribute не может быть больше :max Килобайт(а).', + 'numeric' => 'Значение поля :attribute не может быть больше :max.', + 'string' => 'Количество символов в поле :attribute не может превышать :max.', + ], + 'mimes' => 'Файл в поле :attribute должен быть одного из следующих типов: :values.', + 'mimetypes' => 'Файл в поле :attribute должен быть одного из следующих типов: :values.', + 'min' => [ + 'array' => 'Количество элементов в поле :attribute должно быть не меньше :min.', + 'file' => 'Размер файла в поле :attribute должен быть не меньше :min Килобайт(а).', + 'numeric' => 'Значение поля :attribute должно быть не меньше :min.', + 'string' => 'Количество символов в поле :attribute должно быть не меньше :min.', + ], + 'multiple_of' => 'Значение поля :attribute должно быть кратным :value', + 'not_in' => 'Выбранное значение для :attribute некорректно.', + 'not_regex' => 'Значение поля :attribute некорректно.', + 'numeric' => 'Значение поля :attribute должно быть числом.', + 'password' => 'Некорректный пароль.', + 'present' => 'Значение поля :attribute должно присутствовать.', + 'prohibited' => 'Значение поля :attribute запрещено.', + 'prohibited_if' => 'Значение поля :attribute запрещено, когда :other равно :value.', + 'prohibited_unless' => 'Значение поля :attribute запрещено, если :other не состоит в :values.', + 'prohibits' => 'Значение поля :attribute запрещает присутствие :other.', + 'regex' => 'Значение поля :attribute некорректно.', + 'required' => 'Поле :attribute обязательно для заполнения.', + 'required_array_keys' => 'Массив в поле :attribute обязательно должен иметь ключи: :values', + 'required_if' => 'Поле :attribute обязательно для заполнения, когда :other равно :value.', + 'required_unless' => 'Поле :attribute обязательно для заполнения, когда :other не равно :values.', + 'required_with' => 'Поле :attribute обязательно для заполнения, когда :values указано.', + 'required_with_all' => 'Поле :attribute обязательно для заполнения, когда :values указано.', + 'required_without' => 'Поле :attribute обязательно для заполнения, когда :values не указано.', + 'required_without_all' => 'Поле :attribute обязательно для заполнения, когда ни одно из :values не указано.', + 'same' => 'Значения полей :attribute и :other должны совпадать.', + 'size' => [ + 'array' => 'Количество элементов в поле :attribute должно быть равным :size.', + 'file' => 'Размер файла в поле :attribute должен быть равен :size Килобайт(а).', + 'numeric' => 'Значение поля :attribute должно быть равным :size.', + 'string' => 'Количество символов в поле :attribute должно быть равным :size.', + ], + 'starts_with' => 'Поле :attribute должно начинаться с одного из следующих значений: :values', + 'string' => 'Значение поля :attribute должно быть строкой.', + 'timezone' => 'Значение поля :attribute должно быть действительным часовым поясом.', + 'unique' => 'Такое значение поля :attribute уже существует.', + 'uploaded' => 'Загрузка поля :attribute не удалась.', + 'url' => 'Значение поля :attribute имеет ошибочный формат URL.', + 'uuid' => 'Значение поля :attribute должно быть корректным UUID.', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/lang/tm/auth.php b/resources/lang/tm/auth.php new file mode 100644 index 000000000..e5506df29 --- /dev/null +++ b/resources/lang/tm/auth.php @@ -0,0 +1,19 @@ + 'These credentials do not match our records.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/tm/pagination.php b/resources/lang/tm/pagination.php new file mode 100644 index 000000000..de347a5a3 --- /dev/null +++ b/resources/lang/tm/pagination.php @@ -0,0 +1,19 @@ + 'Indiki »', + 'previous' => '« Öňki', + +]; diff --git a/resources/lang/tm/passwords.php b/resources/lang/tm/passwords.php new file mode 100644 index 000000000..e5544d201 --- /dev/null +++ b/resources/lang/tm/passwords.php @@ -0,0 +1,22 @@ + 'Passwords must be at least six characters and match the confirmation.', + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", + +]; diff --git a/resources/lang/tm/validation.php b/resources/lang/tm/validation.php new file mode 100644 index 000000000..a8c8fee59 --- /dev/null +++ b/resources/lang/tm/validation.php @@ -0,0 +1,163 @@ + ':attribute kabul edilmelidir.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => ':attribute dogry URL bolmalydyr.', + 'after' => ':attribute şundan has köne sene bolmalydyr :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => ':attribute dine harplardan durmalydyr.', + 'alpha_dash' => ':attribute dine harplardan, sanlardan we tirelerden durmalydyr.', + 'alpha_num' => ':attribute dine harplardan we sanlardan durmalydyr.', + 'array' => ':attribute ýygyndy bolmalydyr.', + 'before' => ':attribute şundan has irki sene bolmalydyr :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'array' => ':attribute :min - :max arasynda madda eýe bolmalydyr.', + 'file' => ':attribute :min - :max kilobaýt arasynda bolmalydyr.', + 'numeric' => ':attribute :min - :max arasynda bolmalydyr.', + 'string' => ':attribute :min - :max harplar arasynda bolmalydyr.', + ], + 'boolean' => ':attribute diňe dogry ýada ýalňyş bolmalydyr.', + 'confirmed' => ':attribute tassyklamasy deň däl.', + 'current_password' => 'The password is incorrect.', + 'date' => ':attribute dogry sene bolmalydyr.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => ':attribute :format formatyna deň däl.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => ':attribute bilen :other birbirinden tapawutly bolmalydyr.', + 'digits' => ':attribute :digits san bolmalydyr.', + 'digits_between' => ':attribute :min bilen :max arasynda san bolmalydyr.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => ':attribute formaty ýalňyş.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'Saýlanan :attribute ýalňyş.', + 'file' => 'The :attribute must be a file.', + 'filled' => ':attribute meýdany zerur.', + 'gt' => [ + 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', + 'string' => 'The :attribute must be greater than :value characters.', + ], + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal :value.', + 'string' => 'The :attribute must be greater than or equal :value characters.', + ], + 'image' => ':attribute surat bolmalydyr.', + 'in' => ':attribute mukdary ýalňyş.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => ':attribute san bolmalydyr.', + 'ip' => ':attribute dogry IP adres bolmalydyr.', + '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' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', + 'string' => 'The :attribute must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal :value.', + 'string' => 'The :attribute must be less than or equal :value characters.', + ], + 'mac_address' => 'The :attribute must be a valid MAC address.', + 'max' => [ + 'array' => ':attribute iň az :max maddadan ybarat bolmalydyr.', + 'file' => ':attribute :max kilobaýtdan kiçi bolmalydyr.', + 'numeric' => ':attribute :max den kiçi bolmalydyr.', + 'string' => ':attribute :max harpdan kiçi bolmalydyr.', + ], + 'mimes' => ':attribute faýlň formaty :values bolmalydyr.', + 'mimetypes' => ':attribute faýlň formaty :values bolmalydyr.', + 'min' => [ + 'array' => ':attribute iň az :min harpdan bolmalydyr.', + 'file' => ':attribute mukdary :min kilobaýtdan köp bolmalydyr.', + 'numeric' => ':attribute mukdary :min dan köp bolmalydyr.', + 'string' => ':attribute mukdary :min harpdan köp bolmalydyr.', + ], + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'Saýlanan :attribute geçersiz.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => ':attribute san bolmalydyr.', + 'password' => 'The password is incorrect.', + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => ':attribute formaty ýalňyş.', + 'required' => ':attribute meýdany zerur.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => ':attribute meýdany, :other :value hümmetine eýe bolanynda zerurdyr.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => ':attribute meýdany :values bar bolanda zerurdyr.', + 'required_with_all' => ':attribute meýdany haýsyda bolsa bir :values bar bolanda zerurdyr.', + 'required_without' => ':attribute meýdany :values ýok bolanda zerurdyr.', + 'required_without_all' => ':attribute meýdany :values dan haýsyda bolsa biri ýok bolanda zerurdyr.', + 'same' => ':attribute bilen :other deň bolmalydyr.', + 'size' => [ + 'array' => ':attribute :size madda eýe bolmalydyr.', + 'file' => ':attribute :size kilobaýt bolmalydyr.', + 'numeric' => ':attribute :size sandan ybarat bolmalydyr.', + 'string' => ':attribute :size harp bolmalydyr.', + ], + 'starts_with' => 'The :attribute must start with one of the following: :values.', + 'string' => 'The :attribute must be a string.', + 'timezone' => ':attribute dogry zolak bolmalydyr.', + 'unique' => ':attribute önden hasaba alyndy.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => ':attribute formaty ýalňyş.', + 'uuid' => 'The :attribute must be a valid UUID.', + + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +];