messages not found in bundle
aeschli opened this issue · 1 comments
aeschli commented
The language bundle for the VS Code HTML extension looks like that:
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the MIT License. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"version": "1.0.0",
"contents": {
"bundle": {
"\"store\" a boolean test for later evaluation in a guard or if().": "„store“ i.e. Speichern eines booleschen Tests für die spätere Auswertung in einem Wächter oder if().",
"'from' expected": "„from2 erwartet",
"'in' expected": "„in“ erwartet",
"'through' or 'to' expected": "„through“ oder „to“ erwartet"
...
},
"package": {
...
}
}
- I get the location of the file with
l10n.uri?.toString()
, I pass it to the HTML language server - The language server reads the file (workaround for #81), and passes it to
config
const contents = await (await fs.readFile(uri.fsPath)).toString();
l10n.config({ contents });
- no strings are found
Problem is that l10n looks up the strings in the root, not contents.bundle
Line 58 in 984af51
- same when loading from the file or URI
TylerLeonhardt commented
This is released. Feel free to bump your language server.