[fixed] Localization issues (1 Viewer)

UNOPARATOR

MP Donator
  • Premium Supporter
  • September 19, 2007
    231
    70
    Istanbul
    Home Country
    Turkey Turkey
    Still not working with Turkish Regional Settings... You should create a "Lessons Learned" section not to repeat the same mistakes again and again.
    Stop using string.ToLower() instead use .ToLowerInvariant() when comparing filenames from within xml files to actual filenames...
     

    UNOPARATOR

    MP Donator
  • Premium Supporter
  • September 19, 2007
    231
    70
    Istanbul
    Home Country
    Turkey Turkey
    @UNOPARATOR
    You are just being harsh, if i understand your correctly. They are very few devs that are working on MP2 and with such posts you are their discouragement... I'm sure you could post your observation in a more nicer way!
    I'm just expressing my frustration and a solution to it not to be repeated: "Lessons Learned" is a crucial part of Project Management.
    Not just ranting about things but providing specifics.
    - I had sent bug reports and finally I had sent a patch for that issue while in MP v0.2.2
    - When MP2 was first announced even (before any alpha or season releases), I contacted Albert and notified him about this providing the links to my previous topics on the forum and other references to the problem
    If there was such a "Lessons Learned" (or something similar - whatever you call it), this shouldn't still be an issue anymore.

    I'm willing to help if anyone wants to contact me...
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Still not working with Turkish Regional Settings... You should create a "Lessons Learned" section not to repeat the same mistakes again and again.
    Stop using string.ToLower() instead use .ToLowerInvariant() when comparing filenames from within xml files to actual filenames...

    Note that this is fixed in MP1. Basically, the MP2 dev team are not necessarily the same people who work on MP1 code, and there has been a significant amount of team turnover in the last year.

    Did you file a bug report when alpha 2 was released?

    Contacting Albert won't help, since he is no longer developing MP2.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @UNOPARATOR
    You are just being harsh, if i understand your correctly. They are very few devs that are working on MP2 and with such posts you are their discouragement... I'm sure you could post your observation in a more nicer way!
    I'm just expressing my frustration and a solution to it not to be repeated: "Lessons Learned" is a crucial part of Project Management.
    Not just ranting about things but providing specifics.
    - I had sent bug reports and finally I had sent a patch for that issue while in MP v0.2.2
    - When MP2 was first announced even (before any alpha or season releases), I contacted Albert and notified him about this providing the links to my previous topics on the forum and other references to the problem
    If there was such a "Lessons Learned" (or something similar - whatever you call it), this shouldn't still be an issue anymore.

    I'm willing to help if anyone wants to contact me...
    I do know about issues with ToLower() vs. ToLowerInvariant() in general. But I don't know to what kind of problems you are referring to in terms of MP2 features.

    I'm ready to change the required things, but I even more prefer to get patches from you. So please start a bug report thread, give us details of the issue and in best case already supply patches!
     

    UNOPARATOR

    MP Donator
  • Premium Supporter
  • September 19, 2007
    231
    70
    Istanbul
    Home Country
    Turkey Turkey
    I do know about issues with ToLower() vs. ToLowerInvariant() in general. But I don't know to what kind of problems you are referring to in terms of MP2 features.

    I'm ready to change the required things, but I even more prefer to get patches from you. So please start a bug report thread, give us details of the issue and in best case already supply patches!
    I'll try to at least provide more details this week (probably end of the week).

    @morpheus_xx
    Edit: I think I found the culprit in "Core\MediaPortal.Common\Localization\StringId.cs"
    Here is what I change just 2 lines:
    Possible fix for Turkish Regional Settings.png

    I couldn't have time to look at what would the impact of this change be since this was the first time I looked at the code of MP2.
    I never used Git before couldn't commit my change hence the screenshot above.
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Thanks @UNOPARATOR, I moved the related posts into a bug report thread.

    I will check and apply those changes if required.

    Can you please explain exactly what fails in this part? The method extracts the 2 parts of our "string name" of strings_xx.xml. All string names are english ones, like
    XML:
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
      <string name="IsoResourceProvider.Name">ISO file resource provider</string>
      <string name="IsoResourceProvider.Description">Access files and directories in ISO images</string>
    </resources>

    If I understand you correctly, this would mean that a "ToLower()" of an english string gives another result than "ToLowerInvariant()" of the same english string, if the local culture is turkish in your case?
     

    UNOPARATOR

    MP Donator
  • Premium Supporter
  • September 19, 2007
    231
    70
    Istanbul
    Home Country
    Turkey Turkey
    If I understand you correctly, this would mean that a "ToLower()" of an english string gives another result than "ToLowerInvariant()" of the same english string, if the local culture is turkish in your case?
    Yes, but only when it comes to the uppercase letter "I".
    Below you will find more details about the it with a link to an article explaining the issue and a screenshot of MP2 Client home screen, so that it will all be clear for everyone.

    Here is a reference for you (I guess found about this article in this forum some time ago; but since I'm a Turkish .NET developer, I knew most of the problems mentioned there): http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html
    If you check section 3 of the above reference you will see the reason:
    reason.png

    The problem with .ToLower() is when it handles the uppercase letter "I".
    The result is like this, look at the red boxes that I added later: (from MP2 Alpha3)
    error.png
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Thanks, this made it clear to me :) You never stop learning...

    I will apply your patch later today
     

    UNOPARATOR

    MP Donator
  • Premium Supporter
  • September 19, 2007
    231
    70
    Istanbul
    Home Country
    Turkey Turkey
    I already checked it to see (before posting my proposed patch) if the home screen would show correctly and it did.
    Since I don't use MP2 at the moment in any of my (HT)PCs, I can't say if this would break any other parts.

    One thing that I don't understand: why don't you (MP2 dev team) force skinners/plugin devs to use case sensitive tags?
    I mean; (for at least plugin devs) when they use C#, it is case sensitive. Why treat the strings differently? After all the skin files are XML files and by definition a well-formed XML file is case sensitive.
    Can you elaborate about this please? (there might be some things that I'm not taking into consideration and I want to learn if so...)
     

    Users who are viewing this thread

    Top Bottom