Browse Source

some unimportant fixes

Scrublord1336 6 years ago
parent
commit
bcd8edc506

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

@@ -14,7 +14,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
 {
    public class BaiduTranslateEndpoint : KnownEndpoint
    {
-      private static ServicePoint ServicePoint;
       private static readonly string HttpServicePointTemplateUrl = "http://api.fanyi.baidu.com/api/trans/vip/translate?q={0}&from={1}&to={2}&appid={3}&salt={4}&sign={5}";
 
       private static readonly MD5 HashMD5 = MD5.Create();

+ 2 - 2
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 GoogleTranslateLegacy = new GoogleTranslateEndpoint();
+      public static readonly KnownEndpoint GoogleTranslate = new GoogleTranslateEndpoint();
       public static readonly KnownEndpoint GoogleTranslateHack = new GoogleTranslateHackEndpoint();
       public static readonly KnownEndpoint BaiduTranslate = new BaiduTranslateEndpoint();
       public static readonly KnownEndpoint YandexTranslate = new YandexTranslateEndpoint();
@@ -22,7 +22,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
          switch( identifier )
          {
             case KnownEndpointNames.GoogleTranslate:
-               return GoogleTranslateLegacy;
+               return GoogleTranslate;
             case KnownEndpointNames.GoogleTranslateHack:
                return GoogleTranslateHack;
             case KnownEndpointNames.BaiduTranslate:

+ 0 - 2
src/XUnity.AutoTranslator.Plugin.Core/Web/WatsonTranslateEndpoint.cs

@@ -13,8 +13,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
 {
     public class WatsonTranslateEndpoint : KnownEndpoint
     {
-        private static ServicePoint ServicePoint;
-
         private static readonly string HttpsServicePointTemplateUrl = Settings.WatsonAPIUrl.TrimEnd('/')+ "/v2/translate?model_id={0}-{1}&text={2}";
 
         public WatsonTranslateEndpoint()

+ 0 - 2
src/XUnity.AutoTranslator.Plugin.Core/Web/YandexTranslateEndpoint.cs

@@ -13,8 +13,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
 {
     public class YandexTranslateEndpoint : KnownEndpoint
     {
-        private static ServicePoint ServicePoint;
-
         private static readonly string HttpsServicePointTemplateUrl = "https://translate.yandex.net/api/v1.5/tr.json/translate?key={3}&text={2}&lang={0}-{1}&format=plain";
         public YandexTranslateEndpoint()
            : base(KnownEndpointNames.YandexTranslate)