• Asclepius

    (@asclepius)


    Hello, Awesome plugin.
    I have an issue regarding additional strings for a theme comment form.
    I need to add the translation only for the comment form manually without any sync. I tried with po edit to recompile mo file and it is ok with PO Edit. But when I replace the mo file on the host server loco translate does not show the new string.

    Please advise.

    • This topic was modified 8 years ago by Asclepius.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Loco Translate will only read the MO file if there is no corresponding PO file.

    Did you also upload your modified PO file?

    Thread Starter Asclepius

    (@asclepius)

    Yes, I did.

    Thread Starter Asclepius

    (@asclepius)

    Hm, strange. I just did it again. Uploading po and mo file and now the string is available. Strange thing. Thanks a lot.

    But, now the string is not translated on the frontend. I am testing with leave a reply only to find out the right approach.

    Maybe it is related to the same issue that I have with translation of woocomerce related products title. I am changing the translation string and it is ok on the frontend and after a while it’s revert to previous translated string?!

    • This reply was modified 8 years ago by Asclepius.
    • This reply was modified 8 years ago by Asclepius.
    Plugin Author Tim W

    (@timwhitlock)

    after a while it’s revert to previous translated string?!

    Perhaps an external process is overwriting your files. See https://localise.biz/wordpress/plugin/faqs/files-deleted

    Verify whether the actual files are being replaced.

    Thread Starter Asclepius

    (@asclepius)

    I read that already. What do you suggest to make a wp-content/languages/loco directory manually and to move files there? Because there is already a wp-content/languages/plugins directory?!

    I am a little confused.

    • This reply was modified 8 years ago by Asclepius.
    Plugin Author Tim W

    (@timwhitlock)

    wp-include has nothing to do with translations. I don’t follow your question.

    Did you verify whether your files are being overwritten?

    Thread Starter Asclepius

    (@asclepius)

    I ment wp-content/languages/loco, my mistake

    I change the translation for example on related product locally by Po Edit and upload and overwrite and so far the translation change remains.

    But the comment form strings are not changed. ?? Even if I did the above operation for them too. Still in english.

    • This reply was modified 8 years ago by Asclepius.
    Plugin Author Tim W

    (@timwhitlock)

    Your comments are confusing. You said “it is ok on the frontend and after a while it’s revert to previous translated string”. Now you say “so far the translation change remains” but also “the comment form strings are not changed”

    Please be clearer. Are your changes reverting or were they never working in the first place?

    Plugin Author Tim W

    (@timwhitlock)

    Also, can you confirm whether you have the same problem using POEdit that you do using Loco Translate?

    Thread Starter Asclepius

    (@asclepius)

    1. First issue

    Related products translation is changed via loco. And then after a while the translation is back to first one prior the change.

    And then I changed the translation locally via the Po Edit and then upload via ftp. So far the change remains.

    The loco plugin does something, when is not used it’s okay.

    2. Second issue

    I am adding new strings into the po file locally and then I am uploading them via ftp and nothing changed on the frontend, i.e. strings are not translated on the website.

    This unstable behavior cost me more than 6 hours today :).

    Anyway, so 1st issue now is stable (I hope). 2nd issue remains. How to force to work the translation?

    You suggested safe locations.

    Do I have to move the theme po and mo files to wp-content/languages/loco (I have to create loco dir manually) or to move to wp-content/languages/plugins/loco?

    The 2nd issue is the same for wp site map page plugin.

    Please, advise.

    • This reply was modified 8 years ago by Asclepius.
    Plugin Author Tim W

    (@timwhitlock)

    The loco plugin does something, when is not used it’s okay.

    My guess is that your FTP uploads have different file permissions from files saved by Loco Translate. This would confirm what I’ve already said, that WordPress will overwrite your files if you don’t protect them.

    If uploading files from POEdit via FTP works for you then I suggest you keep doing what works.

    I am adding new strings into the po file locally and then I am uploading them via ftp and nothing changed on the frontend, i.e. strings are not translated on the website.

    Ok, so you have the same problem using POEdit that you do with Loco Translate. This suggests the problem is not with the editor, but with something else you’re doing.

    What about the code that displays these translations. Did you add that to the theme yourself? Can you show it to me?

    You suggested safe locations. Do I have to move the theme po and mo files?

    I suggested this to solve your first problem. Not your second. You said your first problem is under control.

    In answer to your question though – the safe location for theme files is wp-content/languages/loco/themes/<textdomain>-<lang>.mo. You should always use this location if your theme allows you to, but it will not force your missing translations to show up. This is a separate issue.

    • This reply was modified 8 years ago by Tim W.
    Thread Starter Asclepius

    (@asclepius)

    The code in the theme is added by the theme developer when it’s bought. No changes on that. The text domain is all the same for the theme on these strings.

    I am surprised how some strings applied and when a new added they are not applied. Same text domain in the same po/mo file.

    How do we proceed?

    • This reply was modified 8 years ago by Asclepius.
    Plugin Author Tim W

    (@timwhitlock)

    I don’t have any information to proceed with, and you’ve already said you have the same problem if you upload from POEdit. Is that correct?

    If you’ve uploaded a valid file to a valid location and the theme code is valid, then I’m out of suggestions.

    Thread Starter Asclepius

    (@asclepius)

    Yeaaah, everything is valid :). Maybe will put the translation hard coded. ??
    Thank you so much.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Additional strings’ is closed to new replies.