• Resolved mstudioeu

    (@mstudioeu)


    Hi,

    I’m having issues with Loco Translate. The plug-in keeps downloading a second translation package of WooCommerce even if I already have a primary translation package installed in the custom folder. The plug-in keeps downloading a second translation package in the system folder. The second translation package overwrites my primary language package and causes issues.

    Also, there is a difference between them – my primary translation package has 11,952 strings and 6,112 pending, while the second translation package has 5,861 strings and 0 pending.

    Can you please help me with this?

Viewing 15 replies - 1 through 15 (of 21 total)
  • Thread Starter mstudioeu

    (@mstudioeu)

    Screenshot:

    Plugin Author Tim W

    (@timwhitlock)

    Your post doesn’t say what problem this is actually causing, but I’ll explain what’s happening:

    The plug-in keeps downloading a second translation package of WooCommerce even if I already have a primary translation package installed in the custom folder

    Loco Translate doesn’t download any files. WordPress will install available language packs when auto-updates are enabled. This is expected behaviour.

    You refer to this file as secondary, but arguably it’s the primary file as it’s the one that WordPress expects to find. Your custom files will be merged on top, as documented.

    there is a difference between them – my primary translation package has 11,952 strings and 6,112 pending, while the second translation package has 5,861 strings and 0 pending.

    Your custom PO file has more strings (probably) because Loco Translate will also include script translations when possible. GlotPress purposefully removes these extra strings from the PO file in their downloadable language packages. It’s a rather unhelpful feature, but also expected behaviour.

    I have the very same issue. I have 2 languages and the newly downloaded one always overwrites mine.

    • This reply was modified 1 month, 2 weeks ago by zzlatevv.
    • This reply was modified 1 month, 2 weeks ago by zzlatevv.
    Thread Starter mstudioeu

    (@mstudioeu)

    Hello to you as well, Tim!

    In this case, how am I supposed to keep the translated strings from my file untouched, if the original translated file overwrites mine? That’s my original issue. I have translated one string in my custom file for test purposes and as soon as WordPress downloads the original file, that string is translated in a different way. How can I fix this?

    Plugin Author Tim W

    (@timwhitlock)

    Translations in your custom file should override those in the system file. If this isn’t working, I can’t explain it without debugging it myself. To that end I require precise steps to reproduce this effect in my test environment.

    Thread Starter mstudioeu

    (@mstudioeu)

    Tim, that’s very weird, because I can see only WooCommerce has 2 languages.

    Elementor, e.g., has only one language available.

    Am I missing something?

    Plugin Author Tim W

    (@timwhitlock)

    I don’t quite follow your point, but WordPress downloads publicly available language packs according to their availability and completeness. I don’t know anything about Elementor, but it appears to be available in 64 languages.

    I can only tell you how my plugin works, and what behaviour I expect to see. As already mentioned – if you experience GlotPress-installed (“system”) translations overriding your custom translations, then I require steps to reproduce that problem. Such steps must exclude the use of other plugins, as I need to test the functions of my plugin without the introduction of side effects.

    Thread Starter mstudioeu

    (@mstudioeu)

    Tim, I have delete my po file and left the original one and I will use it in the custom folder and I will change the strings according to that file.

    The point that you don’t understand is that I have 2 Bulgarian languages for Woo. For Elementor, e.g., I have 1 Bulgarian language. I hope you will understand now.

    You can close the thread for now.

    Plugin Author Tim W

    (@timwhitlock)

    OK, I’ve marked as resolved.

    I understood that you have one file for Elementor and 2 for WooCommmerce. What I didn’t follow was the relevance of this fact to the original problem you asked me about.

    You will see from my earlier link that Elementor is only 48% translated into Bulgarian. This probably explains why WordPress hasn’t installed its language pack. Hence why you have only one file, which I presume you created.

    Thread Starter mstudioeu

    (@mstudioeu)

    Tim, here’s your own article about this issue.

    https://localise.biz/wordpress/plugin/faqs/translate-woocommerce

    As you can see, there is an issue with translating WooCommerce with your plugin. So I’m asking you directly – what is the best way to translate WooCommerce with your plug-in? Shall I load your XML config? Can I move the po file into their safe system folder and translate that file without creating a custom one in the custom folder provided by your plug-in? What is the best way to fix this? Thank you in advance.

    Plugin Author Tim W

    (@timwhitlock)

    What is the best way to translate WooCommerce with your plug-in??

    The best way to translate any plugin, including WooCommerce is to install the official language pack and override translations you don’t like in custom files. You are already doing this.

    It would also be best to disable any other plugins that might interfere with the display of translated strings, until you’ve established that your translations work.

    Shall I load your XML config?

    You don’t need to change the config unless you have special requirements.

    Can I move the po file into their safe system folder and translate that file without creating a custom one in the custom folder provided by your plug-in??

    Don’t move anything. Leave WordPress to manage system translation files and create custom language files based on woocommerce.pot. You seem to be doing that, and it is correct.

    What is the best way to fix this?

    You said your custom files are not overriding the installed ones. I’ve already said that I can’t explain that behaviour, and have asked for steps to reproduce. I can’t offer a solution until I have this, because it’s unexpected behaviour.

    Plugin Author Tim W

    (@timwhitlock)

    Tim, here’s your own article about this issue.

    Regarding the link to that FAQ.

    It recommends using the languages/woocommerce location, but that’s only necessary if you want to disable Loco Translate and rely 100% on WooCommerce loading custom files. I’m no longer sure if this is the best solution, because I wrote that a very long time ago. I suggest you try it out and see for yourself if you get better results.

    Thread Starter mstudioeu

    (@mstudioeu)

    Tim, my question is: shall I create a new custom file for my translations or I can use the original WooCommerce file, edit and translate the original file and place it in their safe directory? In this case, I guess I will not have 2 languages anymore.

    Please let me know.

    Plugin Author Tim W

    (@timwhitlock)

    Create a new custom file for your translations.

    Don’t edit or move installed translation files.

    This advice is based on normal, expected behaviour, but it’s clear that you’re not experiencing normal behaviour due to some unknown factor. Resolve that as I’ve recommended, by disabling any other plugins that might interfere with the display of translated strings, until you’ve established that your translations work.

    Thread Starter mstudioeu

    (@mstudioeu)

    Thanks, Tim, but I already have done that and I still have 2 Bulgarian packages – in the custom folder and in the system folder. If I delete the system folder one, after a few hours, it appears again and overwrites my file.

    So can I use the Woo .po filе, кeep it in their system safe folder, edit and translate the strings with the assurance that that everything will be fine after the next plug-in/translation update?

    Thank you in advance!

Viewing 15 replies - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.