Translation is overwritten by update

This topic contains 21 replies, has 5 voices, and was last updated by  ismiaini 5 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #440943

    Samuel Ochs
    Expired Member
    Post count: 12

    I have made a German translation of geodirectory with Poedit. It lies in the directory /wp-content/languages/plugins/. That works well. But when I get an update from geodirectory and I update, then my German language file is overwritten and my translations are gone. Why is my translation file overwritten during an update?

    #440957

    Guust
    Moderator
    Post count: 29970

    That should not happen like that.
    If you post your URL, WP admin and FTP details in a private reply, then we will check for you.

    Thanks

    #441095

    Samuel Ochs
    Expired Member
    Post count: 12
    This reply has been marked as private.
    #441142

    Guust
    Moderator
    Post count: 29970

    I have installed WP Easy Updates as explained here: https://wpgeodirectory.com/docs/installing-addons/#updates
    Most of your GD plugins are out of date. You should keep them all up-to-date.

    If you are using PoEdit, you probably should not use Loco Translate: https://wpgeodirectory.com/docs/known-issues/#loco
    I am not sure that would be the reason for your problem.

    I have updated your language for GD core as explained here: https://wpgeodirectory.com/docs/updating-your-language-files/
    I first renamed the existing ones, just in case you wanted to keep the old versions.

    Files in /wp-content/languages/plugins should really not be affected by an update.
    Does this happen for other plugins too?

    #441514

    Samuel Ochs
    Expired Member
    Post count: 12

    Hello Guust.
    Thank you for your help.
    I have uploaded my language file again, because in your language file the word “Review” is not translated to German.

    I did all updates.

    I deactivated Loco Translate.

    Nevertheless, the gd language file is overwritten with every update. It does not matter which update I make. It does not have to be a gd update. Every update in WordPress overwrites the gd language file again.

    This only happens with the gd language file. All other language files remain stable.

    #441519

    Guust
    Moderator
    Post count: 29970

    I never have heard of this or seen this.
    I’ll get a developer to have a look too, in case they can shed some light on this.

    How can WordPress overwrite a file that is not part of WordPress?
    Or how can any other update do that?
    You must have some backup or restore setting maybe?

    #441520

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have never heard of this or seen this, are u sure the files in that location changes or are u just seeing ur translations change? (maybe not reading from that file)

    Stiofan

    #441526

    Samuel Ochs
    Expired Member
    Post count: 12

    Of course I have a current backup.
    At first, of course, I see that the translations in the frontend have changed. For example, the original file states “Review.” In my translation it says “Bewertung”. You can see that very well on the start page (tippdschungel.de).

    Then I check the speech file on the web server. Here I see that the modification date of the file has changed. The file was overwritten. When I download the language file and open it with Poedit, I see that my translations no longer exist.

    I will now upload my language file again. It would have to be “Bewertung” in the frontend again. If you now make an update or install a new plugin, the language file will be overwritten again. Try it yourself and install a plugin (for example “EU Cookie Law”). Once installed, the language file is overwritten. The new plugin does not have to be activated for this. The installation is sufficient.

    #441531

    Guust
    Moderator
    Post count: 29970

    I installed and activated “code snippets” plugin, and indeed the GD core language file in /wp-content/languages/plugins changes.
    I had backed it up and replaced again, but that is really strange.

    #441532

    Guust
    Moderator
    Post count: 29970

    Somehow GD gets the GD core language file from https://translate.wordpress.org/locale/de/default/wp-plugins/geodirectory when updating/installing another plugin.

    Can you try moving the GD core language files into a new /wp-content/languages/plugins/geodirectory/ folder and see what happens then.

    If that does not solve the problem, then we will look for another solution. Let us know.

    #441566

    Alex Rollin
    Moderator
    Post count: 27815

    You could try adding this code snippet:

    
    
    
    add_filter( 'auto_update_translation', '__return_false' );
    

    I think running it on admin pages is sufficient.

    #441696

    Samuel Ochs
    Expired Member
    Post count: 12

    I placed the GD core language file into a new /wp-content/languages/plugins/geodirectory/ folder. The translation will not be considered by GD. Instead, the wrong language file is saved and used again into the /wp-content/languages/plugins/ folder.

    Unfortunately the code snippet of Alex does not change the problem either.

    #441736

    Guust
    Moderator
    Post count: 29970

    We’ll get a developer to have a closer look. Thanks

    #441852

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Is the translation from wp.org just not complete enough or are you just changing wording?

    Try this snippet

    
    
    add_action( 'upgrader_process_complete', function() {
    	remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
    }, 1 );

    Stiofan

    #441860

    Samuel Ochs
    Expired Member
    Post count: 12

    Hello Stiofan.
    The snippet seems to work. The language file will no longer be overwritten.
    However, in the backend dashboard / updates you can see that new translations are available. (look attachment) If I update the translations now, the language file will be overwritten in wp-content / languages / plugins /.

Viewing 15 posts - 1 through 15 (of 22 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket