• Resolved rembem

    (@rembem)


    Hi,

    I installed this plugin for translating the WordPress core files.
    I had the 2 files nl_NL.po and nl_NL.mo for my language in the right place with correct permissions etc.
    I could make translation changes and save them for all other language files (of my theme, plugins etc.), but these core files gave the error ‘Invalid data posted to server’.

    I dug into the plugin files and found for this error to show, in loco-posave.php it checks for a few things, and the name ($name) was the culprit. When I delete the $name check on line 9, saving works fine.

    Not sure why these files don’t have a name, need a name, why this check is there, and what the implications are of removing it. But for now it seems to work.

    I hope you can fix this in a new version.

    https://wordpress.org/plugins/loco-translate/

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

    (@timwhitlock)

    Core packages are still an experimental feature, so thanks for looking into this.

    WordPress decided that these files should have no prefix, and you’re right that the validation for $name makes no sense when allowing a nameless package. I’ll remove the check in the next release, but I’ll check first whether nameless packages cause any other problems.

    Thread Starter rembem

    (@rembem)

    I will let you know if I find anything going wrong with this.

    Thanks for the great plugin!

    Plugin Author Tim W

    (@timwhitlock)

    The current Development Version fixes this issue. Core “default” domain files save as simply xx_XX.po

    Unfortunately, without a complete overhaul of the plugin, Core packages are going to remain an issue. This is because they comprise a single Text Domain split across overlapping source directories. This doesn’t play nicely with the way I implemented this plugin

    Hi,

    i can’t see wp core files.

    I mean i only see “Continents & Cities”, “Network Admin” and “Administration” files, but not the common frontend core files like fr_FR.po, de_DE.po, etc…

    Am i experiencing same issue you are talking about here?

    thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems with translating core files and fix (?)’ is closed to new replies.