Skip to content

Commit

Permalink
Kazakh language added. (#2036)
Browse files Browse the repository at this point in the history
Co-authored-by: Eldar Abdulkhalykov <abdulkhalykov@findexit.kz>
  • Loading branch information
abdulkhalyk and Eldar Abdulkhalykov committed Dec 21, 2022
1 parent e2e2ba4 commit 01bf54b
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/FluentValidation/Resources/LanguageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public class LanguageManager : ILanguageManager {
ItalianLanguage.Culture => ItalianLanguage.GetTranslation(key),
IndonesianLanguage.Culture => IndonesianLanguage.GetTranslation(key),
JapaneseLanguage.Culture => JapaneseLanguage.GetTranslation(key),
KazakhLanguage.Culture => KazakhLanguage.GetTranslation(key),
KoreanLanguage.Culture => KoreanLanguage.GetTranslation(key),
MacedonianLanguage.Culture => MacedonianLanguage.GetTranslation(key),
NorwegianBokmalLanguage.Culture => NorwegianBokmalLanguage.GetTranslation(key),
Expand Down
61 changes: 61 additions & 0 deletions src/FluentValidation/Resources/Languages/KazakhLanguage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#region License

// Copyright (c) .NET Foundation and contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// The latest version of this file can be found at https://github.com/FluentValidation/FluentValidation

#endregion

#pragma warning disable 618

namespace FluentValidation.Resources;

internal class KazakhLanguage {
public const string Culture = "kk";

public static string GetTranslation(string key) => key switch {
"EmailValidator" => "'{PropertyName}' Қате электрондық пошта мекенжайы.",
"GreaterThanOrEqualValidator" => "'{PropertyName}' мән мынадан -'{ComparisonValue}' үлкен немесе оған тең болуы керек.",
"GreaterThanValidator" => "'{PropertyName}' мән мынадан -'{ComparisonValue}' үлкенірек болуы керек.",
"LengthValidator" => "'{PropertyName}' таңбаларының саны {MinLength} және {MaxLength} арасында болуы керек. Енгізілген таңбалар саны: {TotalLength}.",
"MinimumLengthValidator" => "'{PropertyName}' таңбаларының саны мынадан - {MinLength} кем емес болуы керек. Енгізілген таңбалар саны: {TotalLength}.",
"MaximumLengthValidator" => "'{PropertyName}' таңбаларының саны мынадан - {MaxLength} көп емес болуы керек. Енгізілген таңбалар саны: {TotalLength}.",
"LessThanOrEqualValidator" => "'{PropertyName}' мән мынадан -'{ComparisonValue}' кіші немесе оған тең болуы керек.",
"LessThanValidator" => "'{PropertyName}' мән мынадан -'{ComparisonValue}' аз болуы керек.",
"NotEmptyValidator" => "'{PropertyName}' толтырылуы керек.",
"NotEqualValidator" => "'{PropertyName}' '{ComparisonValue}' мәніне тең болмауы керек.",
"NotNullValidator" => "'{PropertyName}' толтырылуы керек.",
"PredicateValidator" => "'{PropertyName}' үшін көрсетілген шарт орындалмады.",
"AsyncPredicateValidator" => "'{PropertyName}' үшін көрсетілген шарт орындалмады.",
"RegularExpressionValidator" => "'{PropertyName}' дұрыс пішімде емес.",
"EqualValidator" => "'{PropertyName}' '{ComparisonValue}' мәніне тең болуы керек.",
"ExactLengthValidator" => "'{PropertyName}' ұзындығы {MaxLength} таңба болуы керек. Енгізілген таңбалар саны: {TotalLength}. ",
"InclusiveBetweenValidator" => "'{PropertyName}' {From} және {To} аралығында болуы керек. Енгізілген мән: {PropertyValue}.",
"ExclusiveBetweenValidator" => "'{PropertyName}' {From} және {To} аралығында болуы керек (осы мәндерді қоспағанда). Енгізілген мән: {PropertyValue}.",
"CreditCardValidator" => "'{PropertyName}' қате карта нөмірі.",
"ScalePrecisionValidator" => "Жалпы алғанда, '{PropertyName}' {ExpectedPrecision} цифрдан аспауы, оның ішінде {ExpectedScale} ондық таңба. Енгізілген мән бүтін бөліктегі {Digits} цифрдан тұрады және {ActualScale} ондық белгі.",
"EmptyValidator" => "'{PropertyName}' бос болуы керек.",
"NullValidator" => "'{PropertyName}' бос болуы керек.",
"EnumValidator" => "'{PropertyName}' жарамсыз мәнді қамтиды '{PropertyValue}'.",
// Additional fallback messages used by clientside validation integration.
"Length_Simple" => "'{PropertyName}' таңбаларының саны {MinLength} және {MaxLength} арасында болуы керек.",
"MinimumLength_Simple" => "'{PropertyName}' таңбаларының саны мынадан - {MinLength} кем емес болуы керек.",
"MaximumLength_Simple" => "'{PropertyName}' таңбаларының саны мынадан - {MaxLength} көп емес болуы керек.",
"ExactLength_Simple" => "'{PropertyName}' ұзындығы {MaxLength} таңба болуы керек.",
"InclusiveBetween_Simple" => "'{PropertyName}' {From} және {To} аралығында болуы керек.",

_ => null,
};
}

0 comments on commit 01bf54b

Please sign in to comment.