Last Comment Bug 864200 - use text/plain mime type for attachments with a .lang extension
: use text/plain mime type for attachments with a .lang extension
Classification: Other
Component: Extensions: Other (show other bugs)
: Production
: All All
-- normal (vote)
: ---
Assigned To: Byron Jones ‹:glob›
Depends on:
  Show dependency treegraph
Reported: 2013-04-21 17:26 PDT by Pascal Chevrel:pascalc
Modified: 2013-04-23 00:36 PDT (History)
5 users (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---

patch v1 (1.80 KB, patch)
2013-04-22 07:13 PDT, Byron Jones ‹:glob›
dkl: review+
Details | Diff | Splinter Review

Description User image Pascal Chevrel:pascalc 2013-04-21 17:26:34 PDT
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
Comment 1 User image Byron Jones ‹:glob› 2013-04-22 07:13:08 PDT
Created attachment 740283 [details] [diff] [review]
patch v1

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.
Comment 2 User image David Lawrence [:dkl] 2013-04-22 12:33:20 PDT
Comment on attachment 740283 [details] [diff] [review]
patch v1

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

Looks good and works as expected. r=dkl
Comment 3 User image Byron Jones ‹:glob› 2013-04-23 00:36:02 PDT
Committing to: bzr+ssh://
modified extensions/TypeSniffer/
Committed revision 8751.

Note You need to log in before you can comment on or make changes to this bug.