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

@ -6,6 +6,10 @@ All notable changes to the "code-stats-vscode" extension will be documented in t
### Changed
## [1.0.6] - 2017-03-24
### Changed
Changed the plugin to default to just langId if the langId is not found in the mapped language names.
Added Elm and Elixir to mapped names.
## [1.0.5] - 2017-03-18
### Changed

View File

@ -18,6 +18,11 @@ This extension contributes the following settings:
## Release Notes
### 1.0.6
Changed to return just the langId if not found in the mapped languages names.
Added Elm and Elixir to the mapped names.
### 1.0.5
Changed language names to reflect the ones already used in Code::Stats.

View File

@ -2,7 +2,7 @@
"name": "code-stats-vscode",
"displayName": "Code::Stats",
"description": "Code::Stats package for Visual Studio Code",
"version": "1.0.5",
"version": "1.0.6",
"publisher": "juha-ristolainen",
"icon": "logo.png",
"repository": {

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));