When clicking on a Drupal core translation file at http://localize.drupal.org/download the translation file is opened in the web browser (tested with Firefox, Safari and Chrome). This behavior is unexpected and not good, because the user expects a download to start. We actually force the user to save the file from a browser window, which might cause all kinds of further problems...

This problem was also mentioned in #882164: Adding a language help page during installation is incorrect comment #89.

I think the PHP header() function could make it work to force the downloading of .po files. But I am not sure...

Comments

Gábor Hojtsy’s picture

Title: Force file downloads on new downloads page » .po files are not served as downloads
Project: Drupal.org site moderators » Drupal.org infrastructure
Component: Localize.drupal.org » File server

This is in fact controlled in the HTTP server that is running on ftp.drupal.org. These files are not at all served from PHP. There is even no PHP running on that server that I know. Moving to the right queue.

nnewton’s picture

Assigned: Unassigned » nnewton

This is a mime type issue. I'll have to open an issue with the OSL as its their FTP infrastructure.

-N

Gábor Hojtsy’s picture

Thanks, perfect!

juan_g’s picture

A quick fix, maybe temporary, could be to add a brief note like "Right click and select Save link as... or Save target as..."

Gábor Hojtsy’s picture

I think this works well now for most languages, right?

juan_g’s picture

For .po files, left-click download works on IE8, but we need right-click on Firefox 3.6.10 and Chrome.

Gábor Hojtsy’s picture

Just marked #1061336: Encoding of .po -files a duplicate of this issue which was highly related. Here is the text:

It seems ftp.drupal.org does not add any encoding headers for .po files. The files are in UTF-8 but if you open one in browser all non-ASCII characters are messed up. This also seems to cause problems with some users who are downloading the files. I haven't had any problems myself, but there are multiple people complaining about this in Finnish at the Finnish translation group. The problem is very easy to recreate and should be just as easy to fix in Apache config. For example have a look at http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.0.fi.po - Should have plenty of umlauts (ä and ö) in it.

killes@www.drop.org’s picture

I've opened a ticked with OSL for this ([support.osuosl.org #18499] ).

killes@www.drop.org’s picture

Status: Active » Needs review

OSL has modified this, seems to work for me.

reglogge’s picture

Status: Needs review » Needs work

I'm still getting the mis-encoded file displayed in a browser window in Safari 5.0.3/Mac. In Firefox, Chrome and IE8 it works correctly now (I'm getting a prompt for downloading the file).

killes@www.drop.org’s picture

Hmm, yeah, so we file a patch against Safari? :p

eliza411’s picture

Assigned: nnewton » Unassigned

Verified that the .po files are still opening in Safari. I'm going to unassign this from nnewton for now so that someone else might pick it up.

Mixologic’s picture

Assigned: Unassigned » basic
Issue summary: View changes

basic/nnewton both have reach into OSL to see about getting this fixed. - Assigning.

Component: File server » Servers
basic’s picture

Status: Needs work » Fixed

This appears to have been resolved with the migration to Fastly and Nginx for ftp.drupal.org, hooray!

Status: Fixed » Closed (fixed)

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