Skip to content

Commit b775865

Browse files
committed
Fix the fallback path to the l10n folder
If the language server client doesn't specify the location of the l10n folder, then the language server falls back to a path relative to the complied file. This path was wrong; `server.js` is in `./out/server/src/server.js`, so the relative path of the `l10n` folder is `../../../l10n` instead of `../l10n`. Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent eddfce5 commit b775865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/yamlServerInit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class YAMLServerInit {
5959

6060
public async setupl10nBundle(params: InitializeParams): Promise<void> {
6161
const __dirname = path.dirname(__filename);
62-
const l10nPath: string = params.initializationOptions?.l10nPath || path.join(__dirname, '../l10n');
62+
const l10nPath: string = params.initializationOptions?.l10nPath || path.join(__dirname, '../../../l10n');
6363
const locale: string = params.locale || 'en';
6464
if (l10nPath) {
6565
const bundleFile = !fs.existsSync(path.join(l10nPath, `bundle.l10n.${locale}.json`))

0 commit comments

Comments
 (0)