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. --- .../Testing/TestingI18nController.Designer.cs | 72 +++++++++++ .../Controllers/Testing/TestingI18nController.resx | 123 ++++++++++++++++++ .../Testing/TestingI18nController.zh.resx | 123 ++++++++++++++++++ .../Controllers/TokenController.Designer.cs | 45 +++++++ .../Resources/Controllers/TokenController.en.resx | 135 ------------------- .../Resources/Controllers/TokenController.resx | 15 +++ .../Controllers/UserAvatarController.Designer.cs | 72 +++++++++++ .../Controllers/UserAvatarController.en.resx | 144 --------------------- .../Controllers/UserAvatarController.resx | 24 ++++ .../Controllers/UserController.Designer.cs | 54 ++++++++ .../Resources/Controllers/UserController.en.resx | 138 -------------------- Timeline/Resources/Controllers/UserController.resx | 18 +++ 12 files changed, 546 insertions(+), 417 deletions(-) create mode 100644 Timeline/Resources/Controllers/Testing/TestingI18nController.Designer.cs create mode 100644 Timeline/Resources/Controllers/Testing/TestingI18nController.resx create mode 100644 Timeline/Resources/Controllers/Testing/TestingI18nController.zh.resx delete mode 100644 Timeline/Resources/Controllers/TokenController.en.resx delete mode 100644 Timeline/Resources/Controllers/UserAvatarController.en.resx delete mode 100644 Timeline/Resources/Controllers/UserController.en.resx (limited to 'Timeline/Resources/Controllers') diff --git a/Timeline/Resources/Controllers/Testing/TestingI18nController.Designer.cs b/Timeline/Resources/Controllers/Testing/TestingI18nController.Designer.cs new file mode 100644 index 00000000..e015c5fc --- /dev/null +++ b/Timeline/Resources/Controllers/Testing/TestingI18nController.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// 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.Controllers.Testing { + 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 TestingI18nController { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal TestingI18nController() { + } + + /// + /// 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.Controllers.Testing.TestingI18nController", typeof(TestingI18nController).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 English test string.. + /// + internal static string TestString { + get { + return ResourceManager.GetString("TestString", resourceCulture); + } + } + } +} diff --git a/Timeline/Resources/Controllers/Testing/TestingI18nController.resx b/Timeline/Resources/Controllers/Testing/TestingI18nController.resx new file mode 100644 index 00000000..57dfd5b9 --- /dev/null +++ b/Timeline/Resources/Controllers/Testing/TestingI18nController.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + English test string. + + \ No newline at end of file diff --git a/Timeline/Resources/Controllers/Testing/TestingI18nController.zh.resx b/Timeline/Resources/Controllers/Testing/TestingI18nController.zh.resx new file mode 100644 index 00000000..6931cdf6 --- /dev/null +++ b/Timeline/Resources/Controllers/Testing/TestingI18nController.zh.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 中文测试字符串。 + + \ No newline at end of file diff --git a/Timeline/Resources/Controllers/TokenController.Designer.cs b/Timeline/Resources/Controllers/TokenController.Designer.cs index a7c2864b..22e6a8be 100644 --- a/Timeline/Resources/Controllers/TokenController.Designer.cs +++ b/Timeline/Resources/Controllers/TokenController.Designer.cs @@ -60,6 +60,51 @@ namespace Timeline.Resources.Controllers { } } + /// + /// Looks up a localized string similar to Username or password is invalid.. + /// + internal static string ErrorBadCredential { + get { + return ResourceManager.GetString("ErrorBadCredential", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token is of bad format. It might not be created by the server.. + /// + internal static string ErrorVerifyBadFormat { + get { + return ResourceManager.GetString("ErrorVerifyBadFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The token is expired.. + /// + internal static string ErrorVerifyExpire { + get { + return ResourceManager.GetString("ErrorVerifyExpire", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Token has an old version. User might have update some info.. + /// + internal static string ErrorVerifyOldVersion { + get { + return ResourceManager.GetString("ErrorVerifyOldVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User does not exist. Administrator might have deleted this user.. + /// + internal static string ErrorVerifyUserNotExist { + get { + return ResourceManager.GetString("ErrorVerifyUserNotExist", resourceCulture); + } + } + /// /// Looks up a localized string similar to The password is wrong.. /// diff --git a/Timeline/Resources/Controllers/TokenController.en.resx b/Timeline/Resources/Controllers/TokenController.en.resx deleted file mode 100644 index 4a3d94f9..00000000 --- a/Timeline/Resources/Controllers/TokenController.en.resx +++ /dev/null @@ -1,135 +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 - - - Username or password is invalid. - - - The token is of bad format. It might not be created by the server. - - - The token is expired. - - - Token has an old version. User might have update some info. - - - User does not exist. Administrator might have deleted this user. - - \ No newline at end of file diff --git a/Timeline/Resources/Controllers/TokenController.resx b/Timeline/Resources/Controllers/TokenController.resx index 683d6cc9..42e1ff92 100644 --- a/Timeline/Resources/Controllers/TokenController.resx +++ b/Timeline/Resources/Controllers/TokenController.resx @@ -117,6 +117,21 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Username or password is invalid. + + + The token is of bad format. It might not be created by the server. + + + The token is expired. + + + Token has an old version. User might have update some info. + + + User does not exist. Administrator might have deleted this user. + The password is wrong. diff --git a/Timeline/Resources/Controllers/UserAvatarController.Designer.cs b/Timeline/Resources/Controllers/UserAvatarController.Designer.cs index e6eeb1e8..1dacb19f 100644 --- a/Timeline/Resources/Controllers/UserAvatarController.Designer.cs +++ b/Timeline/Resources/Controllers/UserAvatarController.Designer.cs @@ -60,6 +60,78 @@ namespace Timeline.Resources.Controllers { } } + /// + /// Looks up a localized string similar to Normal user can't delete other's avatar.. + /// + internal static string ErrorDeleteForbid { + get { + return ResourceManager.GetString("ErrorDeleteForbid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User does not exist.. + /// + internal static string ErrorDeleteUserNotExist { + get { + return ResourceManager.GetString("ErrorDeleteUserNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User does not exist.. + /// + internal static string ErrorGetUserNotExist { + get { + return ResourceManager.GetString("ErrorGetUserNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Image is not a square.. + /// + internal static string ErrorPutBadFormatBadSize { + get { + return ResourceManager.GetString("ErrorPutBadFormatBadSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Decoding image failed.. + /// + internal static string ErrorPutBadFormatCantDecode { + get { + return ResourceManager.GetString("ErrorPutBadFormatCantDecode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Image format is not the one in header.. + /// + internal static string ErrorPutBadFormatUnmatchedFormat { + get { + return ResourceManager.GetString("ErrorPutBadFormatUnmatchedFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Normal user can't change other's avatar.. + /// + internal static string ErrorPutForbid { + get { + return ResourceManager.GetString("ErrorPutForbid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User does not exist.. + /// + internal static string ErrorPutUserNotExist { + get { + return ResourceManager.GetString("ErrorPutUserNotExist", resourceCulture); + } + } + /// /// Looks up a localized string similar to Unknown AvatarDataException.ErrorReason value.. /// diff --git a/Timeline/Resources/Controllers/UserAvatarController.en.resx b/Timeline/Resources/Controllers/UserAvatarController.en.resx deleted file mode 100644 index cf92ae6d..00000000 --- a/Timeline/Resources/Controllers/UserAvatarController.en.resx +++ /dev/null @@ -1,144 +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 - - - Normal user can't delete other's avatar. - - - User does not exist. - - - User does not exist. - - - Image is not a square. - - - Decoding image failed. - - - Image format is not the one in header. - - - Normal user can't change other's avatar. - - - User does not exist. - - \ No newline at end of file diff --git a/Timeline/Resources/Controllers/UserAvatarController.resx b/Timeline/Resources/Controllers/UserAvatarController.resx index 58860c83..3f444b04 100644 --- a/Timeline/Resources/Controllers/UserAvatarController.resx +++ b/Timeline/Resources/Controllers/UserAvatarController.resx @@ -117,6 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Normal user can't delete other's avatar. + + + User does not exist. + + + User does not exist. + + + Image is not a square. + + + Decoding image failed. + + + Image format is not the one in header. + + + Normal user can't change other's avatar. + + + User does not exist. + Unknown AvatarDataException.ErrorReason value. diff --git a/Timeline/Resources/Controllers/UserController.Designer.cs b/Timeline/Resources/Controllers/UserController.Designer.cs index df9cab4c..0c9ac0d7 100644 --- a/Timeline/Resources/Controllers/UserController.Designer.cs +++ b/Timeline/Resources/Controllers/UserController.Designer.cs @@ -60,6 +60,60 @@ namespace Timeline.Resources.Controllers { } } + /// + /// Looks up a localized string similar to Old password is wrong.. + /// + internal static string ErrorChangePasswordBadPassword { + get { + return ResourceManager.GetString("ErrorChangePasswordBadPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The new username {0} already exists.. + /// + internal static string ErrorChangeUsernameAlreadyExist { + get { + return ResourceManager.GetString("ErrorChangeUsernameAlreadyExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The old username {0} does not exist.. + /// + internal static string ErrorChangeUsernameNotExist { + get { + return ResourceManager.GetString("ErrorChangeUsernameNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The user does not exist.. + /// + internal static string ErrorGetUserNotExist { + get { + return ResourceManager.GetString("ErrorGetUserNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't patch a user that does not exist.. + /// + internal static string ErrorPatchUserNotExist { + get { + return ResourceManager.GetString("ErrorPatchUserNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username is of bad format.. + /// + internal static string ErrorPutBadUsername { + get { + return ResourceManager.GetString("ErrorPutBadUsername", resourceCulture); + } + } + /// /// Looks up a localized string similar to Attempt to change password with wrong old password failed.. /// diff --git a/Timeline/Resources/Controllers/UserController.en.resx b/Timeline/Resources/Controllers/UserController.en.resx deleted file mode 100644 index 0bd1dfe3..00000000 --- a/Timeline/Resources/Controllers/UserController.en.resx +++ /dev/null @@ -1,138 +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 - - - Old password is wrong. - - - The new username {0} already exists. - - - The old username {0} does not exist. - - - The user does not exist. - - - Can't patch a user that does not exist. - - - Username is of bad format. - - \ No newline at end of file diff --git a/Timeline/Resources/Controllers/UserController.resx b/Timeline/Resources/Controllers/UserController.resx index d720d1c1..50aa13d6 100644 --- a/Timeline/Resources/Controllers/UserController.resx +++ b/Timeline/Resources/Controllers/UserController.resx @@ -117,6 +117,24 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Old password is wrong. + + + The new username {0} already exists. + + + The old username {0} does not exist. + + + The user does not exist. + + + Can't patch a user that does not exist. + + + Username is of bad format. + Attempt to change password with wrong old password failed. -- cgit v1.2.3