Parcourir la source

renamed RomajiPostProcessing to TextPostProcessing

randoman il y a 6 ans
Parent
commit
4a155a2b75

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

@@ -2214,7 +2214,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
                {
                   translatedText = job.Key.RepairTemplate( translatedText );
 
-                  if( Settings.Language == Settings.Romaji && Settings.RomajiPostProcessing != RomajiPostProcessing.None )
+                  if( Settings.Language == Settings.Romaji && Settings.RomajiPostProcessing != TextPostProcessing.None )
                   {
                      translatedText = RomanizationHelper.PostProcess( translatedText, Settings.RomajiPostProcessing );
                   }
@@ -2288,7 +2288,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
          {
             translatedText = job.Key.RepairTemplate( translatedText );
 
-            if( Settings.Language == Settings.Romaji && Settings.RomajiPostProcessing != RomajiPostProcessing.None )
+            if( Settings.Language == Settings.Romaji && Settings.RomajiPostProcessing != TextPostProcessing.None )
             {
                translatedText = RomanizationHelper.PostProcess( translatedText, Settings.RomajiPostProcessing );
             }

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

@@ -79,7 +79,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Configuration
       public static string[] IgnoreTextStartingWith;
       public static HashSet<string> GameLogTextPaths;
       public static bool TextGetterCompatibilityMode;
-      public static RomajiPostProcessing RomajiPostProcessing;
+      public static TextPostProcessing RomajiPostProcessing;
 
       public static string TextureDirectory;
       public static bool EnableTextureTranslation;
@@ -150,7 +150,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Configuration
             ?.Split( new[] { ';' }, StringSplitOptions.RemoveEmptyEntries ).ToHashSet() ?? new HashSet<string>();
          GameLogTextPaths.RemoveWhere( x => !x.StartsWith( "/" ) ); // clean up to ensure no 'empty' entries
          WhitespaceRemovalStrategy = PluginEnvironment.Current.Preferences.GetOrDefault( "Behaviour", "WhitespaceRemovalStrategy", WhitespaceHandlingStrategy.TrimPerNewline );
-         RomajiPostProcessing = PluginEnvironment.Current.Preferences.GetOrDefault( "Behaviour", "RomajiPostProcessing", RomajiPostProcessing.ReplaceMacronWithCircumflex | RomajiPostProcessing.RemoveApostrophes );
+         RomajiPostProcessing = PluginEnvironment.Current.Preferences.GetOrDefault( "Behaviour", "RomajiPostProcessing", TextPostProcessing.ReplaceMacronWithCircumflex | TextPostProcessing.RemoveApostrophes );
 
          TextureDirectory = PluginEnvironment.Current.Preferences.GetOrDefault( "Texture", "TextureDirectory", @"Translation\Texture" );
          EnableTextureTranslation = PluginEnvironment.Current.Preferences.GetOrDefault( "Texture", "EnableTextureTranslation", false );

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/RomajiPostProcessing.cs → src/XUnity.AutoTranslator.Plugin.Core/TextPostProcessing.cs

@@ -6,7 +6,7 @@ using System.Text;
 namespace XUnity.AutoTranslator.Plugin.Core
 {
    [Flags]
-   internal enum RomajiPostProcessing
+   internal enum TextPostProcessing
    {
       None                         = 0,
       ReplaceMacronWithCircumflex  = 1 << 0,

+ 4 - 4
src/XUnity.AutoTranslator.Plugin.Core/Utilities/RomanizationHelper.cs

@@ -12,17 +12,17 @@ namespace XUnity.AutoTranslator.Plugin.Core.Utilities
    /// </summary>
    internal static class RomanizationHelper
    {
-      public static string PostProcess( string text, RomajiPostProcessing postProcessing )
+      public static string PostProcess( string text, TextPostProcessing postProcessing )
       {
-         if( ( postProcessing & RomajiPostProcessing.ReplaceMacronWithCircumflex ) != 0 )
+         if( ( postProcessing & TextPostProcessing.ReplaceMacronWithCircumflex ) != 0 )
          {
             text = ConvertMacronToCircumflex( text );
          }
-         if( ( postProcessing & RomajiPostProcessing.RemoveAllDiacritics ) != 0 )
+         if( ( postProcessing & TextPostProcessing.RemoveAllDiacritics ) != 0 )
          {
             text = RemoveAllDiacritics( text );
          }
-         if( ( postProcessing & RomajiPostProcessing.ReplaceMacronWithCircumflex ) != 0 )
+         if( ( postProcessing & TextPostProcessing.ReplaceMacronWithCircumflex ) != 0 )
          {
             text = RemoveNApostrophe( text );
          }