Эх сурвалжийг харах

fixed bug to allow no endpoint

gravydevsupreme 7 жил өмнө
parent
commit
e66c0ce949

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs

@@ -495,7 +495,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
                      // Lets try not to spam a service that might not be there...
                      if( AutoTranslateClient.IsConfigured && _consecutiveErrors < Settings.MaxErrors )
                      {
-                        var job = GetOrCreateTranslationJobFor( text );
+                        GetOrCreateTranslationJobFor( text );
                      }
                      else
                      {

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

@@ -35,7 +35,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Configuration
 
       public static void Configure()
       {
-         ServiceEndpoint = Config.Current.Preferences[ "AutoTranslator" ][ "Endpoint" ].GetOrDefault( KnownEndpointNames.GoogleTranslate );
+         ServiceEndpoint = Config.Current.Preferences[ "AutoTranslator" ][ "Endpoint" ].GetOrDefault( KnownEndpointNames.GoogleTranslate, true );
          Language = Config.Current.Preferences[ "AutoTranslator" ][ "Language" ].GetOrDefault( "en" );
          FromLanguage = Config.Current.Preferences[ "AutoTranslator" ][ "FromLanguage" ].GetOrDefault( "ja", true );
          Delay = Config.Current.Preferences[ "AutoTranslator" ][ "Delay" ].GetOrDefault( 0f );