Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Khmer langauge resouce. #2155

Merged
merged 1 commit into from Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/FluentValidation/Resources/LanguageManager.cs
Expand Up @@ -67,6 +67,7 @@ public class LanguageManager : ILanguageManager {
IndonesianLanguage.Culture => IndonesianLanguage.GetTranslation(key),
JapaneseLanguage.Culture => JapaneseLanguage.GetTranslation(key),
KazakhLanguage.Culture => KazakhLanguage.GetTranslation(key),
KhmerLanguage.Culture => KhmerLanguage.GetTranslation(key),
KoreanLanguage.Culture => KoreanLanguage.GetTranslation(key),
MacedonianLanguage.Culture => MacedonianLanguage.GetTranslation(key),
NorwegianBokmalLanguage.Culture => NorwegianBokmalLanguage.GetTranslation(key),
Expand Down
60 changes: 60 additions & 0 deletions src/FluentValidation/Resources/Languages/KhmerLanguage.cs
@@ -0,0 +1,60 @@
#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 KhmerLanguage {
public const string Culture = "km";

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,
};
}