فهرست منبع

project config fixes

randoman 6 سال پیش
والد
کامیت
1090a4fc1a
20فایلهای تغییر یافته به همراه97 افزوده شده و 59 حذف شده
  1. 33 8
      README.md
  2. 18 18
      XUnity.AutoTranslator.sln
  3. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.BaiduTranslate/XUnity.AutoTranslator.Plugin.BaiduTranslate.csproj
  4. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.BingTranslate/XUnity.AutoTranslator.Plugin.BingTranslate.csproj
  5. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.BingTranslateLegitimate/XUnity.AutoTranslator.Plugin.BingTranslateLegitimate.csproj
  6. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.CustomTranslate/XUnity.AutoTranslator.Plugin.CustomTranslate.csproj
  7. 5 4
      src/Translators/XUnity.AutoTranslator.Plugin.DummyTranslator/ReverseTranslator.cs
  8. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.DummyTranslator/XUnity.AutoTranslator.Plugin.DummyTranslator.csproj
  9. 4 4
      src/Translators/XUnity.AutoTranslator.Plugin.GoogleTranslate/XUnity.AutoTranslator.Plugin.GoogleTranslate.csproj
  10. 3 2
      src/Translators/XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate/XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate.csproj
  11. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.Lec/XUnity.AutoTranslator.Plugin.Lec.csproj
  12. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.LecPowerTranslator15/XUnity.AutoTranslator.Plugin.LecPowerTranslator15.csproj
  13. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.WatsonTranslate/XUnity.AutoTranslator.Plugin.WatsonTranslate.csproj
  14. 1 0
      src/Translators/XUnity.AutoTranslator.Plugin.YandexTranslate/XUnity.AutoTranslator.Plugin.YandexTranslate.csproj
  15. 2 1
      src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs
  16. 1 1
      src/XUnity.AutoTranslator.Plugin.Core/Endpoints/ProcessLineProtocol/LecPowerTranslator15Endpoint.cs
  17. 1 0
      src/XUnity.AutoTranslator.Plugin.Core/Endpoints/ProcessLineProtocol/ProcessLineProtocolEndpoint.cs
  18. 1 1
      src/XUnity.AutoTranslator.Plugin.Core/UI/DropdownOptionViewModel.cs
  19. 10 10
      src/XUnity.AutoTranslator.Setup/Program.cs
  20. 10 10
      src/XUnity.AutoTranslator.Setup/Properties/Resources.resx

+ 33 - 8
README.md

@@ -442,39 +442,64 @@ This approach requires version 2.15.0 or later!
 ## Implementing a Translator
 Since version 3.0.0, you can now also implement your own translators.
 
+### Important Notes on Implementing a Translator based on an Online Service
+Whenever you implement a translator based on an online service, it is important to not use it in an abusive way. For example by:
+ * Establishing a large number of connections to it
+ * Performing web scraping instead of using an available API
+
+With that in mind, consider the following:
+ * The `WWW` class in Unity establishes a new TCP connection on each request you make, making it extremely poor at this kind of job. Especially if SSL (https) is involved because it has to do the entire handshake procedure each time.
+ * The `UnityWebRequest` class in Unity does not exist in most games, because they use an old engine, so it is not a good choice either.
+ * The `WebClient` class from .NET is capable of using persistent connections (it does so by default), but has its own problems with SSL. The version of Mono used in most Unity games rejects all certificates by default making all HTTPS connections fail. This, however, can be remedied during the initialization phase of the translator (see examples below). Another shortcoming of this API is the fact that the runtime will never release the TCP connections it has used until the process ends. The API also integrates terribly with Unity because callbacks return on a background thread.
+
+None of these are therefore an ideal solution.
+
+To remedy this, I have made a class `XUnityWebClient`, which is based on Mono's version of WebClient. However, it adds the following features:
+ * Enables integration with Unity by returning result classes that can be 'yielded'.
+ * Properly closes connections that has not been used for 50 seconds.
+
+I recommend using this class, or in case that cannot be used, falling back to the .NET 'WebClient'.
+
+### How-To
 Follow these steps:
  * Start a new project in Visual Studio 2017 or later. (Be a good boy and choose the "Class Library (.NET Standard)" template. After choosing that, edit the generated .csproj file and change the TargetFramework element to 'net35')
- * Add a reference to the XUnity.AutoTranslator.Plugin.Core.dll file.
+ * Add a reference to the XUnity.AutoTranslator.Plugin.Core.dll
+ * Add a reference to UnityEngine.dll
+ * Add a reference to ExIni.dll
  * Create a new class that either:
    * Implements the `ITranslateEndpoint` interface
    * Inherits from the `HttpEndpoint` class
 
-Here's two examples that does either:
+Here's an example that simply reverses the text:
 
 ```C#
-public class DummyTranslator : ITranslateEndpoint
+public class ReverseTranslator : ITranslateEndpoint
 {
-   public string Id => "Dummy";
+   public string Id => "Reverser";
 
-   public string FriendlyName => "Dummy";
+   public string FriendlyName => "Reverser";
 
    public int MaxConcurrency => 50;
 
-   public void Initialize( IConfiguration configuration, ServiceEndpointConfiguration servicePoints )
+   public void Initialize( InitializationContext context )
    {
 
    }
 
    public IEnumerator Translate( string untranslatedText, string from, string to, Action<string> success, Action<string, Exception> failure )
    {
-      success( "Incorrect translation" );
+      success( new string( untranslatedText.Reverse().ToArray() ) );
 
       return null;
    }
 }
 ```
 
-TODO: Example...
+Here's a more real example of one of the existing endpoints based on the HttpEndpoint:
+
+...
+
+As you can see, the `XUnityWebClient` class is not even used. We simply return a request object that the `HttpEndpoint` will use internally to perform the request.
 
 After implementing the class, simply build the project and place the generated DLL file in the "Translators" directory (you may have to create it) of the plugin folder. That's it.
 

+ 18 - 18
XUnity.AutoTranslator.sln

@@ -14,8 +14,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugi
 		{5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0} = {5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0}
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB} = {DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}
 		{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5} = {A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5}
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA} = {151F7489-AB89-482D-9128-4D65F2D7B8EA}
 		{AE28F88E-E877-456B-98AB-BD03A59A3E44} = {AE28F88E-E877-456B-98AB-BD03A59A3E44}
+		{41B612A5-2974-4988-A82E-84EEF2212A61} = {41B612A5-2974-4988-A82E-84EEF2212A61}
 		{F49BA6D1-FAFB-414C-97B1-28B77FC21286} = {F49BA6D1-FAFB-414C-97B1-28B77FC21286}
 		{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC} = {CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC}
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076} = {AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}
@@ -28,8 +28,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugi
 		{5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0} = {5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0}
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB} = {DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}
 		{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5} = {A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5}
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA} = {151F7489-AB89-482D-9128-4D65F2D7B8EA}
 		{AE28F88E-E877-456B-98AB-BD03A59A3E44} = {AE28F88E-E877-456B-98AB-BD03A59A3E44}
+		{41B612A5-2974-4988-A82E-84EEF2212A61} = {41B612A5-2974-4988-A82E-84EEF2212A61}
 		{F49BA6D1-FAFB-414C-97B1-28B77FC21286} = {F49BA6D1-FAFB-414C-97B1-28B77FC21286}
 		{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC} = {CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC}
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076} = {AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}
@@ -46,8 +46,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Setup
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB} = {DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}
 		{0A2A6B66-91D4-4A4E-AC77-80C6DD748FCD} = {0A2A6B66-91D4-4A4E-AC77-80C6DD748FCD}
 		{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5} = {A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5}
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA} = {151F7489-AB89-482D-9128-4D65F2D7B8EA}
 		{AE28F88E-E877-456B-98AB-BD03A59A3E44} = {AE28F88E-E877-456B-98AB-BD03A59A3E44}
+		{41B612A5-2974-4988-A82E-84EEF2212A61} = {41B612A5-2974-4988-A82E-84EEF2212A61}
 		{F49BA6D1-FAFB-414C-97B1-28B77FC21286} = {F49BA6D1-FAFB-414C-97B1-28B77FC21286}
 		{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC} = {CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC}
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076} = {AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}
@@ -60,8 +60,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugi
 		{5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0} = {5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0}
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB} = {DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}
 		{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5} = {A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5}
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA} = {151F7489-AB89-482D-9128-4D65F2D7B8EA}
 		{AE28F88E-E877-456B-98AB-BD03A59A3E44} = {AE28F88E-E877-456B-98AB-BD03A59A3E44}
+		{41B612A5-2974-4988-A82E-84EEF2212A61} = {41B612A5-2974-4988-A82E-84EEF2212A61}
 		{F49BA6D1-FAFB-414C-97B1-28B77FC21286} = {F49BA6D1-FAFB-414C-97B1-28B77FC21286}
 		{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC} = {CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC}
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076} = {AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}
@@ -78,24 +78,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugi
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.GoogleTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslate\XUnity.AutoTranslator.Plugin.GoogleTranslate.csproj", "{5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.BingTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.BingTranslate\XUnity.AutoTranslator.Plugin.BingTranslate.csproj", "{95C83913-8D7F-4FA1-877E-288251A2A461}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.BingTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.BingTranslate\XUnity.AutoTranslator.Plugin.BingTranslate.csproj", "{95C83913-8D7F-4FA1-877E-288251A2A461}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate", "src\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate.csproj", "{151F7489-AB89-482D-9128-4D65F2D7B8EA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.BaiduTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.BaiduTranslate\XUnity.AutoTranslator.Plugin.BaiduTranslate.csproj", "{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.BaiduTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.BaiduTranslate\XUnity.AutoTranslator.Plugin.BaiduTranslate.csproj", "{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.BingTranslateLegitimate", "src\Translators\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate.csproj", "{F49BA6D1-FAFB-414C-97B1-28B77FC21286}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.BingTranslateLegitimate", "src\Translators\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate.csproj", "{F49BA6D1-FAFB-414C-97B1-28B77FC21286}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.CustomTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.CustomTranslate\XUnity.AutoTranslator.Plugin.CustomTranslate.csproj", "{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.CustomTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.CustomTranslate\XUnity.AutoTranslator.Plugin.CustomTranslate.csproj", "{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.YandexTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.YandexTranslate\XUnity.AutoTranslator.Plugin.YandexTranslate.csproj", "{42DEC139-7E8E-4E2E-9BC9-0B5661F444C5}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.YandexTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.YandexTranslate\XUnity.AutoTranslator.Plugin.YandexTranslate.csproj", "{42DEC139-7E8E-4E2E-9BC9-0B5661F444C5}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.WatsonTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.WatsonTranslate\XUnity.AutoTranslator.Plugin.WatsonTranslate.csproj", "{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.WatsonTranslate", "src\Translators\XUnity.AutoTranslator.Plugin.WatsonTranslate\XUnity.AutoTranslator.Plugin.WatsonTranslate.csproj", "{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.LecPowerTranslator15", "src\Translators\XUnity.AutoTranslator.Plugin.LecPowerTranslator15\XUnity.AutoTranslator.Plugin.LecPowerTranslator15.csproj", "{AE28F88E-E877-456B-98AB-BD03A59A3E44}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.LecPowerTranslator15", "src\Translators\XUnity.AutoTranslator.Plugin.LecPowerTranslator15\XUnity.AutoTranslator.Plugin.LecPowerTranslator15.csproj", "{AE28F88E-E877-456B-98AB-BD03A59A3E44}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XUnity.AutoTranslator.Plugin.Lec", "src\Translators\XUnity.AutoTranslator.Plugin.Lec\XUnity.AutoTranslator.Plugin.Lec.csproj", "{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate", "src\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate.csproj", "{41B612A5-2974-4988-A82E-84EEF2212A61}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -138,10 +138,6 @@ Global
 		{95C83913-8D7F-4FA1-877E-288251A2A461}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{95C83913-8D7F-4FA1-877E-288251A2A461}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{95C83913-8D7F-4FA1-877E-288251A2A461}.Release|Any CPU.Build.0 = Release|Any CPU
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA}.Release|Any CPU.Build.0 = Release|Any CPU
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -170,6 +166,10 @@ Global
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}.Release|Any CPU.ActiveCfg = Release|x86
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076}.Release|Any CPU.Build.0 = Release|x86
+		{41B612A5-2974-4988-A82E-84EEF2212A61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{41B612A5-2974-4988-A82E-84EEF2212A61}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{41B612A5-2974-4988-A82E-84EEF2212A61}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{41B612A5-2974-4988-A82E-84EEF2212A61}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -185,7 +185,6 @@ Global
 		{7493BA4A-C688-4103-B161-7E578FBB6C0E} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{5D9A4F4D-D2D2-4D2B-A58A-F7529DDAF1D0} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{95C83913-8D7F-4FA1-877E-288251A2A461} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
-		{151F7489-AB89-482D-9128-4D65F2D7B8EA} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{DDE97F5D-E021-45C0-87B6-FAD35BC8BCFB} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{F49BA6D1-FAFB-414C-97B1-28B77FC21286} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{CEA7D2D8-C2CF-4FA3-8184-DD485160CDAC} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
@@ -193,6 +192,7 @@ Global
 		{A74F9486-2BA0-42FF-8BBC-9F07ECFBDCE5} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{AE28F88E-E877-456B-98AB-BD03A59A3E44} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 		{AD0C7EF2-D394-43B5-9CCE-FA8A0A820076} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
+		{41B612A5-2974-4988-A82E-84EEF2212A61} = {7A01BA34-3B96-4910-AC70-462BA59417CB}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {EE803FED-4447-4D19-B3D6-88C56E8DFCCA}

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.BaiduTranslate/XUnity.AutoTranslator.Plugin.BaiduTranslate.csproj

@@ -2,6 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>BaiduTranslate</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.BingTranslate/XUnity.AutoTranslator.Plugin.BingTranslate.csproj

@@ -2,6 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>net35</TargetFramework>
+    <AssemblyName>BingTranslate</AssemblyName>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.BingTranslateLegitimate/XUnity.AutoTranslator.Plugin.BingTranslateLegitimate.csproj

@@ -2,6 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>BingTranslateLegitimate</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.CustomTranslate/XUnity.AutoTranslator.Plugin.CustomTranslate.csproj

@@ -2,6 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>CustomTranslate</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>

+ 5 - 4
src/Translators/XUnity.AutoTranslator.Plugin.DummyTranslator/DummyTranslator.cs → src/Translators/XUnity.AutoTranslator.Plugin.DummyTranslator/ReverseTranslator.cs

@@ -1,16 +1,17 @@
 using System;
 using System.Collections;
+using System.Linq;
 using XUnity.AutoTranslator.Plugin.Core.Configuration;
 using XUnity.AutoTranslator.Plugin.Core.Endpoints;
 using XUnity.AutoTranslator.Plugin.Core.Web;
 
 namespace XUnity.AutoTranslator.Plugin.DummyTranslator
 {
-   public class DummyTranslator : ITranslateEndpoint
+   public class ReverseTranslator : ITranslateEndpoint
    {
-      public string Id => "Dummy";
+      public string Id => "Reverser";
 
-      public string FriendlyName => "Dummy";
+      public string FriendlyName => "Reverser";
 
       public int MaxConcurrency => 50;
 
@@ -21,7 +22,7 @@ namespace XUnity.AutoTranslator.Plugin.DummyTranslator
 
       public IEnumerator Translate( string untranslatedText, string from, string to, Action<string> success, Action<string, Exception> failure )
       {
-         success( "Incorrect translation" );
+         success( new string( untranslatedText.Reverse().ToArray() ) );
 
          return null;
       }

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.DummyTranslator/XUnity.AutoTranslator.Plugin.DummyTranslator.csproj

@@ -2,6 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>net35</TargetFramework>
+    <AssemblyName>DummyTranslator</AssemblyName>
   </PropertyGroup>
 
   <ItemGroup>

+ 4 - 4
src/Translators/XUnity.AutoTranslator.Plugin.GoogleTranslate/XUnity.AutoTranslator.Plugin.GoogleTranslate.csproj

@@ -2,10 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>net35</TargetFramework>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <OutputPath></OutputPath>
+    <AssemblyName>GoogleTranslate</AssemblyName>
   </PropertyGroup>
 
   <ItemGroup>
@@ -17,6 +14,9 @@
   </ItemGroup>
 
   <ItemGroup>
+    <Reference Include="ExIni">
+      <HintPath>..\..\..\libs\ExIni.dll</HintPath>
+    </Reference>
     <Reference Include="UnityEngine">
       <HintPath>..\..\..\libs\UnityEngine.dll</HintPath>
     </Reference>

+ 3 - 2
src/Translators/XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate/XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate.csproj

@@ -2,10 +2,11 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>GoogleTranslateLegitimate</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>
-     <Compile Include="..\..\XUnity.AutoTranslator.Plugin.Core\Endpoints\Http\GoogleTranslateLegitimateEndpoint.cs" Link="GoogleTranslateLegitimateEndpoint.cs" />
+      <Compile Include="..\..\XUnity.AutoTranslator.Plugin.Core\Endpoints\Http\GoogleTranslateLegitimateEndpoint.cs" Link="GoogleTranslateLegitimateEndpoint.cs" />
    </ItemGroup>
 
    <ItemGroup>
@@ -14,7 +15,7 @@
 
    <ItemGroup>
       <Reference Include="ExIni">
-        <HintPath>..\..\..\libs\ExIni.dll</HintPath>
+         <HintPath>..\..\..\libs\ExIni.dll</HintPath>
       </Reference>
       <Reference Include="UnityEngine">
          <HintPath>..\..\..\libs\UnityEngine.dll</HintPath>

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.Lec/XUnity.AutoTranslator.Plugin.Lec.csproj

@@ -4,6 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>net35</TargetFramework>
     <Platforms>AnyCPU;x86</Platforms>
+    <AssemblyName>Lec</AssemblyName>
   </PropertyGroup>
 
    <Target Name="PostBuild" AfterTargets="PostBuildEvent">

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.LecPowerTranslator15/XUnity.AutoTranslator.Plugin.LecPowerTranslator15.csproj

@@ -2,6 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>LecPowerTranslator15</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.WatsonTranslate/XUnity.AutoTranslator.Plugin.WatsonTranslate.csproj

@@ -2,6 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>WatsonTranslate</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>

+ 1 - 0
src/Translators/XUnity.AutoTranslator.Plugin.YandexTranslate/XUnity.AutoTranslator.Plugin.YandexTranslate.csproj

@@ -2,6 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
+      <AssemblyName>YandexTranslate</AssemblyName>
    </PropertyGroup>
 
    <ItemGroup>

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

@@ -171,7 +171,8 @@ namespace XUnity.AutoTranslator.Plugin.Core
             var context = new InitializationContext( Config.Current, _httpSecurity );
 
             _configuredEndpoints = KnownEndpoints.CreateEndpoints( gameObject, context )
-               .OrderBy( x => x.Endpoint.FriendlyName )
+               .OrderBy( x => x.Error != null )
+               .ThenBy( x => x.Endpoint.FriendlyName )
                .ToList();
          }
          catch( Exception e )

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/Endpoints/ProcessLineProtocol/LecPowerTranslator15Endpoint.cs

@@ -23,7 +23,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Endpoints.ProcessLineProtocol
          if( !to.Equals( "en", StringComparison.OrdinalIgnoreCase ) ) throw new Exception( "Only japanese to english is supported." );
 
          var path1 = context.Config.DataPath;
-         var exePath1 = Path.Combine( path1, @"Translators\XUnity.AutoTranslator.Plugin.Lec.exe" );
+         var exePath1 = Path.Combine( path1, @"Translators\Lec.exe" );
          var file1Exists = File.Exists( exePath1 );
          if( !file1Exists )
          {

+ 1 - 0
src/XUnity.AutoTranslator.Plugin.Core/Endpoints/ProcessLineProtocol/ProcessLineProtocolEndpoint.cs

@@ -48,6 +48,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Endpoints.ProcessLineProtocol
                      _process.StartInfo.Arguments = _arguments;
                      _process.EnableRaisingEvents = false;
                      _process.StartInfo.UseShellExecute = false;
+                     _process.StartInfo.CreateNoWindow = true;
                      _process.StartInfo.RedirectStandardInput = true;
                      _process.StartInfo.RedirectStandardOutput = true;
                      _process.StartInfo.RedirectStandardError = true;

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/UI/DropdownOptionViewModel.cs

@@ -35,7 +35,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.UI
       public TranslatorDropdownOptionViewModel( Func<bool> isSelected, ConfiguredEndpoint selection, Action<ConfiguredEndpoint> onSelected ) : base( selection.Endpoint.FriendlyName, isSelected, () => selection.Error == null, selection, onSelected )
       {
          _selected = new GUIContent( selection.Endpoint.FriendlyName, $"<b>CURRENT TRANSLATOR</b>\n{selection.Endpoint.FriendlyName} is the currently selected translator that will be used to perform translations." );
-         _disabled = new GUIContent( selection.Endpoint.FriendlyName, $"<b>CANNOT SELECT TRANSLATOR</b>\n{selection.Endpoint.FriendlyName} cannot be selected because misses vital configuration. {selection.Error?.Message}" );
+         _disabled = new GUIContent( selection.Endpoint.FriendlyName, $"<b>CANNOT SELECT TRANSLATOR</b>\n{selection.Endpoint.FriendlyName} cannot be selected because it must be configured first. {selection.Error?.Message}" );
          _normal = new GUIContent( selection.Endpoint.FriendlyName, $"<b>SELECT TRANSLATOR</b>\n{selection.Endpoint.FriendlyName} will be selected as translator." );
       }
 

+ 10 - 10
src/XUnity.AutoTranslator.Setup/Program.cs

@@ -41,16 +41,16 @@ namespace XUnity.AutoTranslator.Setup
          AddFile( Path.Combine( reiPath, "Mono.Cecil.Rocks.dll" ), Resources.Mono_Cecil_Rocks );
          AddFile( Path.Combine( reiPath, "ReiPatcher.exe" ), Resources.ReiPatcher );
          AddFile( Path.Combine( patchesPath, "XUnity.AutoTranslator.Patcher.dll" ), Resources.XUnity_AutoTranslator_Patcher, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.BaiduTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_BaiduTranslate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.BingTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_BingTranslate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.BingLegitimateTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_BingTranslateLegitimate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.CustomTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_CustomTranslate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.GoogleTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_GoogleTranslate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate.dll" ), Resources.XUnity_AutoTranslator_Plugin_GoogleTranslateLegitimate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.LecPowerTranslator15.dll" ), Resources.XUnity_AutoTranslator_Plugin_LecPowerTranslator15, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.Lec.exe" ), Resources.XUnity_AutoTranslator_Plugin_Lec, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.WatsonTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_WatsonTranslate, true );
-         AddFile( Path.Combine( translatorsPath, "XUnity.AutoTranslator.Plugin.YandexTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_YandexTranslate, true );
+         AddFile( Path.Combine( translatorsPath, "BaiduTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_BaiduTranslate, true );
+         AddFile( Path.Combine( translatorsPath, "BingTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_BingTranslate, true );
+         AddFile( Path.Combine( translatorsPath, "BingLegitimateTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_BingTranslateLegitimate, true );
+         AddFile( Path.Combine( translatorsPath, "CustomTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_CustomTranslate, true );
+         AddFile( Path.Combine( translatorsPath, "GoogleTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_GoogleTranslate, true );
+         AddFile( Path.Combine( translatorsPath, "GoogleTranslateLegitimate.dll" ), Resources.XUnity_AutoTranslator_Plugin_GoogleTranslateLegitimate, true );
+         AddFile( Path.Combine( translatorsPath, "LecPowerTranslator15.dll" ), Resources.XUnity_AutoTranslator_Plugin_LecPowerTranslator15, true );
+         AddFile( Path.Combine( translatorsPath, "Lec.exe" ), Resources.XUnity_AutoTranslator_Plugin_Lec, true );
+         AddFile( Path.Combine( translatorsPath, "WatsonTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_WatsonTranslate, true );
+         AddFile( Path.Combine( translatorsPath, "YandexTranslate.dll" ), Resources.XUnity_AutoTranslator_Plugin_YandexTranslate, true );
 
          foreach( var launcher in launchers )
          {

+ 10 - 10
src/XUnity.AutoTranslator.Setup/Properties/Resources.resx

@@ -143,37 +143,37 @@
       <value>..\..\XUnity.AutoTranslator.Patcher\bin\Release\net35\XUnity.AutoTranslator.Patcher.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_BaiduTranslate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.BaiduTranslate\bin\Release\net35\XUnity.AutoTranslator.Plugin.BaiduTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.BaiduTranslate\bin\Release\net35\BaiduTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_BingTranslate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.BingTranslate\bin\Release\net35\XUnity.AutoTranslator.Plugin.BingTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.BingTranslate\bin\Release\net35\BingTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_BingTranslateLegitimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate\bin\Release\net35\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.BingTranslateLegitimate\bin\Release\net35\BingTranslateLegitimate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_CustomTranslate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.CustomTranslate\bin\Release\net35\XUnity.AutoTranslator.Plugin.CustomTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.CustomTranslate\bin\Release\net35\CustomTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_GoogleTranslate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslate\bin\Release\net35\XUnity.AutoTranslator.Plugin.GoogleTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslate\bin\Release\net35\GoogleTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_GoogleTranslateLegitimate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate\bin\Release\net35\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.GoogleTranslateLegitimate\bin\Release\net35\GoogleTranslateLegitimate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_LecPowerTranslator15" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.LecPowerTranslator15\bin\Release\net35\XUnity.AutoTranslator.Plugin.LecPowerTranslator15.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.LecPowerTranslator15\bin\Release\net35\LecPowerTranslator15.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_WatsonTranslate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.WatsonTranslate\bin\Release\net35\XUnity.AutoTranslator.Plugin.WatsonTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.WatsonTranslate\bin\Release\net35\WatsonTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_YandexTranslate" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.YandexTranslate\bin\Release\net35\XUnity.AutoTranslator.Plugin.YandexTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.YandexTranslate\bin\Release\net35\YandexTranslate.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_Core" type="System.Resources.ResXFileRef, System.Windows.Forms">
       <value>..\..\XUnity.AutoTranslator.Plugin.Core\bin\Release\net35\XUnity.AutoTranslator.Plugin.Core.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="XUnity_AutoTranslator_Plugin_Lec" type="System.Resources.ResXFileRef, System.Windows.Forms">
-      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.Lec\bin\x86\Release\net35\XUnity.AutoTranslator.Plugin.Lec.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+      <value>..\..\Translators\XUnity.AutoTranslator.Plugin.Lec\bin\x86\Release\net35\Lec.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </data>
    <data name="_0Harmony" type="System.Resources.ResXFileRef, System.Windows.Forms">
       <value>..\..\..\libs\0Harmony.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>