mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-09 10:22:55 +02:00
#641 - file parse
This commit is contained in:
+3
-1
@@ -18,7 +18,9 @@
|
||||
- [#633](https://github.com/estruyf/vscode-front-matter/issues/633): Fix custom taxonomy used as single value
|
||||
- [#634](https://github.com/estruyf/vscode-front-matter/issues/634): Fix public folder processing in case of Hexo
|
||||
- [#635](https://github.com/estruyf/vscode-front-matter/issues/635): Fix UI themes make some links hard to discover or see
|
||||
- [#636](https://github.com/estruyf/vscode-front-matter/issues/636): Fix UI themes make some links hard to discover or see
|
||||
- [#636](https://github.com/estruyf/vscode-front-matter/issues/636): Fix media browser lightbox background color
|
||||
- [#641](https://github.com/estruyf/vscode-front-matter/issues/641): Fix file parsing of the localization file
|
||||
|
||||
|
||||
## [9.0.0] - 2023-08-21 - [Release notes](https://beta.frontmatter.codes/updates/v9.0.0)
|
||||
|
||||
|
||||
+3
-2
@@ -4,7 +4,7 @@ import { COMMAND_NAME, TelemetryEvent } from './constants';
|
||||
import { MarkdownFoldingProvider } from './providers/MarkdownFoldingProvider';
|
||||
import { TagType } from './panelWebView/TagType';
|
||||
import { PanelProvider } from './panelWebView/PanelProvider';
|
||||
import { DashboardSettings, debounceCallback, Logger, Settings as SettingsHelper } from './helpers';
|
||||
import { DashboardSettings, debounceCallback, Logger, parseWinPath, Settings as SettingsHelper } from './helpers';
|
||||
import ContentProvider from './providers/ContentProvider';
|
||||
import { PagesListener } from './listeners/dashboard';
|
||||
import { DataListener, SettingsListener } from './listeners/panel';
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
StatusListener,
|
||||
Chatbot
|
||||
} from './commands';
|
||||
import { join } from 'path';
|
||||
|
||||
let frontMatterStatusBar: vscode.StatusBarItem;
|
||||
let statusDebouncer: { (fnc: any, time: number): void };
|
||||
@@ -45,7 +46,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
// Make sure the EN language file is loaded
|
||||
if (!vscode.l10n.uri) {
|
||||
l10n.config({
|
||||
fsPath: vscode.Uri.parse(`${extensionPath}/l10n/bundle.l10n.json`).fsPath
|
||||
fsPath: vscode.Uri.file(join(parseWinPath(extensionPath), `/l10n/bundle.l10n.json`)).fsPath
|
||||
});
|
||||
} else {
|
||||
l10n.config({
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { Uri, l10n } from 'vscode';
|
||||
import { Extension, Logger } from '../helpers';
|
||||
import { Extension, Logger, parseWinPath } from '../helpers';
|
||||
import { readFileAsync } from './readFileAsync';
|
||||
import { join } from 'path';
|
||||
|
||||
export const getLocalizationFile = async () => {
|
||||
try {
|
||||
const localeFilePath =
|
||||
l10n.uri?.fsPath ||
|
||||
Uri.parse(`${Extension.getInstance().extensionPath}/l10n/bundle.l10n.json`).fsPath;
|
||||
Uri.file(join(parseWinPath(Extension.getInstance().extensionPath.fsPath), `/l10n/bundle.l10n.json`)).fsPath;
|
||||
|
||||
const fileContents = await readFileAsync(localeFilePath, 'utf-8');
|
||||
return fileContents;
|
||||
|
||||
Reference in New Issue
Block a user