When i try to run drush -v l10n-update it say

Warning: The command callback function l10n_update_drush_update has a deprecated name.  It must begin with drush_l10n_update_. Skipping hook functions.

How this problem can be solved?

Comments

Component:PM (dl, en, up ...)» Miscellaneous

Project:Drush» Localization update
Version:All-versions-4.2» 7.x-1.x-dev
Component:Miscellaneous» Code
Assigned:Dematron» Unassigned

Tried to rename functions. Warning disappear, but translations still don't want downloading

Sorry, but "don't want downloading" is not a too specific explanation that we can try and solve. What's the error message / symptom? What's in the logs? Your Drush version? Any other circumstance of significance?

Status:Active» Postponed (maintainer needs more info)

Drush version - All-versions-4.2

Initialized Drupal 7.0 root directory at /var/www/html/drupal7          [notice]
Initialized Drupal site default at sites/default                        [notice]
Warning: The command callback function l10n_update_drush_update has a   [notice]
deprecated name.  It must begin with drush_l10n_update_.  Skipping
hook functions.
Command dispatch complete                                               [notice]
Checked 10 translations, updated 0.

but there are some translations that should be updated
l10n-update - last dev version

Status:Postponed (maintainer needs more info)» Needs work
StatusFileSize
new1.74 KB

This patch fixes the drush bug. But it needs work because the update process does not work. drush l10n-update does check for possible updates, but does not download these update.

$ drush l10n-update
Checked 3 translations, updated 0.

StatusFileSize
new1.31 KB

One without dpm().

Title:drush l10n-update command issueRework drush l10n-update commands
Assigned:Unassigned» jonhattan
Category:bug» task
Status:Needs work» Needs review
StatusFileSize
new5.82 KB
new7.47 KB

So I was to review this patch and ended up rewritting the whole command file. There're two new commands. In summary they are:

1. l10n-update-refresh
2. l10n-update-status // prints a table
3. l10n-update // not limited to a number of imports as before but runs the batch process.

Commands 2 and 3 accepts --languages=es,fr,de. l10n-update also accepts --mode=keep|overwrite. Those options are validated.

Attached a patch and also the whole file for readability. This set of commands does work with versions 6.x and 7.x of the module.

Thumbs up for getting the patch in #9 in as soon as possible, as what is now available does not work at all. I tested the patch with success on a multi-site Drupal installation. See the results below for all 3 commands mentioned in #9.

$ drush l10n-update-refresh -l http://example3.com
Fetched information about available updates from the server
$ drush l10n-update-status -l http://example3.com
Fetching update information for all projects / all languages.
Project                       French status            Norwegian Bokmål status
admin_menu 7.x-3.0-rc1        Up to date               Up to date
boost 7.x-1.x-dev             No information           No information
drupal 7.0                    Up to date               Up to date
l10n_update 7.x-1.x-dev       No information           No information
languageicons 7.x-1.0-beta1   Up to date               Up to date
link 7.x-1.0-alpha3           Remote update available  Remote update available
media 7.x-1.x-dev             No information           No information
media_youtube 7.x-1.0-alpha4  Up to date               Up to date
navigation404 7.x-1.0         Up to date               Up to date
styles 7.x-2.0-alpha5         Up to date               Up to date
wysiwyg 7.x-2.0               Up to date               Up to date
zen 7.x-3.0                   Up to date               Up to date
$ drush l10n-update -l http://example3.com
Fetching update information for all projects / all languages.
Found 1 projects to update.
Updating translation.
Downloading and importing files.
WD locale: 1 disallowed HTML string(s) in sites/all/translations/link-7.x-1.0-alpha3.fr.po
The translation was successfully imported. There are 0 newly created translated strings, 58 strings were updated and 0 strings were removed.
One translation string was skipped because it contains disallowed HTML.
Successfully downloaded and imported translation from http://ftp.drupal.org/files/translations/7.x/link/link-7.x-1.0-alpha3.fr.po
WD locale: 1 disallowed HTML string(s) in sites/all/translations/link-7.x-1.0-alpha3.nb.po
The translation was successfully imported. There are 0 newly created translated strings, 13 strings were updated and 0 strings were removed.
One translation string was skipped because it contains disallowed HTML.
Successfully downloaded and imported translation from http://ftp.drupal.org/files/translations/7.x/link/link-7.x-1.0-alpha3.nb.po
Successfully imported translations.

I also used the l10n-update-refresh and l10n-update-status commands on 2 other sites, but did not test the l10n-update command for these sites, as they had no available updates.

Status:Needs review» Reviewed & tested by the community

looks good to me too, great work jonhattan

I dont think this has been commited yet
any news when? I cant wait to use drush to update all l10n :)

/me adds a not, that patch is only working with drush 4 or higher ( _convert_cvs.. )

@EugenMayer: what do you mean? Will it break? Do you think it is a significant problem? (I'm not sure).

@all: Looking at the patch, I've only seen one cosmetic problem "Implementation of" vs. "Implements". Otherwise it looks good IMHO.

#14 @Gabor: This implementation would not work with drush 3 at allow due to the call to convert_cvs .. but i guess drush 3 is out of live already and not even listed on the project page anymore, so this is just fine.

Just wanted to note it, so it could be stated in the release notes

Version:7.x-1.x-dev» 6.x-1.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)

Committed to Drupal 7.x. Attempted to apply patch to 6.x checkout, but it did not apply. Still needs backport.

@ #14: i simply replaced the d6 version with the new file, did not even try to apply the patch. Works just fine - no issues at all. Already tested in several systems

Status:Patch (to be ported)» Fixed

Ok, superb, committed to 6.x too.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.