We pull in a ton of modules and translations. We run the following when making a build.

--translations=es 

Sometimes the translation gets a 404. And inside the po file it looks like this.

translations]$ cat emfield-6.x-2.4.es.po 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /files/translations/6.x/emfield/emfield-6.x-2.4.es.po was not found on this server.</p>
<hr>
<address>Apache Server at ftp.drupal.org Port 80</address>
</body></html>

It works fine for a normal install, but under aegir we get the following failure, when trying to batch load them in our profie.

The translation file emfield-6.x-2.4.es.po contains a syntax error on line 1.

The workaround has been to skip them as follows.
$skip = array('emfield', 'exportables', 'libraries', 'mp3player', 'node_export', 'uuid_features', 'wysiwyg_ckeditor_nice', 'wysiwyg_ckeditor_styles');
$batch = locale_batch_by_language('es','_xforty_translation_batch_finished',$skip);

We need to check for a 404.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dmitrig01’s picture

Priority: Normal » Critical

Oops :P

helmo’s picture

hmm, especially painful as the number of translations for 7.2 is currently very limited.

See: http://ftp.drupal.org/files/translations/7.x/drupal/

Would this be a bug in _drush_make_download_file()

neurojavi’s picture

I get a different error when downloading not existing translations with a drupal 7.x make file (I'm using 2.2 since I can't test it with 2.x by now).

Executing: mkdir '/tmp/drush_make_tmp_1309779750/__download__'
Undefined property: stdClass::$message drush_make.download.inc:174                                                                                                                      [notice]
BUILD_ERROR                                                                                                                                                                          [error]
Unable to download translations for transliteration: es                                                                                                                              [warning]

This makes drush make to finish with error so no platfform is created so I can't download translations with drush make by now.

On the other side, I've found a related issue: I think that drush make continues to download po files to module/translations directory and not to translations or sites/all/translations as is expected in drupal 7. So it makes the translations download feature of drush make unusable for D7:

Executing: mv '/tmp/drush_make_tmp_1309779750/potx-7.x-1.0.es.po' '/tmp/drush_make_tmp_1309779750/__build__/sites/all/modules/contrib/potx/translations'
All translations downloaded for potx   

If you think this is another issue let me now and I'll open a new one.

Thanks.-

helmo’s picture

Yes these are two new issues, although the first one might have it's root in the same code.

helmo’s picture

@neurojavi: The Undefined property: stdClass::$message could very well be fixed already, that line now uses $error in stead of $message.

dmitrig01’s picture

Status: Active » Fixed

Fixed

achton’s picture

I experienced the error from #4 with latest 2.x-dev and fixed it by installing curl (using Linux).

Status: Fixed » Closed (fixed)

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

jagnikam’s picture

I am also facing the same problem for --translations=vn . I have installed curl but problem still persist.
drush version -4.2
drush make version - 2.2
can someone please post the solution for the same...

xatoo’s picture

The problem still persists when using --translations=nl with:
Drush core: 4.5
Drush make: 2.3
Curl 7.19.7

I fixed the problem by adding a -f option to the curl calls in drush_make.download.inc. This makes curl exit with an error code when a request returns a >=400 response code. This is needed in order to make drush_shell_cd_and_exec return FALSE.

bisonbleu’s picture

Same problem with a custom profile named 'five8sports'. I'm currently using drush 5.0.0, a fresh version of drush_make-6.x-2.x-dev along with profiler-6.x-2.0-beta2.

But ooooooh so close! Modules translations are ok. :-)
Drupal core translations is 'broken'. :-/

After installation. my 'fr.po' looks as follows.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /files/translations/6.x/five8sports/five8sports-.fr.po was not found on this server.</p>
<hr>
<address>Apache Server at ftp.drupal.org Port 80</address>
</body></html>

I can't figure why it's looking for a translation for my profile (five8sports) and how/where to go about fixing this. Here's what my terminal looks like.

renimac:htdocs ren$ drush make --translations=fr --prepare-install five8sports_profile.make 58sports
drupal-6.25 downloaded. [ok]
All translations downloaded for drupal [ok]
 >> five8sports downloaded from blahblah/five8sports.tar.gz. [ok]
 >> admin_menu-6.x-1.8 downloaded. [ok]
 >> module_filter-6.x-1.7 downloaded. [ok]
 >> Project devel contains 3 modules: devel, devel_generate, devel_node_access.
 >> devel-6.x-1.26 downloaded. [ok]
 >> All translations downloaded for five8sports [ok]
 >> Found makefile: five8sports.make [ok]
 >> All translations downloaded for admin_menu [ok]
 >> All translations downloaded for module_filter [ok]
 >> All translations downloaded for devel [ok]
 >>  >> Project fusion contains 3 themes: fusion_starter_lite, fusion_starter, fusion_core.
 >> wysiwyg-6.x-2.4 downloaded. [ok]
 >> fusion-6.x-1.12 downloaded. [ok]
 >> All translations downloaded for wysiwyg [ok]
 >> tooltips-6.x-1.1 downloaded. [ok]
 >> All translations downloaded for fusion [ok]
 >> All translations downloaded for tooltips [ok]
...
xatoo’s picture

Status: Closed (fixed) » Needs review
FileSize
1.65 KB

Here, try this

helmo’s picture

@bisonbleu: Please note the drush_make is now included in drush core >= 5, this module is obsolete beyond drush 4.
Please report in the drush issue queue with an example makefile if the problem persists in 7.x-5.0-rc5

bisonbleu’s picture

Thanks for clarifying @helmo. I went back to drush & drush_make project pages and rRTFM (re-read the fine manuals). Now I get it.

@xatoo, forgive me for my ignorance, the patch in #13 applies to drush_make 6.x-2.x-dev, right ? And hence in the context of drush core 4.5?

Thanks for your help guys. Much appreciated.

p.s. I've used 'pear install drush/drush-5.0.0' to install drush core.

xatoo’s picture

@bisonbleu: Yes indeed. Sorry, I missed the fact that you were running drush 5. Still, the patch will solve the same issue for users running drush 4 with drush_make 2.x.

helmo’s picture

Status: Needs review » Closed (won't fix)

Closing this issue as I doubt anyone will ever commit again to the obsolete drush_make project. See #14