Skip to content

Commit

Permalink
Merge pull request #17 from VRLabs/FixLocalizationBug
Browse files Browse the repository at this point in the history
Fixed some bugs with the localization
  • Loading branch information
Cibbi committed Aug 25, 2021
2 parents 0a139fd + 8fb2d5c commit 38899c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Editor/Localization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace VRLabs.SimpleShaderInspectors
/// <summary>
/// Static helper class used for managing localizations.
/// </summary>
internal static class Localization
public static class Localization
{
/// <summary>
/// Apply Localization strings to a list of controls.
Expand Down Expand Up @@ -93,7 +93,7 @@ private static IEnumerable<PropertyInfo> SetPropertiesLocalization(IEnumerable<S
}
}

internal static class LocalizationSearchers
public static class LocalizationSearchers
{
public static PropertyInfo FindPropertyByName(this IEnumerable<PropertyInfo> properties, string name)
{
Expand All @@ -120,19 +120,19 @@ public static string FindPropertyByName(this (string, string)[] properties, stri
}

[Serializable]
internal class PropertyInfo
public class PropertyInfo
{
public string Name;
public string DisplayName;
public string Tooltip;
}
[Serializable]
internal class LocalizationFile
public class LocalizationFile
{
public PropertyInfo[] Properties;
}
[Serializable]
internal class SettingsFile
public class SettingsFile
{
public string SelectedLanguage;
}
Expand Down
2 changes: 1 addition & 1 deletion Editor/SimpleShaderInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private void LoadLocalizations()

_path = $"{Path.GetDirectoryName(_path)}/Localization/{CustomLocalizationShaderName}";

if (Directory.Exists(_path))
if (!Directory.Exists(_path))
Directory.CreateDirectory(_path);
}

Expand Down

0 comments on commit 38899c5

Please sign in to comment.