From 1921c286369cff565a6d127d7c2ef5be54264569 Mon Sep 17 00:00:00 2001 From: Juha Ristolainen Date: Fri, 24 Mar 2017 08:40:33 +0000 Subject: [PATCH] Default to langId if not a manually mapped name. Added Elixir and Elm to mapped language names. --- CHANGELOG.md | 4 ++++ README.md | 5 +++++ package.json | 2 +- src/utils.ts | 4 +++- src/xp-counter.ts | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c04494a..c9dafe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 17db009..42fd62f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 40866e9..e5b6722 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/utils.ts b/src/utils.ts index 78746ee..35fc6f2 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -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; } diff --git a/src/xp-counter.ts b/src/xp-counter.ts index aa8ec7b..ef18226 100644 --- a/src/xp-counter.ts +++ b/src/xp-counter.ts @@ -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));