Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Status bar mode label weirdly capitalized; uses unfriendly names #1780

Open
core-ai-bot opened this issue Aug 29, 2021 · 10 comments
Open

Comments

@core-ai-bot
Copy link
Member

Issue by peterflynn
Friday Oct 12, 2012 at 20:53 GMT
Originally opened as adobe/brackets#1826


  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.

@core-ai-bot
Copy link
Member Author

Comment by njx
Friday Oct 12, 2012 at 23:49 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by njx
Friday Oct 12, 2012 at 23:49 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Monday Oct 15, 2012 at 18:01 GMT


Assigned to Randy

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Oct 23, 2012 at 21:26 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Thursday Oct 25, 2012 at 23:19 GMT


FBNC to@peterflynn

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Oct 31, 2012 at 20:13 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Oct 31, 2012 at 20:13 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Oct 31, 2012 at 20:17 GMT


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

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Thursday Nov 01, 2012 at 19:52 GMT


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.

@core-ai-bot
Copy link
Member Author

Comment by DennisKehrig
Wednesday Feb 13, 2013 at 16:35 GMT


#2844 uses the language API for that

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

No branches or pull requests

1 participant