• Hi,

    I am having a weird issue with Loco Translate and Woocommerce.

    If you check the screenshot I uploaded below you will see that Loco Translate created 2 language files for Romanian. The weird thing is that the strings inside them are not totally the same. When I want to change the translation for a string I have to check both files to see where the string is actually located. Sometimes, the strings are not to be found in both files.

    As you can see I have moved one of the files in the custom folder, but because the other file is in System, I am losing some translations when I update Woocommerce.

    Did anybody encounter this before? How can I merge the two files and make sure I won’t lose translations again on the next update?

    https://ibb.co/tc4XmWC

    • This topic was modified 2 years, 8 months ago by popos93.
    • This topic was modified 2 years, 8 months ago by popos93.
Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    you will see that Loco Translate created 2 language files for Romanian

    Loco Translate does not create two files. WordPress installs the system file, and presumably you created the custom file.

    The weird thing is that the strings inside them are not totally the same.

    Let’s separate the two parts of this process:

    1. When you run a WordPress update you may get new “system” translations installed and you may get a new version of WooCommerce. Hopefully these align. i.e. the WordPress translations should match your version of WooCommerce. This part of the process has nothing to do with Loco Translate.

    2. Loco Translate does not automatically update custom translation files when you run an update, or at any other time. If your custom translations are out of sync with the above (point 1.) then you must open your file and press the Sync button. The sync function is documented here. This is deliberately not automatic due to the fact it is a potentially destructive operation.

    How can I merge the two files and make sure I won’t lose translations again on the next update?

    It’s not necessary to merge the files and you should never lose translations that are still valid. It just requires setting up properly.

    On that first point – any translations missing from your custom file will fall back to the system file. That’s why merging them is not required. They are merged at run time by Loco Translate’s custom file loader.

    On the second point, any translations that are “lost” will be no longer valid. i.e. their source text changed. (Read about Fuzzy matching in the Sync documentation). If you lose valid translations from the System file then there is an issue with your WordPress updates keeping in sync with the translations. If you lose valid translations from the custom file, try tweaking the fuzziness setting, and make double sure you are syncing to a valid source before you save anything.

Viewing 1 replies (of 1 total)
  • The topic ‘2 different .po files for Woocommerce’ is closed to new replies.