• Resolved vipteam

    (@vipteam)


    In version 1.2.5 everything was fine. Since then I have not checked. The plugin has been updated to date. However, the translation is no longer working. My cookie page is now in English.

    I’ve tried everything but nothing helps. The fault is not on my side. The cookie page is still in English. What is happening?

    UPDATE

    I have now returned again to version 1.2.5. Again, everything is fine. The translation is visible and everything works normally. Please check what the problem is.

    Thanks in advance

    • This topic was modified 6 years, 4 months ago by vipteam. Reason: update
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @vipteam,

    Thanks for your question.

    Could you provide us with some more information?

    Your WordPress Default Language and the plugins used for translating your website, if any. We might have some follow up questions if don’t mind, to figure out if this is an isolated issue. Thanks again,

    Regards Aert

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Hi @vipteam,

    I’ve just tested this, the issues seems to be that the languages which are translated on WordPress load fine (Dutch, English, Spanish) , but the language files which are shipped with the plugin not (e.g. German).

    Can you check if adding this to the file wp-content/plugins/complianz-gdpr/functions.php resolves the issue?

    if (!function_exists('cmplz_load_translation')) {
        add_action('admin_init', 'cmplz_load_translation', 20);
        function cmplz_load_translation()
        {
            load_plugin_textdomain('complianz', FALSE, dirname(plugin_basename(__FILE__)) . '/config/languages/');
        }
    }

    If this works I’ll update the plugin the end of the day with this function.

    Thread Starter vipteam

    (@vipteam)

    Unfortunately, adding this to the plugin function file does not help.

    On my side is nothing special. Default lang is croatian. Translation software: Poedit. The same thing is with the language files in the Translate WordPress Project at: https://translate.www.ads-software.com/projects/wp-plugins/complianz-gdpr/stable/hr/default

    Complianz lang files are in /wp-content/languages/plugins/. Also, the same thing is when the Complianz lang files are in /wp-content/plugins/complianz-gdpr/config/languages/. Nothing changes.

    One more thing. I see the translation in the plugin settings when i’m logged into the dashboard admin. So the back-end is fine. But the problem is here with the front-end, translation is not visible on the page.

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    There’s a mistake in my earlier function: can you try changing admin_init in the function I posted earlier to init so it looks like this?

    if (!function_exists('cmplz_load_translation')) {
        add_action('init', 'cmplz_load_translation', 20);
        function cmplz_load_translation()
        {
            load_plugin_textdomain('complianz', FALSE, dirname(plugin_basename(__FILE__)) . '/config/languages/');
        }
    }
    Thread Starter vipteam

    (@vipteam)

    I see. No problem. I did so. No change. Back-end (settings and cookie banner) is OK. Front-end (cookie page) failed.

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Weird. Can’t reproduce it. Additionally, I looked for changes connected to translations since 1.2.5, but didn’t find any. The above function already was commented out in this version, and the language files already were moved to the config/languages folder.

    I’ve tested with a random locale, created by loco translate (https://www.ads-software.com/plugins/loco-translate/)

    It all worked fine (tested in Chrome anonymous mode).

    Tried the language files in wp-content/languages/plugins, wp-content/plugins/complianz-gdpr/config/languages, and both worked fine, even with loco translate disabled.

    Could you try installing loco translate to see if it recognizes your translation files?

    If this doesn’t help, please contact us at [email protected], as we might need to debug this on your system, if possible.

    Thread Starter vipteam

    (@vipteam)

    I do not know how to explain this.

    Loco Translate recognizes lang files. I have now proceeded to translate through Loco. While I translate on my site pops translated text. Super! What is less great, it’s all that I need to translate from the beginning.

    For some reason, the files from Poedit and Translate WordPress Project are not valid. I do not know why. Even on the contrary, I am sure that with them all right. Maybe you can find out what the problem is?

    I’m afraid I’ll lose the translation again after the next Complianz plugin update.

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    As far as I know the translation files on the WordPress repository have never reached 100%, therefore these won’t get loaded by WordPress.

    Possibly the problem is that the translatable strings have changed in the update. For example, if you have a sentence like “This cookie statement was last updated on %s”, and it changes to “This cookie statement was last updated on %s and applies to citizens of the %s.”, the previous string is not translated anymore.

    If this is the case, there should still be some strings that are translated (the unchanged strings), but others not anymore.

    As legal requirements change, and the plugin is improved, it is unavoidable that strings change every once in a while, but we try to keep this to a minimum.

    If you can send the .po/.mo files you use to [email protected], I can check them to see if this is the case.

    Thread Starter vipteam

    (@vipteam)

    Thank you very much! Email sent with attached lang files.

    Regards

    Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    Yes, the problem is that in the 2.0 update we added comments to the translation strings of the legal documents so translators can distinguish between the legal documents and the plugin strings. For example, in the back-end, in the plugin, texts can be informal. But in legal documents the text is usually formal.

    Because of this difference we are having trouble getting our translations approved, which is why we started adding comments/explanations to our translation strings. But… this has had the side effect that all strings which were translated previously, which got this comment added, were now untranslated again.

    The comments have been added now so the majority of the strings won’t change that much anymore, but please note that on every update, it is possible some strings have changed, and need to be translated again.

    As we need to translate all strings ourselves as well, we try to make only changes which are absolutely necessary of course.

    Thread Starter vipteam

    (@vipteam)

    I see. Thanks for your effort and explanation.

    Another thing I noticed and can help others. When you work with the Loco Translate plugin, in this case (when text is unchanged), you must confirm the translation and save it as follows: add a point or space, and then wipe it immediately. You will get an asterisk meaning that the string is translated. Translation is saved and again visible.

    Better a little effort now than headaches with the law later.

    Problem resolved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Localization problem’ is closed to new replies.