Welcome, Guest
Username: Password: Remember me

TOPIC: Bug: incorrect label in LocalizeInspector Options

Bug: incorrect label in LocalizeInspector Options 2 weeks 6 days ago #3280

  • bkane
  • bkane's Avatar
  • Offline
  • New Member
  • Posts: 5
  • Karma: 0
I2Loc version: 2.8.9f1 (Asset Store)
Unity version: 2017.4.9f1

In the Localize inspector, the options in the dropdown for "ForceLocalize" and "Allow Localized Parameters" have the labels swapped. The mask is based on ForceLocalize followed by Allow LocalizedParameters, but the labels appear in the reverse order on lines 341-342 of LocalizeInspector.cs

        void OnGUI_Options()
        {
            int mask = 0;
            if (mProp_LocalizeOnAwake.boolValue)          mask |= 1 << 0;
            if (mProp_AlwaysForceLocalize.boolValue)      mask |= 1 << 1;
            if (mProp_AllowLocalizedParameters.boolValue) mask |= 1 << 2;
            if (mProp_SeparateWords.boolValue)            mask |= 1 << 3;
            if (mProp_IgnoreRTL.boolValue)                mask |= 1 << 4;

            EditorGUI.BeginChangeCheck();
            mask = EditorGUILayout.MaskField(new GUIContent("Options"), mask, new []{
                "Localize On Awake",
                "Allow Localized Parameters",
                "Force Localize",
                "Separate Words",
                "Ignore RTL"
            });
            if (EditorGUI.EndChangeCheck())
            {
                mProp_LocalizeOnAwake.boolValue          = (mask & (1 << 0))> 0;
                mProp_AlwaysForceLocalize.boolValue      = (mask & (1 << 1))> 0;
                mProp_AllowLocalizedParameters.boolValue = (mask & (1 << 2))> 0;
                mProp_SeparateWords.boolValue            = (mask & (1 << 3))> 0;
                mProp_IgnoreRTL.boolValue                = (mask & (1 << 4))> 0;
            }
        }

Hope that helps! Let me know if I've goofed :)
- Ben
The administrator has disabled public write access.
Time to create page: 0.502 seconds
Template by JoomlaShine