updates - How can I manually upgrade translations?

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

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.

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.

Share Improve this question asked Apr 25, 2014 at 16:18 s427s427 2012 silver badges5 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 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.

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/swissspidy/e2d1cde667fa4da4db66

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. :)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745520755a4631248.html

相关推荐

  • updates - How can I manually upgrade translations?

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

    19小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信