My Score Center - version 2.12.0.0 - 4 May 2014 (for MP 1.6/1.7) (2 Viewers)

FredP42

MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    There has been changed and improved a lot since v1.4.0. I'm slowly getting to the state of art of this great plugin. :)
     

    FredP42

    MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France
    Hi Fred!

    Hungarian results don't work however the globe icon opens the right URL in browser. Can you take a look into that?

    Thanks!

    Well I introduced a workaround because previously the url were using 'hun-monicomp-liga' instead of 'otp-liga' but it seems they fix that so the scores is now looking for the wrong url.
    I will fix this in the next version.
     

    FredP42

    MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France
    There has been changed and improved a lot since v1.4.0. I'm slowly getting to the state of art of this great plugin. :)
    Yes a lot of changes (see the release notes).

    One of them is internationalization files for scores which was your other question:
    the score_xx.xml files go to the language directory something like C:\ProgramData\Team MediaPortal\MediaPortal\language\ScoreCenter with regular strings_xx.xml files.

    The structure of a score_xx.xml file is:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <ScoreLocalisation>
      <Strings>
        <LocString id="Athletics">Athlétisme</LocString>
      </Strings>
      <Globals>
        <LocString id="Today">Aujourd'hui</LocString>
        <LocString id="(?&lt;grp&gt;\.*)[\s*]Men" isRegEx="true">${grp} Hommes</LocString>
      </Globals>
      <ScoreDictionaries>
        <ScoreDictionary name="tennis">
        <LocString id="Roger Federer">Roger</LocString>
      </ScoreDictionary>
    </ScoreDictionaries>

    the Strings and Globals section are for scores' names => what you see in the list on the left.
    For Strings id is the actual id of the score.
    For Globals id is a generic string or a regular expression, in the example it means if the name of the score is "Today" it will be translated to "Aujourd'hui", and if it is "Hello Men" with "Hello Hommes".

    The last section ScoreDictionary is for the score itself.
    You can have many of them to avoid to have to do too much processing and also avoid collision.
    In my example, "Roger Federer" will be replaced by "Roger" in all score for which the dictionary parameter is set to "tennis". This parameter is on the "Post Processing" tab.

    Note that you can also do text replacement by using a Rule (third tab).
    For example, if in the first column instead of "1" you want to see "One", then create a rule for your score with the following parameter:
    - Column: 1 (0 means any column, -1 means the rank of the line)
    - Operator: =
    - Value: 1,one
    - Action: Replace Text
    when using 'Replace text' the value field must contain the string to replace and the new value separated by a comma.
     

    fischy667

    Super User
  • Team MediaPortal
  • Super User
  • May 5, 2010
    958
    283
    41
    Rostock
    Home Country
    Germany Germany
    And it is possible to chance the round number from woldfootball scores to?

    In my picture from "6 Spieltag" to "6. Spieltag". I want to add a point.
    Image1.png


    I tried:

    Code:
    <LocString id="(?&lt;grp&gt;\.*)[\s*]Spieltag" isRegEx="true">${grp}. Spieltag</LocString>
     
    Last edited:

    Holzi

    Super Moderator
  • Team MediaPortal
  • April 21, 2010
    7,934
    2,235
    Ba-Wü
    Home Country
    Germany Germany
    Note that you can also do text replacement by using a Rule (third tab).
    For example, if in the first column instead of "1" you want to see "One", then create a rule for your score with the following parameter:
    - Column: 1 (0 means any column, -1 means the rank of the line)
    - Operator: =
    - Value: 1,one
    - Action: Replace Text
    when using 'Replace text' the value field must contain the string to replace and the new value separated by a comma.

    Thank you very much again! Now I finally know how replace text works! I've seen it already but didnt know how to use it. :)

    Is there anything in the wiki about that then I'm sorry I have not searched enough.
    Thanks!
     

    FredP42

    MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France
    Is there anything in the wiki about that then I'm sorry I have not searched enough.
    I reassure you it was not in the wiki, but I will reuse my explanation to add a page about internationalization.
     

    FredP42

    MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France
    And it is possible to chance the round number from woldfootball scores to?

    In my picture from "6 Spieltag" to "6. Spieltag". I want to add a point. View attachment 111945

    I tried:

    Code:
    <LocString id="(?&lt;grp&gt;\.*)[\s*]Spieltag" isRegEx="true">${grp}. Spieltag</LocString>

    This one is in fact a string added by the plugin so it it in strings_xx.xml with id "20"

    Code:
        <String id="20">{0} Spieltag</String>

    I really need to document this, it took me 30 minutes to find it :oops:
     

    fischy667

    Super User
  • Team MediaPortal
  • Super User
  • May 5, 2010
    958
    283
    41
    Rostock
    Home Country
    Germany Germany
    But now I have another problem.

    I changed
    Code:
    <String id="20">{0} Spieltag</String>
    to
    Code:
    <String id="20">{0}. Spieltag</String>
    .

    When I have now a category in ScoreCenter named "akt. Spieltag" (acronym for aktueller) it will be renamed to akt.. Spieltag. (n)

    So why is Scorecenter using the language files on self defined category names??
     

    Attachments

    • Image1.png
      Image1.png
      117.7 KB
    • Image2.png
      Image2.png
      1.1 MB

    Users who are viewing this thread

    Top Bottom