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

Discussion in 'MediaPortal 1.2.0 ALPHA' started by thecode, March 4, 2011.

  1. thecode

    thecode Portal Member

    Joined:
    March 4, 2011
    Messages:
    9
    Likes Received:
    3
    Ratings:
    +4 / 0
    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 (Text):
    1. 2011-03-04 21:27:48.718750 [Info.][MPMain(1)]: Loading selected language: Hebrew
    2. 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
    3. 2011-03-04 21:27:48.750000 [Info.][MPMain(1)]:     Loading strings file: strings_he.xml
    4. 2011-03-04 21:27:49.093750 [Debug][MPMain(1)]:     ExtendedChars = False:False, StringChars = 0
    5. 2011-03-04 21:27:49.093750 [Info.][MPMain(1)]:     Loading strings file: strings_en.xml
    6. 2011-03-04 21:27:49.109375 [Debug][MPMain(1)]:     ExtendedChars = False:False, StringChars = 0
    7.  
    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.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Will take a look. But why are strings_en loaded after strings_he anyhow? Is that normal behavior?
     
  4. thecode

    thecode Portal Member

    Joined:
    March 4, 2011
    Messages:
    9
    Likes Received:
    3
    Ratings:
    +4 / 0
    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 (Text):
    1. private void LoadStrings(string directory)
    2.     {
    3.       // Local Language
    4.       LoadStrings(directory, _currentLanguage.Name, false);
    5.  
    6.       // Parent Language
    7.       if (!_currentLanguage.IsNeutralCulture)
    8.       {
    9.         LoadStrings(directory, _currentLanguage.Parent.Name, false);
    10.       }
    11.  
    12.       // Default to English
    13.       if (_currentLanguage.Name != "en")
    14.       {
    15.         LoadStrings(directory, "en", true);
    16.       }
    17.     }
    18.  
    19.  
     
  5. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Thanks for reporting and explanation. Will fix it over weekend :)
     
  6. muellers

    muellers Portal Member

    Joined:
    July 25, 2010
    Messages:
    12
    Likes Received:
    0
    Ratings:
    +0 / 0
  7. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    I've committed a fix in r27641. Please verify so we can close this ;)

    muellers: Your link is completely off topic, different thing ;)
     
    • Like Like x 1
  8. thecode

    thecode Portal Member

    Joined:
    March 4, 2011
    Messages:
    9
    Likes Received:
    3
    Ratings:
    +4 / 0
    Home Country:
    Israel Israel
    Ok, that fixes the problem. :D

    BTW: now after muellers described another scrolling bug I noticed it... :)
     
  9. SilentException
    • Premium Supporter

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    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?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!