• Resolved GoetheSchiller

    (@goetheschiller)


    Hi Guys,

    thank you for this wonderful plugin, I love it. I’m not so sure though, it loves me too and this is why:

    When I go to Plugins->LearnPress to translate the plugin in German, than there are already preinstalled versions in all these folders:

    languages/loco/plugins/learnpress-de_DE.po
    languages/plugins/learnpress-de_DE.po
    plugins/learnpress/languages/learnpress-de_DE.po

    Now this is, what happens: When I make a translation in the Authors-Folder, I can save and sync and the translated term appears just fine. Problem as you know: It doesn’t survive the next wp-update. So if I do the exact same thing with the version in the Custom-Folder, the safe-button works und the sync-button seems to work (or at least there is no message that says otherwise), but nothing happens. The translated terms do not show up.

    I tried doing it from scratch and deleting the existing files – no other results. The translations only appear when done in the “authors-folder”.

    How can I solve this?

    Thank you very much in advance!
    Best regards, Marcel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Your problem has nothing to do with the Sync operation.

    As you have three version of your language you need to understand in which order they will be loaded and in which cases files are merged together. This is complicated, but plugins that are set up normally all do it the same way.

    Unfortunately, LearnPress seems to have its own non-standard file loading order and doesn’t seem to work with Loco Translate’s “Custom” location at all, so you can forget about using that option.

    The loading order seems to be this:

    languages/plugins/learnpress-de_DE.mo (System)
    languages/learnpress/learnpress-de_DE.mo (Author)
    plugins/learnpress/languages/learnpress-de_DE.mo (Other)

    You’ll notice that the last location is a special path defined by LearnPress. This would be safe from updates, but it seems useless for defining your own strings as the System or Author file is loaded first and so any strings present will take priority.

    I can advise you how to configure Loco Translate to save files in alternative locations, but I can’t offer any help with this file loading issue as it’s external to my plugin.

    Thread Starter GoetheSchiller

    (@goetheschiller)

    Thank you very much – it is not quite what I was hoping, but it clarify things, thank you. Now I guess, and I hope I’m not naive here – I can go just to the Plugin-Data of LearnPress, find the folder where that strange loading order resides, and change it manually, right? What would that folder prabably be named? Languages, or what?

    Best regards, Marcel

    Plugin Author Tim W

    (@timwhitlock)

    This isn’t a matter of folders. The loading order is written into their code. You can’t change it.

    I suggest you either use the “System” location and disable automatic translation updates, or work it out with the plugin author.

    Thread Starter GoetheSchiller

    (@goetheschiller)

    Thank you very much. Have a nice Sunday.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mysterious Problem with the Sync-Button’ is closed to new replies.