Browse Source

Renamed GoogleTranslate to GoogleTranslateLegacy

Vimek 6 years ago
parent
commit
0fd29b98ee

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/Configuration/Settings.cs

@@ -69,7 +69,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Configuration
 
 
 
-         ServiceEndpoint = Config.Current.Preferences[ "Service" ][ "Endpoint" ].GetOrDefault( KnownEndpointNames.GoogleTranslate, true );
+         ServiceEndpoint = Config.Current.Preferences[ "Service" ][ "Endpoint" ].GetOrDefault( KnownEndpointNames.GoogleTranslateLegacy, true );
          EnableSSL = Config.Current.Preferences[ "Service" ][ "EnableSSL" ].GetOrDefault( true);
 
          Language = Config.Current.Preferences[ "General" ][ "Language" ].GetOrDefault( "en" );

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/Constants/KnownEndpointNames.cs

@@ -7,7 +7,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Constants
 {
    public static class KnownEndpointNames
    {
-      public const string GoogleTranslate = "GoogleTranslate";
+      public const string GoogleTranslateLegacy = "GoogleTranslateLegacy";
 
       public const string BaiduTranslate = "BaiduTranslate";
    }

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/Web/BaiduTranslateEndpoint.cs

@@ -21,7 +21,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
       private static readonly MD5 HashMD5 = MD5.Create();
 
       public BaiduTranslateEndpoint()
-         : base( KnownEndpointNames.GoogleTranslate )
+         : base( KnownEndpointNames.GoogleTranslateLegacy )
       {
 
       }

+ 3 - 3
src/XUnity.AutoTranslator.Plugin.Core/Web/GoogleTranslateEndpoint.cs → src/XUnity.AutoTranslator.Plugin.Core/Web/GoogleTranslateLegacyEndpoint.cs

@@ -11,15 +11,15 @@ using XUnity.AutoTranslator.Plugin.Core.Extensions;
 
 namespace XUnity.AutoTranslator.Plugin.Core.Web
 {
-   public class GoogleTranslateEndpoint : KnownEndpoint
+   public class GoogleTranslateLegacyEndpoint : KnownEndpoint
    {
       //private static readonly string CertificateIssuer = "CN=Google Internet Authority G3, O=Google Trust Services, C=US";
       private static ServicePoint ServicePoint;
       private static readonly string HttpServicePointTemplateUrl = "http://translate.googleapis.com/translate_a/single?client=gtx&sl={0}&tl={1}&dt=t&q={2}";
       private static readonly string HttpsServicePointTemplateUrl = "https://translate.googleapis.com/translate_a/single?client=gtx&sl={0}&tl={1}&dt=t&q={2}";
 
-      public GoogleTranslateEndpoint()
-         : base( KnownEndpointNames.GoogleTranslate )
+      public GoogleTranslateLegacyEndpoint()
+         : base( KnownEndpointNames.GoogleTranslateLegacy )
       {
 
       }

+ 3 - 3
src/XUnity.AutoTranslator.Plugin.Core/Web/KnownEndpoints.cs

@@ -8,7 +8,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
 {
    public static class KnownEndpoints
    {
-      public static readonly KnownEndpoint GoogleTranslate = new GoogleTranslateEndpoint();
+      public static readonly KnownEndpoint GoogleTranslateLegacy = new GoogleTranslateLegacyEndpoint();
       public static readonly KnownEndpoint BaiduTranslate = new BaiduTranslateEndpoint();
 
       public static KnownEndpoint FindEndpoint( string identifier )
@@ -17,8 +17,8 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
 
          switch( identifier )
          {
-            case KnownEndpointNames.GoogleTranslate:
-               return GoogleTranslate;
+            case KnownEndpointNames.GoogleTranslateLegacy:
+               return GoogleTranslateLegacy;
             case KnownEndpointNames.BaiduTranslate:
                return BaiduTranslate;
             default: