[fixed] RTL (Right To Left) flag not set correctly (1 Viewer)

thecode

Portal Member
March 4, 2011
9
6
Home Country
Israel Israel
The "rtl" flag (strings_he.xml <Language name="Hebrew" characters="1524" rtl="true">) is override by the flag set in (strings_en.xml) which is loaded after it)

Code:
2011-03-04 21:27:48.718750 [Info.][MPMain(1)]: Loading selected language: Hebrew
2011-03-04 21:27:48.734375 [Info.][MPMain(1)]:   Loading localized Strings - Path: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\Language Culture: he  Language: Hebrew Prefix: False
2011-03-04 21:27:48.750000 [Info.][MPMain(1)]:     Loading strings file: strings_he.xml
2011-03-04 21:27:49.093750 [Debug][MPMain(1)]:     ExtendedChars = False:False, StringChars = 0
2011-03-04 21:27:49.093750 [Info.][MPMain(1)]:     Loading strings file: strings_en.xml
2011-03-04 21:27:49.109375 [Debug][MPMain(1)]:     ExtendedChars = False:False, StringChars = 0

Attached logs of SVN 27464, but this was also verified on SVN 1.1.6.27622.

I've also monitored this flag with the source code, the flag is read correctly when loading "strings_he.xml", but is set to false again when the "strings_en.xml" file is loaded.

This was also verified by other Hebrew community users.

Temporary solution I've used is to set rtl="true" in the "strings_en.xml" file also.
 

thecode

Portal Member
March 4, 2011
9
6
Home Country
Israel Israel
I assume it is normal, since some strings aren't translated to Hebrew and are loaded from the english file afterwards.
So the "rtl" flag need to be set in the same way, if it is already set to true do not set it back to false when loading the english file.
The section I think loads the english is in LocalisationProvider.cs line 266 (I don't have a VS here, but I remmeber it is this section)

Code:
private void LoadStrings(string directory)
    {
      // Local Language
      LoadStrings(directory, _currentLanguage.Name, false);

      // Parent Language
      if (!_currentLanguage.IsNeutralCulture)
      {
        LoadStrings(directory, _currentLanguage.Parent.Name, false);
      }

      // Default to English
      if (_currentLanguage.Name != "en")
      {
        LoadStrings(directory, "en", true);
      }
    }
 

thecode

Portal Member
March 4, 2011
9
6
Home Country
Israel Israel
Ok, that fixes the problem. :D

BTW: now after muellers described another scrolling bug I noticed it... :)
 

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Not related to this, so I'll close this one. But, since that patch muellers linked to is long time pending, is it possible for any of you to try the patch and test it?
     

    Users who are viewing this thread

    Top Bottom