Closed Bug 511094 Opened 16 years ago Closed 10 years ago

FTP directory listing have hardcoded files size preventing localisation

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dwayne, Unassigned)

Details

Problem: The directory listing for an FTP site uses hardcoded values for the file size Reproduce: 1) Visit ftp://ftp.is.co.za/mirrors/OpenOffice/stable/3.1.0/ (or any FTP site) using an Afrikaans (or other) localised Firefox. 2) Observer the files sizes are NNNNN KB Expected: The files sizes are: NNNNNNN KG Further info: If you view this code: http://mxr.mozilla.org/mozilla-central/source/netwerk/streamconv/converters/nsIndexedToHTML.cpp#1027 it seems that " KB" is hardcoded. Elsewhere the listing is pulling in correct locale formats for dates and times, so we assume that the intention is to localise. This hardcoded entry makes it impossible to to translate this correctly. Also there is an assumption made here that "%d KB" is the way that a locale writes such things. Recommendation: 1) Pull the " KB" string into necko.properties so that it can be localised 2) Change the string to "%d KB" so that the placement of the number can be adapted by a localiser.
This might need pluralization, too. Not sure if it's worth rewriting this in JS, as we don't have a C++ API for that.
(In reply to comment #1) > This might need pluralization, too. Maybe not. English doesn't: 1 KB, 2 KB, etc. So maybe others don't either in this context. > Not sure if it's worth rewriting this in JS, as we don't have a C++ API for > that. That sounds like a lot of work. I think ordering and aslo localising the number display (1000 -> 1,000 KB) would be of more value and probably easier then plurals.
this is the kind of thing that I'm going to wontfix because ftp is a legacy protocol now - we aren't taking feature enhancements for it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.