fix: typos and {Lang}

fixes #103
This commit is contained in:
Crawl 2018-11-08 06:31:29 +01:00
parent a3d38e4f83
commit a97defd5e3
No known key found for this signature in database
GPG key ID: E41A6DB922EC2CFE

View file

@ -71,7 +71,10 @@ export default class Acivity implements Disposable {
startTimestamp: window.activeTextEditor && previousTimestamp && workspaceElapsedTime ? previousTimestamp : window.activeTextEditor ? new Date().getTime() : null, startTimestamp: window.activeTextEditor && previousTimestamp && workspaceElapsedTime ? previousTimestamp : window.activeTextEditor ? new Date().getTime() : null,
largeImageKey: largeImageKey ? largeImageKey.image || largeImageKey : 'txt', largeImageKey: largeImageKey ? largeImageKey.image || largeImageKey : 'txt',
largeImageText: window.activeTextEditor largeImageText: window.activeTextEditor
? this._config.get<string>('largeImage')!.replace('{lang}', largeImageKey ? largeImageKey.image || largeImageKey : 'txt').replace('{LANG}', largeImageKey ? (largeImageKey.image || largeImageKey).toUpperCase() : 'TXT') ? this._config.get<string>('largeImage')!
.replace('{lang}', largeImageKey ? largeImageKey.image || largeImageKey : 'txt')
.replace('{Lang}', largeImageKey ? (largeImageKey.image || largeImageKey).toLowerCase().replace(/^\w/, (c: string) => c.toUpperCase()) : 'Txt')
.replace('{LANG}', largeImageKey ? (largeImageKey.image || largeImageKey).toUpperCase() : 'TXT')
|| window.activeTextEditor.document.languageId.padEnd(2, '\u200b') || window.activeTextEditor.document.languageId.padEnd(2, '\u200b')
: this._config.get<string>('largeImageIdle'), : this._config.get<string>('largeImageIdle'),
smallImageKey: debug.activeDebugSession ? 'debug' : env.appName.includes('Insiders') ? 'vscode-insiders' : 'vscode', smallImageKey: debug.activeDebugSession ? 'debug' : env.appName.includes('Insiders') ? 'vscode-insiders' : 'vscode',
@ -123,8 +126,8 @@ export default class Acivity implements Disposable {
.replace('{lang}', largeImageKey ? largeImageKey.image || largeImageKey : 'txt') .replace('{lang}', largeImageKey ? largeImageKey.image || largeImageKey : 'txt')
.replace('{Lang}', largeImageKey ? (largeImageKey.image || largeImageKey).toLowerCase().replace(/^\w/, (c: string) => c.toUpperCase()) : 'Txt') .replace('{Lang}', largeImageKey ? (largeImageKey.image || largeImageKey).toLowerCase().replace(/^\w/, (c: string) => c.toUpperCase()) : 'Txt')
.replace('{LANG}', largeImageKey ? (largeImageKey.image || largeImageKey).toUpperCase() : 'TXT'); .replace('{LANG}', largeImageKey ? (largeImageKey.image || largeImageKey).toUpperCase() : 'TXT');
if (totalLines) raw = raw!.replace('{totalline}', totalLines); if (totalLines) raw = raw!.replace('{totallines}', totalLines);
if (size) raw = raw!.replace('{filsize}', size); if (size) raw = raw!.replace('{filesize}', size);
if (currentLine) raw = raw!.replace('{currentline}', currentLine); if (currentLine) raw = raw!.replace('{currentline}', currentLine);
if (currentColumn) raw = raw!.replace('{currentcolumn}', currentColumn); if (currentColumn) raw = raw!.replace('{currentcolumn}', currentColumn);