Closed Bug 864200 Opened 11 years ago Closed 11 years ago

use text/plain mime type for attachments with a .lang extension

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: pascalc, Assigned: glob)

Details

Attachments

(1 file)

Files with a .lang extension are plain text files in UTF8 we use on several mozilla projects to store translated text.

Currently, when a localizer attaches a .lang file, he or I have to change manually the file type to text/plain otherwise the text is attached as a application/octet-stream  and cannot be seen online.

Please make the default mime type for .lang files be text/plain (and display them with utf8 encoding if possible), thanks
Attached patch patch v1Splinter Review
this extends typesniffer to first type file extension based guessing (which is quicker and should be more accurate than content-based sniffing), with the ability to supplement/override.
Assignee: nobody → glob
Status: NEW → ASSIGNED
Attachment #740283 - Flags: review?(dkl)
Component: General → Extensions: Other
Comment on attachment 740283 [details] [diff] [review]
patch v1

Review of attachment 740283 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good and works as expected. r=dkl
Attachment #740283 - Flags: review?(dkl) → review+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified extensions/TypeSniffer/Extension.pm
Committed revision 8751.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Component: Extensions: Other → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: