• Resolved gevcen

    (@gevcen)


    Dear,

    Whenever I use the plugin I see :

    “Translations can be lost after wordpress update …”

    1) Why? How come they can be lost?
    2) If I update, how can export & reimport all my translations?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Next to this text is a Documentation link that goes here:
    https://localise.biz/wordpress/plugin/manual/filesystem#wp

    This link (and the pages linked from it) should answer your questions

    Thread Starter gevcen

    (@gevcen)

    Tim,

    I read the documentation but still have some doubt. The only setting I see for resolving this is the parameter

    Access to the system file
    > Modification of installed files :
    – Allow
    – Allow with warning
    – Refuse

    Did I understand well that if I put “refuse”, then my translations won’t be erased anymore?

    Thanks

    • This reply was modified 5 years, 6 months ago by gevcen.
    Plugin Author Tim W

    (@timwhitlock)

    No. “Refuse” just means Loco Translate won’t let you edit files in locations managed by WordPress updates.

    There are no settings in Loco Translate that stop WordPress from overwriting files during updates. You should not store custom translation files in any location that is controlled by WordPress updates. That is how you resolve this.

    Thread Starter gevcen

    (@gevcen)

    Then please be more precise on HOW to move my current unsafe files towards a safe directory.

    I know you have listed the safe directories on the sites you sent me, but should I just simply MOVE (through cPanel) those folders ?

    Your documentation explains why & what, but it does not explain how. I don’t find any parameters to change the directory.

    https://gevcen.tinytake.com/tt/MzU0MjQ4OF8xMDY2MDUyNw

    • This reply was modified 5 years, 6 months ago by gevcen.
    • This reply was modified 5 years, 6 months ago by gevcen.
    Plugin Author Tim W

    (@timwhitlock)

    There is no move function in the plugin. You will have to move files as you do any other files on your server. If you normally use cPanel to access your file system, then use that.

    If you’re not familiar with WordPress naming conventions, note that all files must have a text domain prefix except when they’re under the theme folder.

    The following are equivalent:

    Author: themes/woodmart/languages/fr_FR.po
    System: languages/themes/woodmart-fr_FR.po
    Custom: languages/loco/themes/woodmart-fr_FR.po

    Thread Starter gevcen

    (@gevcen)

    What I don’t understand is that, if I manually move those files from location X to location Y via cPanel, how will the plugin find them back if I don’t tell the plugin that I’ve moved those files from here to there?

    Let’s start with my theme (https://gevcen.tinytake.com/tt/MzU0MjU0OF8xMDY2MDgzMQ). Currently, I have 4 files located here => wp-content/themes/woodmart/languages/

    Can I safely move the all the 4 files from this location towards => wp-content/languages/loco/ ?

    Also, those 4 files have names just like ‘fr-FR’, how can I tell the plugin that I want to rename those files in such way that it’s clearer that it ‘theme-fr-FR’ ?

    Plugin Author Tim W

    (@timwhitlock)

    how will the plugin find them back if I don’t tell the plugin that I’ve moved those files from here to there?

    It will find them, because they are standard locations.

    Can I safely move the all the 4 files from this location towards => wp-content/languages/loco/ ?

    Yes, if you name them correctly as shown above.

    Also, those 4 files have names just like ‘fr-FR’, how can I tell the plugin that I want to rename those files in such way that it’s clearer that it ‘theme-fr-FR’ ?

    You don’t tell the plugin anything. You just rename them.

    Thread Starter gevcen

    (@gevcen)

    @timwhitlock

    Is the move that I did in this video correct ?
    https://gevcen.tinytake.com/tt/MzU0NjMxM18xMDY3NDQ3Ng

    Plugin Author Tim W

    (@timwhitlock)

    The locations shown in your last video are equivalent, yes. languages/plugins and languages/loco/plugins can contain the exact same file names.

    Thread Starter gevcen

    (@gevcen)

    Well no it’s not the same because in your documentation you said :

    All the following paths are considered “unsafe” for saving anything you want to keep.
    wp-content/themes
    wp-content/plugins
    wp-content/languages ?
    wp-content/languages/themes
    wp-content/languages/plugins

    So

    languages/plugins

    is not safe and

    languages/loco/plugins

    is safe, right?

    Thread Starter gevcen

    (@gevcen)

    So can I safely move all the plugins translations files from :

    wp-content/languages/plugins

    to

    wp-content/languages/loco/plugins

    ?

    • This reply was modified 5 years, 6 months ago by gevcen.
    Plugin Author Tim W

    (@timwhitlock)

    The locations are the same in terms of their file naming, and in terms of how and when they are loaded. As long as those plugins call load_plugin_textdomain and you keep Loco Translate enabled, then the files can exist in either location – hence those locations being equivalent.

    So, yes, you can safely move files from wp-content/languages/plugins to
    wp-content/languages/loco/plugins as long as those plugins have been written correctly. I suggest you move them one by one and check they work, and only move the files you actually intend to sever from WordPress translation updates.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Translations after WP Update’ is closed to new replies.