Skip to content

Commit

Permalink
Version 4.5.0
Browse files Browse the repository at this point in the history
 * CHANGE - Warning! All default directory paths have been changed in new configuration files
 * FEATURE - {Lang} / {lang} parameter can now be used in any path specified in the configuration file. This will allow more clean seperation between translations to different languages without needing to modify/move any files
 * FEATURE - Support ZIP files for translation, resize and texture files
 * MISC - Reduced number of static translations significantly
  • Loading branch information
randoman committed Oct 12, 2019
1 parent 4fd446a commit 07cceb3
Show file tree
Hide file tree
Showing 19 changed files with 470 additions and 8,755 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### 4.5.0
* CHANGE - Warning! All default directory paths have been changed when a new configuration file is generated!
* FEATURE {Lang} / {lang} parameter can now be used in any path specified in the configuration file. This will allow more clean seperation between translations to different languages without needing to modify/move any files.
* CHANGE - Warning! All default directory paths have been changed in new configuration files
* FEATURE - {Lang} / {lang} parameter can now be used in any path specified in the configuration file. This will allow more clean seperation between translations to different languages without needing to modify/move any files
* FEATURE - Support ZIP files for translation, resize and texture files
* MISC - Reduced number of static translations significantly

### 4.4.0
* FEATURE - Allow translation of any found texts. Whether or not text considered to be untranslatable should be output is controlled through configuration
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ The plugin employs the following spam prevention mechanisms:
9. For the supported languages, each translatable line must pass a symbol check that detects if the line includes characters from the source language.
10. It will never attempt a translation for a text that is already considered a translation for something else.
11. All queued translations are kept track of. If two different components that require the same translation and both are queued for translation at the same time, only a single request is sent.
12. It employs an internal dictionary of manual translations (~10000 in total) for commonly used phrases (Japanese-to-English only) to prevent sending out translation requests for these.
12. It employs an internal dictionary of manual translations (~2000 in total) for commonly used phrases (Japanese-to-English only) to prevent sending out translation requests for these.
13. Some endpoints support batching of translations so far fewer requests are sent. This does not increase the total number of translations per session (2).
14. All translation results are cached in memory and stored on disk to prevent making the same translation request twice.
15. Due to its spammy nature, any text that comes from an IMGUI component has any numbers found in it templated away (and substituted back in upon translation) to prevent issues in relation to (6).
Expand All @@ -262,9 +262,9 @@ Language=en ;The language to translate into
FromLanguage=ja ;The original language of the game

[Files]
Directory=Translation ;Directory to search for cached translation files. Can use placeholder: {GameExeName}
OutputFile=Translation\_AutoGeneratedTranslations.{lang}.txt ;File to insert generated translations into. Can use placeholders: {GameExeName}, {lang}
SubstitutionFile=Translation\_Substitutions.{lang}.txt ;File that contains substitution applied before translations. Can use placeholders: {GameExeName}, {lang}
Directory=Translation\{Lang}\Text ;Directory to search for cached translation files. Can use placeholder: {GameExeName}, {Lang}
OutputFile=Translation\{Lang}\Text\_AutoGeneratedTranslations.txt ;File to insert generated translations into. Can use placeholders: {GameExeName}, {Lang}
SubstitutionFile=Translation\{Lang}\Text\_Substitutions.txt ;File that contains substitution applied before translations. Can use placeholders: {GameExeName}, {Lang}

[TextFrameworks]
EnableUGUI=True ;Enable or disable UGUI translation
Expand Down Expand Up @@ -306,7 +306,7 @@ BlacklistedIMGUIPlugins= ;If an IMGUI window assembly/class/method name
OutputUntranslatableText=False ;Indicates if texts that are considered by the plugin to be untranslatable should be output to the specified OutputFile

[Texture]
TextureDirectory=Translation\Texture ;Directory to dump textures to, and root of directories to load images from. Can use placeholder: {GameExeName}
TextureDirectory=Translation\{Lang}\Texture ;Directory to dump textures to, and root of directories to load images from. Can use placeholder: {GameExeName}, {Lang}
EnableTextureTranslation=False ;Indicates whether the plugin will attempt to replace in-game images with those from the TextureDirectory directory
EnableTextureDumping=False ;Indicates whether the plugin will dump texture it is capable of replacing to the TextureDirectory. Has significant performance impact
EnableTextureToggling=False ;Indicates whether or not toggling the translation with the ALT+T hotkey will also affect textures. Not guaranteed to work for all textures. Has significant performance impact
Expand All @@ -319,7 +319,7 @@ DetectDuplicateTextureNames=False;Indicates if the plugin should detect duplicat
EnableLegacyTextureLoading=False ;Indicates the plugin should use a different strategy to load images, that may be relevant if the game engine is old

[ResourceRedirector]
PreferredStoragePath=RedirectedResources ;Indicates the preferred storage for redirected resources in relation to the Auto Translator
PreferredStoragePath=Translation\{Lang}\RedirectedResources ;Indicates the preferred storage for redirected resources in relation to the Auto Translator. Can use placeholder: {GameExeName}, {Lang}
EnableTextAssetRedirector=False ;Indicates if TextAssets should be redirected
LogAllLoadedResources=False ;Indicates if the plugin should log to the console all loaded assets. Useful to determine what can be hooked
EnableDumping=False ;Indicates if translatable resources that are found should be dumped
Expand Down Expand Up @@ -362,7 +362,7 @@ EnableLog=False ;Enables extra logging for debugging purposes

[Migrations]
Enable=True ;Used to enable automatic migrations of this configuration file
Tag=4.0.0 ;Tag representing the last version this plugin was executed under. Do not edit
Tag=4.5.0 ;Tag representing the last version this plugin was executed under. Do not edit
```

### Behaviour Configuration Explanation
Expand Down Expand Up @@ -466,7 +466,7 @@ This may seem like a nice feature to have enabled by default but **never redistr
## Manual Translations
When you use this plugin, you can always go to the file `Translation\_AutoGeneratedTranslations.{lang}.txt` (OutputFile) to edit any auto generated translations and they will show up the next time you run the game. Or you can press (ALT+R) to reload the translation immediately.

It is also worth noting that this plugin will read all text files (*.txt) in the `Translation` (Directory), so if you want to provide a manual translation, you can simply cut out texts from the `Translation\_AutoGeneratedTranslations.{lang}.txt` (OutputFile) and place them in new text files in order to replace them with a manual translation.
It is also worth noting that this plugin will read all text files (*.txt) in the `Translation` (Directory), so if you want to provide a manual translation, you can simply cut out texts from the `Translation\_AutoGeneratedTranslations.{lang}.txt` (OutputFile) and place them in new text files in order to replace them with a manual translation. These text files can also be placed in standard .zip archives.

In this context, the `Translation\_AutoGeneratedTranslations.{lang}.txt` (OutputFile) will always have the lowest priority when reading translations. So if the same translation is present in two places, it will not be the one from the (OutputFile) that is used.

Expand Down
Binary file added libs/I18N.West.dll
Binary file not shown.
Binary file added libs/I18N.dll
Binary file not shown.
Binary file added libs/ICSharpCode.SharpZipLib.dll
Binary file not shown.
Binary file added libs/ICSharpCode.SharpZipLib.dll.bak
Binary file not shown.
2 changes: 1 addition & 1 deletion src/XUnity.AutoTranslator.Patcher/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override string Version
{
get
{
return "4.4.0";
return "4.5.0";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<Version>4.4.0</Version>
<Version>4.5.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<Version>4.4.0</Version>
<Version>4.5.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ public static void Configure()
Language = string.Intern( PluginEnvironment.Current.Preferences.GetOrDefault( "General", "Language", DefaultLanguage ) );
FromLanguage = string.Intern( PluginEnvironment.Current.Preferences.GetOrDefault( "General", "FromLanguage", DefaultFromLanguage ) );

TranslationDirectory = PluginEnvironment.Current.Preferences.GetOrDefault( "Files", "Directory", @"Translation\{Lang}\Strings" );
OutputFile = PluginEnvironment.Current.Preferences.GetOrDefault( "Files", "OutputFile", @"Translation\{Lang}\Strings\_AutoGeneratedTranslations.txt" );
SubstitutionFile = PluginEnvironment.Current.Preferences.GetOrDefault( "Files", "SubstitutionFile", @"Translation\{Lang}\Strings\_Substitutions.txt" );
TranslationDirectory = PluginEnvironment.Current.Preferences.GetOrDefault( "Files", "Directory", @"Translation\{Lang}\Text" );
OutputFile = PluginEnvironment.Current.Preferences.GetOrDefault( "Files", "OutputFile", @"Translation\{Lang}\Text\_AutoGeneratedTranslations.txt" );
SubstitutionFile = PluginEnvironment.Current.Preferences.GetOrDefault( "Files", "SubstitutionFile", @"Translation\{Lang}\Text\_Substitutions.txt" );

EnableIMGUI = PluginEnvironment.Current.Preferences.GetOrDefault( "TextFrameworks", "EnableIMGUI", false );
EnableUGUI = PluginEnvironment.Current.Preferences.GetOrDefault( "TextFrameworks", "EnableUGUI", true );
Expand Down Expand Up @@ -242,7 +242,7 @@ public static void Configure()
AutoTranslationsFilePath = Path.Combine( PluginEnvironment.Current.TranslationPath, OutputFile ).Replace( "/", "\\" ).Parameterize();
SubstitutionFilePath = Path.Combine( PluginEnvironment.Current.TranslationPath, SubstitutionFile ).Replace( "/", "\\" ).Parameterize();

TranslationsPath = Path.Combine( PluginEnvironment.Current.TranslationPath, Settings.TextureDirectory ).Parameterize();
TranslationsPath = Path.Combine( PluginEnvironment.Current.TranslationPath, Settings.TranslationDirectory ).Parameterize();
TexturesPath = Path.Combine( PluginEnvironment.Current.TranslationPath, Settings.TextureDirectory ).Parameterize();

FromLanguageUsesWhitespaceBetweenWords = LanguageHelper.RequiresWhitespaceUponLineMerging( FromLanguage );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public static class PluginData
/// <summary>
/// Gets the version of the plugin.
/// </summary>
public const string Version = "4.4.0";
public const string Version = "4.5.0";
}
}
Loading

0 comments on commit 07cceb3

Please sign in to comment.