From 5790142f81f2a94ad073834b1534acbf9b02ea3c Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Fri, 25 Oct 2019 18:36:02 +0800 Subject: Add NeutralResourcesLanguage. Conform to best practices. --- Timeline/Resources/Models/Http/Common.Designer.cs | 162 +++++++++++++++++++++ Timeline/Resources/Models/Http/Common.en.resx | 153 ------------------- Timeline/Resources/Models/Http/Common.resx | 153 +++++++++++++++++++ Timeline/Resources/Models/Http/Common.zh.resx | 22 +-- .../Validation/UsernameValidator.Designer.cs | 14 +- .../Models/Validation/UsernameValidator.en.resx | 129 ---------------- .../Models/Validation/UsernameValidator.resx | 8 +- .../Models/Validation/UsernameValidator.zh.resx | 6 +- .../Models/Validation/Validator.Designer.cs | 30 ++-- .../Resources/Models/Validation/Validator.en.resx | 129 ---------------- .../Resources/Models/Validation/Validator.resx | 18 +-- 11 files changed, 364 insertions(+), 460 deletions(-) create mode 100644 Timeline/Resources/Models/Http/Common.Designer.cs delete mode 100644 Timeline/Resources/Models/Http/Common.en.resx create mode 100644 Timeline/Resources/Models/Http/Common.resx delete mode 100644 Timeline/Resources/Models/Validation/UsernameValidator.en.resx delete mode 100644 Timeline/Resources/Models/Validation/Validator.en.resx (limited to 'Timeline/Resources/Models') diff --git a/Timeline/Resources/Models/Http/Common.Designer.cs b/Timeline/Resources/Models/Http/Common.Designer.cs new file mode 100644 index 00000000..2df1e447 --- /dev/null +++ b/Timeline/Resources/Models/Http/Common.Designer.cs @@ -0,0 +1,162 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Timeline.Resources.Models.Http { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Common { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Common() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Timeline.Resources.Models.Http.Common", typeof(Common).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Body is too big. It can't be bigger than {0}.. + /// + internal static string MessageContentTooBig { + get { + return ResourceManager.GetString("MessageContentTooBig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Actual body length is bigger than it in header.. + /// + internal static string MessageContentUnmatchedLengthBigger { + get { + return ResourceManager.GetString("MessageContentUnmatchedLengthBigger", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Actual body length is smaller than it in header.. + /// + internal static string MessageContentUnmatchedLengthSmaller { + get { + return ResourceManager.GetString("MessageContentUnmatchedLengthSmaller", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An existent item is deleted.. + /// + internal static string MessageDeleteDelete { + get { + return ResourceManager.GetString("MessageDeleteDelete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The item does not exist, so nothing is changed.. + /// + internal static string MessageDeleteNotExist { + get { + return ResourceManager.GetString("MessageDeleteNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header If-Non-Match is of bad format.. + /// + internal static string MessageHeaderBadIfNonMatch { + get { + return ResourceManager.GetString("MessageHeaderBadIfNonMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header Content-Length is missing or of bad format.. + /// + internal static string MessageHeaderMissingContentLength { + get { + return ResourceManager.GetString("MessageHeaderMissingContentLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header Content-Type is required.. + /// + internal static string MessageHeaderMissingContentType { + get { + return ResourceManager.GetString("MessageHeaderMissingContentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Header Content-Length must not be 0.. + /// + internal static string MessageHeaderZeroContentLength { + get { + return ResourceManager.GetString("MessageHeaderZeroContentLength", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A new item is created.. + /// + internal static string MessagePutCreate { + get { + return ResourceManager.GetString("MessagePutCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An existent item is modified.. + /// + internal static string MessagePutModify { + get { + return ResourceManager.GetString("MessagePutModify", resourceCulture); + } + } + } +} diff --git a/Timeline/Resources/Models/Http/Common.en.resx b/Timeline/Resources/Models/Http/Common.en.resx deleted file mode 100644 index 10407d76..00000000 --- a/Timeline/Resources/Models/Http/Common.en.resx +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Body is too big. It can't be bigger than {0}. - - - Actual body length is bigger than it in header. - - - Actual body length is smaller than it in header. - - - An existent item is deleted. - - - The item does not exist, so nothing is changed. - - - Header If-Non-Match is of bad format. - - - Header Content-Length is missing or of bad format. - - - Header Content-Type is required. - - - Header Content-Length must not be 0. - - - A new item is created. - - - An existent item is modified. - - \ No newline at end of file diff --git a/Timeline/Resources/Models/Http/Common.resx b/Timeline/Resources/Models/Http/Common.resx new file mode 100644 index 00000000..433c341c --- /dev/null +++ b/Timeline/Resources/Models/Http/Common.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Body is too big. It can't be bigger than {0}. + + + Actual body length is bigger than it in header. + + + Actual body length is smaller than it in header. + + + An existent item is deleted. + + + The item does not exist, so nothing is changed. + + + Header If-Non-Match is of bad format. + + + Header Content-Length is missing or of bad format. + + + Header Content-Type is required. + + + Header Content-Length must not be 0. + + + A new item is created. + + + An existent item is modified. + + \ No newline at end of file diff --git a/Timeline/Resources/Models/Http/Common.zh.resx b/Timeline/Resources/Models/Http/Common.zh.resx index 528dc7ab..cbdd6fb9 100644 --- a/Timeline/Resources/Models/Http/Common.zh.resx +++ b/Timeline/Resources/Models/Http/Common.zh.resx @@ -117,37 +117,37 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 请求体太大。它不能超过{0}. - + 实际的请求体长度比头中指示的大。 - + 实际的请求体长度比头中指示的小。 - + 删除了一个项目。 - + 要删除的项目不存在,什么都没有修改。 - + 头If-Non-Match格式不对。 - + 头Content-Length缺失或者格式不对。 - + 缺少必需的头Content-Type。 - + 头Content-Length不能为0。 - + 创建了一个新项目。 - + 修改了一个已存在的项目。 \ No newline at end of file diff --git a/Timeline/Resources/Models/Validation/UsernameValidator.Designer.cs b/Timeline/Resources/Models/Validation/UsernameValidator.Designer.cs index a4c35326..ac925504 100644 --- a/Timeline/Resources/Models/Validation/UsernameValidator.Designer.cs +++ b/Timeline/Resources/Models/Validation/UsernameValidator.Designer.cs @@ -63,27 +63,27 @@ namespace Timeline.Resources.Models.Validation { /// /// Looks up a localized string similar to An empty string is not allowed.. /// - internal static string InvariantValidationMessageEmptyString { + internal static string MessageEmptyString { get { - return ResourceManager.GetString("InvariantValidationMessageEmptyString", resourceCulture); + return ResourceManager.GetString("MessageEmptyString", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid character, only alphabet, digit, underscore and hyphen are allowed. . + /// Looks up a localized string similar to Invalid character, only alphabet, digit, underscore and hyphen are allowed.. /// - internal static string InvariantValidationMessageInvalidChar { + internal static string MessageInvalidChar { get { - return ResourceManager.GetString("InvariantValidationMessageInvalidChar", resourceCulture); + return ResourceManager.GetString("MessageInvalidChar", resourceCulture); } } /// /// Looks up a localized string similar to Too long, more than 26 characters is not premitted.. /// - internal static string InvariantValidationMessageTooLong { + internal static string MessageTooLong { get { - return ResourceManager.GetString("InvariantValidationMessageTooLong", resourceCulture); + return ResourceManager.GetString("MessageTooLong", resourceCulture); } } } diff --git a/Timeline/Resources/Models/Validation/UsernameValidator.en.resx b/Timeline/Resources/Models/Validation/UsernameValidator.en.resx deleted file mode 100644 index 9171b856..00000000 --- a/Timeline/Resources/Models/Validation/UsernameValidator.en.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - An empty string is not allowed. - - - Invalid character, only alphabet, digit, underscore and hyphen are allowed. - - - Too long, more than 26 characters is not premitted. - - \ No newline at end of file diff --git a/Timeline/Resources/Models/Validation/UsernameValidator.resx b/Timeline/Resources/Models/Validation/UsernameValidator.resx index 80cae2d5..08a814d0 100644 --- a/Timeline/Resources/Models/Validation/UsernameValidator.resx +++ b/Timeline/Resources/Models/Validation/UsernameValidator.resx @@ -117,13 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + An empty string is not allowed. - - Invalid character, only alphabet, digit, underscore and hyphen are allowed. + + Invalid character, only alphabet, digit, underscore and hyphen are allowed. - + Too long, more than 26 characters is not premitted. \ No newline at end of file diff --git a/Timeline/Resources/Models/Validation/UsernameValidator.zh.resx b/Timeline/Resources/Models/Validation/UsernameValidator.zh.resx index 1c8a936c..89d519b0 100644 --- a/Timeline/Resources/Models/Validation/UsernameValidator.zh.resx +++ b/Timeline/Resources/Models/Validation/UsernameValidator.zh.resx @@ -117,13 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 空字符串是不允许的。 - + 无效的字符,只能使用字母、数字、下划线和连字符。 - + 太长了,不能大于26个字符。 \ No newline at end of file diff --git a/Timeline/Resources/Models/Validation/Validator.Designer.cs b/Timeline/Resources/Models/Validation/Validator.Designer.cs index 4cbc13de..74d4c169 100644 --- a/Timeline/Resources/Models/Validation/Validator.Designer.cs +++ b/Timeline/Resources/Models/Validation/Validator.Designer.cs @@ -61,47 +61,47 @@ namespace Timeline.Resources.Models.Validation { } /// - /// Looks up a localized string similar to Value is not of type {0}.. + /// Looks up a localized string similar to Failed to create a validator instance from default constructor. See inner exception.. /// - internal static string InvariantValidatorMessageBadType { + internal static string ValidateWithAttributeExceptionCreateFail { get { - return ResourceManager.GetString("InvariantValidatorMessageBadType", resourceCulture); + return ResourceManager.GetString("ValidateWithAttributeExceptionCreateFail", resourceCulture); } } /// - /// Looks up a localized string similar to Value can't be null.. + /// Looks up a localized string similar to Given type is not assignable to IValidator.. /// - internal static string InvariantValidatorMessageNull { + internal static string ValidateWithAttributeExceptionNotValidator { get { - return ResourceManager.GetString("InvariantValidatorMessageNull", resourceCulture); + return ResourceManager.GetString("ValidateWithAttributeExceptionNotValidator", resourceCulture); } } /// - /// Looks up a localized string similar to Validation succeeded.. + /// Looks up a localized string similar to Value is not of type {0}.. /// - internal static string InvariantValidatorMessageSuccess { + internal static string ValidatorMessageBadType { get { - return ResourceManager.GetString("InvariantValidatorMessageSuccess", resourceCulture); + return ResourceManager.GetString("ValidatorMessageBadType", resourceCulture); } } /// - /// Looks up a localized string similar to Failed to create a validator instance from default constructor. See inner exception.. + /// Looks up a localized string similar to Value can't be null.. /// - internal static string ValidateWithAttributeCreateFail { + internal static string ValidatorMessageNull { get { - return ResourceManager.GetString("ValidateWithAttributeCreateFail", resourceCulture); + return ResourceManager.GetString("ValidatorMessageNull", resourceCulture); } } /// - /// Looks up a localized string similar to Given type is not assignable to IValidator.. + /// Looks up a localized string similar to Validation succeeded.. /// - internal static string ValidateWithAttributeNotValidator { + internal static string ValidatorMessageSuccess { get { - return ResourceManager.GetString("ValidateWithAttributeNotValidator", resourceCulture); + return ResourceManager.GetString("ValidatorMessageSuccess", resourceCulture); } } } diff --git a/Timeline/Resources/Models/Validation/Validator.en.resx b/Timeline/Resources/Models/Validation/Validator.en.resx deleted file mode 100644 index 8d2fbede..00000000 --- a/Timeline/Resources/Models/Validation/Validator.en.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Value is not of type {0}. - - - Value can't be null. - - - Validation succeeded. - - \ No newline at end of file diff --git a/Timeline/Resources/Models/Validation/Validator.resx b/Timeline/Resources/Models/Validation/Validator.resx index 0e8f53a6..8317e3eb 100644 --- a/Timeline/Resources/Models/Validation/Validator.resx +++ b/Timeline/Resources/Models/Validation/Validator.resx @@ -117,19 +117,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + Failed to create a validator instance from default constructor. See inner exception. + + + Given type is not assignable to IValidator. + + Value is not of type {0}. - + Value can't be null. - + Validation succeeded. - - Failed to create a validator instance from default constructor. See inner exception. - - - Given type is not assignable to IValidator. - \ No newline at end of file -- cgit v1.2.3