• Resolved Leonardo Gaiero

    (@leonardo-gaiero)


    Hello, I seem to have a problem here: Polylang cannot translate strings. Whenever I try to translate any string from the “string translation” page, WordPress shows the translation successful message, but the strings I’m trying to translate revert to the original language.

    So I tried following other procedures: cleaning out/repairing the database, disabling all plugins and themes except for Polylang and Twenty Fifteen, checking if any widegts contained PHP code, disabled permalinks, but nothing seemed to work, and WordPress’ debugger doesn’t turn up anything.

    I’ve already successfully used Polylang on other sites, but this seems to be a little more peculiar: what else could I try? What else can I try debugging to get to the root of the problem? Forgot to mention, everything is up to date and the languages are it_IT (main) and de_DE (the one I need to translate towards, I’ve tried strings without special characters in them). Thanks, hopefully you can help me work something out.

    https://www.ads-software.com/plugins/polylang/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Leonardo Gaiero

    (@leonardo-gaiero)

    Please, any help? I’m at a loss, I’ve done some more testing of my own but I can’t pinpoint the root cause. Thanks.

    Plugin Author Chouby

    (@chouby)

    Hi!

    Do you mean that this happens with *all* other plugins de-activated and Twenty Fifteen as theme?

    Thread Starter Leonardo Gaiero

    (@leonardo-gaiero)

    Thanks for your reply! Everything’s completely disabled: Polylang is the only plugin and Twenty Fifteen was used in my tests. To rule out any extension conflict, I also moved all other plugins and themes outside of the relevant folders.

    So here’s what I tried next: I wanted to be sure that none of the site’s content had any inline PHP or JS, so I double-checked the SQL for any inline silliness. I found no standard tags, but I’m verifying again just in case there is inline code implemented through shortcodes that may be conflicting (doubt it may solve the problem, but it’s worth a shot).

    Also, I tried snooping around the source code as well, but without a debugger it’s a bit difficult to follow: if push comes to shove, I might be able to dig deeper with a nudge on where to start looking, but I’d rather see if it can be solved in a less gruesome manner… ??

    [EDIT] I found as I suspected references to inline PHP implemented via shortcodes (ie. [insert_php]echo "foo";[/insert_php]) in some old revisions, which I cleaned up along with other spurious data; it still didn’t accomplish anything, but at least inline PHP can be ruled out as well (didn’t find any JS either, be it implemented normally or via shortcode; I can’t be too sure about oddball theme widgets, although I did make sure to isolate other themes as stated).

    Plugin Author Chouby

    (@chouby)

    Even if you de-activated the plugins and your theme, the strings translations are still stored in DB until you clean the DB with the check option below the strings translation table (take care that if you do this while your plugins are deactivated, that should remove all your associated string translations).

    If you have access to your database, could you go in the wp_posts table and loof for posts of post_type ‘polylang_mo’ and post the content of the post_content column here (or on pastebin or similar if you have a lot of strings).

    Thread Starter Leonardo Gaiero

    (@leonardo-gaiero)

    Here you go:

    https://pastebin.com/YsDzDzZy

    I tried as you suggested and cleaned up the strings as well, still didn’t quite work.

    Thread Starter Leonardo Gaiero

    (@leonardo-gaiero)

    Um. Now I feel stupid: what’s the default action for the Enter key on your form? I never realized it wasn’t the “save changes” button. ??

    It seems to work now, and I’m kicking myself for not realizing this sooner. I can’t believe I’ve gone crazy over this for five days, and I’m sorry for disturbing over a user fault; I’ll keep the post open for now just to be completely sure that was my derp, in the meantime thanks a ton for helping me out!

    Thread Starter Leonardo Gaiero

    (@leonardo-gaiero)

    Closing as resolved.

    Plugin Author Chouby

    (@chouby)

    what’s the default action for the Enter key on your form? I never realized it wasn’t the “save changes” button.

    Your expectation sounds natural. By default, pressing enter is equivalent to a click on the first submit button, which is obviously wrong here.

    I changed this in the new development version (1.7.6.7).
    https://downloads.www.ads-software.com/plugin/polylang.zip

    I have exactly the same problem, but it makes no difference which button I click. All checkboxes disabled. See other thread, https://www.ads-software.com/support/topic/string-translation-disabled?replies=1 (opened that before I found this, sorry)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Another case of Polylang unable to translate strings’ is closed to new replies.