Hi,

I installed the 6.x-1.x-dev version with drush and enabled it.

After I installed any modules I gave the following error:
WD php: Notice: Undefined variable: status in l10n_update_source_history() (line 283 of [error]
/sites/all/modules/l10n_update/l10n_update.check.inc).

I didn't find any reference to $status variable in l10n_update.check.inc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sutharsan’s picture

Priority: Normal » Minor
Status: Active » Needs review
FileSize
443 bytes

Obvious fault. Patch attached.

Sutharsan’s picture

Priority: Minor » Normal
Status: Needs review » Active

L10n update has currently two options:
* Translation updates replace existing ones, new ones are added
* Edited translations are kept, only default ones (previously imported) are overwritten and new translations are added
The latter is default.
The 'edited translations' are translations which are locally modified after l10n update was installed. Core does not mark strings when the translation is locally edited. So there is now way to know what was or was not locally modified. This problem only occurs when L10n Update is installed on a site with existing and locally modified translations.

The solution I see, it to have a third option which only adds new translations and will not override any existing translation. This would be in line with Translation Import option "Existing strings are kept, only new strings are added"

Webappz’s picture

Status: Active » Reviewed & tested by the community

I tested the patch and it solved the problem.

Thanks for the patch.

Sutharsan’s picture

Status: Reviewed & tested by the community » Fixed
FileSize
830 bytes

I reviewed the patch, but there is no reason l10n_update_source_history() should return any value. The $file object is passed by reference (in PHP5 it is) and there is nothing else to return that makes sense. Attached patch is now committed.

Status: Fixed » Closed (fixed)

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