Not sure if "version mismatch" is the best phrase for the title of this issue. Let me explain what I mean and please feel free to change the title is there is a better catch.
Sometimes there are dev releases for modules that have 'unusual' version tags, at least unusual to me. Example: the media_gallery dev release currently comes with version = "7.x-1.0-beta7+21-dev". The po-file on localize.drupal.org is named media_gallery-7.x-1.0-beta7.de.po and there is none available for the dev release.
Wouldn't it be nice and easy to use the string up to the + character in the version tag when searching for po files on the server? I've checked with other examples that this would in fact always work.
What do you think?
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | l10n_update-fetch-module-update-1671570-18.patch | 824 bytes | sutharsan |
| #18 | l10n_update-fetch-module-update-1671570-18.patch | 0 bytes | sutharsan |
| #15 | l10n_update_1671570.patch | 1.71 KB | jurgenhaas |
| #12 | l10n_update_1671570.patch | 1.52 KB | jurgenhaas |
| #5 | localhost screen capture 2012-7-5-20-3-17.jpg | 68.16 KB | jurgenhaas |
Comments
Comment #1
gábor hojtsyThe latest release which includes #1001554: Make it possible to fetch .po files for dev modules/core should have fixed this issue. Is it not working for you?
Comment #2
jurgenhaasIt looks like it downloads the file but according to the messages after the translation update it doesn't import those po files.
Comment #3
jurgenhaasOh, wait a minute. We probably got mislead here. It may well be that the po file is a little bit older and has been downloaded already some time ago and hence hasn't been imported this time. We are going to verify this with more tests and report back shortly.
Comment #4
sutharsan commentedLocalization Update server only supplies po files for releases, not for dev-packages. If you have a dev release installed, Localization Update module falls back to the most recent release of the same branch. In your case the 7.x-1.0-beta7 translation is the fallback for 7.x-1.0-beta7+21-dev module version. This is by design behaviour. If the translation of the beta7 release got update, it will be imported by Localization Update. But it will only contain the string of the beta7 release. More recent string additions/changes in the module (between beta7 and beta7+21-dev) are unknown to the Localization Update server. And what is not there can not be imported.
Comment #5
jurgenhaasJust done a fresh install and then went to admin/config/regional/translate/update finding the attached screen which shows that for media_gallery there are no updates found. Even if I refresh the information with the second button at the end of the form, this doesn't change.
Comment #6
jurgenhaasBTW, I reported this against 1.0-beta3 and I wonder if the latest dev would be the done that had the resolution included?
Comment #7
sutharsan commentedbeta3 does include this functionality. While reproducing your situation I got the same behaviour after downloading and enabling the dev-release of Media Gallery. No beta7 tranlation was indicated. It turned out that Update module caches its results. After visiting the available updates page at example.com/admin/reports/updates the translation update page was giving the expected results.
Comment #8
jurgenhaasConfirmed, that works here as well. Is that something that could and should be improved in l10n_update?
Comment #9
sutharsan commentedIt needs investigation. If you like to get into it, you can start here:
l10n_update.project.inc, line 50
Changed to bug report and modified issue title.
Comment #10
jurgenhaasI digged deep into this and it looks as if Drupal is fetching available releases from d.o in function update_fetch_data() in a way so that the process will only take 5 seconds at most. This is driven by function _update_fetch_data() which reads the variable update_max_fetch_time which defaults to UPDATE_MAX_FETCH_TIME = 5.
Therefore, we only ever get 1 or two projects being updated and cached so that modules being later in the alphabet will be updated not at the first time this update function is called and therefore we do not have release data available available until some time later.
How can we overcome that problem?
I can think of three possible approaches:
1) We could call update_fetch_data_batch() to collect all outstanding project releases.
2) We could temporarily
variable_set('update_max_fetch_time', $value)to a fairly high value to get a better chance that all release data will be fetched early enough.3) In l10n_update_build_projects() we could call _update_process_fetch_task() for individual projects in all cases where we can't find data in either $projects or $projects_info
I guess that the first two are not really valueable as they could easily run out of the php time limit which is exactly why those limits have been introduced. Therefore option 3 might be the best approach for now.
What do you think?
Comment #11
sutharsan commentedI agree that option 3 is the best solution. Preferably only for those cases where we have a dev release on your hands.
Comment #12
jurgenhaasAttached a first patch for review which should resolve this issue.
Comment #13
sutharsan commentedCode looks good, but it needs some explanation why this special action is taken.
Comment #14
sutharsan commented@jurgenhaas, can you follow up this issue?
Comment #15
jurgenhaasSure thing, please find suggested comment in the attached reroll.
Comment #16
sutharsan commentedPatch committed, thanks.
I've trimmed the comment lines to 80 chars as per coding style guide.
Comment #17
JvE commentedThis breaks when enabling a module while the update module is disabled.
_update_process_fetch_task() and _update_get_cached_available_releases() are now called at a time when the update module which defines it may not be enabled yet.
Perhaps the first line should be extended to
if (!isset($projects_info[$name]) && module_exists('update')) {Comment #18
sutharsan commentedJvE, yes we should do that.
Comment #19
sutharsan commentedComment #20
sutharsan commentedThe right patch...
Comment #21
JvE commentedPatch solves the problem.
Comment #22
sutharsan commented#20 committed.