Default to langId if not a manually mapped name.

Added Elixir and Elm to mapped language names.
This commit is contained in:
Juha Ristolainen
2017-03-24 08:40:33 +00:00
parent 574fa9f2e4
commit 1921c28636
5 changed files with 14 additions and 3 deletions

View File

@ -33,6 +33,8 @@ export function getLanguageName(langId: string): string {
"css": "CSS",
"diff": "Diff",
"dockerfile": "Docker",
"elixir": "Elixir",
"elm": "Elm",
"fsharpcss": "F#",
"git-commit": "Git",
"git-rebase": "Git",
@ -79,7 +81,7 @@ export function getLanguageName(langId: string): string {
let languageName: string = languageNames[langId];
if (languageName === null || languageName === undefined) {
return "Plain text";
return langId;
}
return languageName;
}

View File

@ -18,7 +18,7 @@ export class XpCounter {
constructor() {
this.pulse = new Pulse();
/*
/* // print out supported language names
let allLanguages = languages.getLanguages().then(
(result => {
console.log(JSON.stringify(result));