7

I've recently upgraded a Wordpress site to the latest WP version (3.9). I also upgraded the themes and plug-ins that needed it.

Unfortunately, WP's automatic upgrade features are not compatible with the server this site is installed on, so I have to do it manually.

What bothers me is that I still have a red "1" on the Dashboard menu, telling me there's an update available. When I consult the details, everything is empty, except for the "Translations" section, at the bottom of the page.

How do I upgrade these manually? As I said, I can't just let WP do it automatically because it doesn't work.

I've checked the "languages" folder in "wp-content" and made sure it only contains the files from the new WP archive. I don't know where else to look.

Thanks in advance.

7

quick-and-dirty hint to solve this problem:

  1. find the function list_translation_updates() in wp-admin/update-core.php

    $updates = wp_get_translation_updates();
    if ( ! $updates )                  <- locate the if
    ...
    }
    else {                             <- add this
       print_r ( $updates );
    }
    
  2. add the else-case and save the file

  3. reload the dashboard page and you will get the desired information.

  • Thanks for the suggestion. It's not really a solution, but it helped me understand what I was missing (see my answer). – s427 Aug 24 '16 at 16:21
  • It is a wonderful solution, it shows exactly the packages the auto-updater would download. – cato_minor Jan 16 '17 at 21:20
1

Sooo, apparently the problem was simply that I had forgotten to also upload the new wp-content/languages folder that came with the new WP version.

The official doc (at least in French) recommends not to upload the wp-content folder during the upgrade process (because it contains all the personal files), which is why I had neglected that step.

Apparently, simply replacing the old languages folder with the new one is enough. WP now says that my translations are up to date. Problem solved. :)

  • Same problem, but when I download current WP versions (4.7) there is no "languages" dir inside wp-content ?! – MilanG Dec 7 '16 at 12:21
  • 1
    My answer was based on the French version of Wordpress (4.6.1). I just checked and apparently the "languages" folder only contains the files for French (not even English). My guess is that this folder is not necessary for the English version of WP, since English is the default language. This might explain why the folder is missing for you. – s427 Dec 7 '16 at 12:43
1

Similar to @wp_quick_and_dirty's solution, but without editing core files. Add this to your functions.php file:

function translation_updates_list() {
    $translation_updates = wp_get_translation_updates();
    if ( empty($translation_updates) ) { return; }

    echo "<h4>Available translations</h4><pre>";
    echo esc_html( print_r($translation_updates, true) );
    echo "</pre>";
}
add_action('core_upgrade_preamble', 'translation_updates_list');

Based on this even fancier solution: https://gist.github.com/swissspidy/e2d1cde667fa4da4db66

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.