Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, unforunately I recognizte similar problemns..

    I use the plugin for two soccer leagues with options:

    sport: soccer league (without overtime)
    mode: standard

    if i activate automated ordering, it orders somehow.. but neither according to points nor alphabetically. So I currently switch to manually ordering the table, which works.

    Would be great to get an answer and perhaps helping tips!
    All other features work, so I’d like to continue using the plugin, but in long term auto-ordering of standings is a core feature somehow ??

    Thread Starter fussballminister

    (@fussballminister)

    OK, i found the cause of the error ??

    There were two things:

    a. For all the words that couldn’t be translated, there were two alternatives given in the .po file.

    e.g. for “Tie”, in the file was written “T|Tie” ans for “Win” it was “W|Win”. As it was so in the original language files of the league manager, I thought this is according to the normal syntax. But after removing the “|” and splitting the entries into two, everything works ?? I am not sure if this was not the right syntax or perhaps the compiler, that I used to compile the .po file to a .mo file was wrong.
    I used the online compiler at https://po2mo.net/

    b. after solving the issue of a. the “on penalty” thing wasn’t transpated anyway :/ so I looked further and found that in some places of the league manager, instead of the php function _e, the function _x is used. But it is used in wrong way, as the _x function rewuires an additional parameter for context. This additional parameter was’t used at any place. And it was also not defined in the .po files ?? so of course the php processor couldn’t decite, which translation to use and therfore did notzing in this cases.

    SOLUTION for BOTH points:

    a.

    instead of

    msgid "AET|after extra time"
    msgstr "n.V.| nach Verl?ngerung"

    better use

    msgid "AET"
    msgstr "n.V."
    
    msgid "after extra time"
    msgstr "nach Verl?ngerung"

    b.
    if you need to use the _x function instead of _e, than you have to define the context in the .po file as follows:

    msgctxt "mycontext"
    msgid "AET"
    msgstr "n.V."

    and you have to provide the context as second parameter of the _x call:
    e.g. in line 332 of the shortcodes.php instead of:
    _x( 'AET', 'leaguemanager' )
    use
    _x( 'AET', 'mycontext', 'leaguemanager' )

    One thing, that i didn’t find out, is why _e is not working at this place. Therefore I did the workaround with ‘mycontext’, although, I don’t really need any context differentiation there.

Viewing 2 replies - 1 through 2 (of 2 total)