Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Status bar mode label weirdly capitalized; uses unfriendly names #1826

Closed
peterflynn opened this issue Oct 12, 2012 · 10 comments
Closed

Status bar mode label weirdly capitalized; uses unfriendly names #1826

peterflynn opened this issue Oct 12, 2012 · 10 comments
Assignees

Comments

@peterflynn
Copy link
Member

  1. Open a .js file in Brackets
  2. Open a plain text file

Result:
1: status bar says "javascript" (all lowercase)
2: status bar says "text/plain"

Expected:
1: "JavaScript" (properly capitalized)
2: "Text" or "Plain text" (more user friendly than a raw mimetype)

Other editors like Sublime and TextMate follow the expected pattern.

@njx
Copy link

njx commented Oct 12, 2012

I don't think this should block DoD of the tabs-to-spaces story, since this is essentially a bonus feature that we got with the status bar. However, we should probably fix it before the next Edge Code drop since it's pretty visible. Marking Sprint 16.

@njx
Copy link

njx commented Oct 12, 2012

(Another option would be to temporarily remove the mode indicator from the status bar for the Edge Code drop.)

@ghost ghost assigned redmunds Oct 15, 2012
@pthiess
Copy link
Contributor

pthiess commented Oct 15, 2012

Assigned to Randy

@redmunds
Copy link
Contributor

I also notice weird behavior for .json mode. It seems to do nothing and continue to display the mode of the previous file.

UPDATE: I fixed problem with JSON and other modes. Function editor.getModeForSelection() can return either a string or an Object, but code was assuming it was always a string.

@RaymondLim
Copy link
Contributor

FBNC to @peterflynn

@ghost ghost assigned peterflynn Oct 26, 2012
@peterflynn
Copy link
Member Author

This is definitely an improvement, though I'm still seeing many files show names that are odd or incorrectly capitalized:

  • .json files show as "Json"; should be "JSON"
  • .coffee shows as "Coffescript"; should be "CoffeeScript"
  • .cpp files show as "C++src"
  • .c, .h show "Csrc"
  • .cs shows as "Csharp"
  • .yaml shows as "Yaml"; should be "YAML"
  • .sql shows as "Mysql"

To really solve this I think we'll just need a hand-written mapping from mode to user-friendly string, rather than programmatic heuristics. But that can probably wait until this story: https://trello.com/card/api-for-extensions-to-add-new-language-syntax-coloring-mode/4f90a6d98f77505d7940ce88/639

@peterflynn
Copy link
Member Author

Also, I still think the default mode's "Text" label should be localized...

@redmunds
Copy link
Contributor

@peterflynn there's already a mapping, so it's easy to add any of these others.

@peterflynn
Copy link
Member Author

Looks ok enough for now. I had a few other ideas for cleanup in this area that maybe we could tackle when we get around to #1869.

@DennisKehrig
Copy link
Contributor

#2844 uses the language API for that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants