Open JairTorres1003 opened 1 week ago
I want to do this, but there are two things that makes this challenging:
Currently, we look for the package.nls.*.json
s in the web scenario (vscode.dev) by looking for this well known location. What you suggested would help with this... one slight modification... I think my preference would be:
"l10n": {
"package": "./package.nls",
"bundle": "./l10n"
}
so we don't pollute the root of the manifest.
The other problem I believe is that the Extension Marketplace expects package.nls.json
to be next to package.json
and that's another team so we'd have to coordinate that which would take time. Marketplace has a lot on their plate so I don't think this will be possible for them at the moment. cc @isidorn
Thanks for the response, @TylerLeonhardt
I really like the grouping you suggested.
This approach keeps the structure cleaner, which I prefer, as it avoids adding more configurations at the root of the manifest. I also understand the second issue regarding the marketplace and how it might take some time, but overall, this seems like a great solution and I hope it can be implemented when possible.
Thanks for considering this improvement!
Description:
Currently, the
package.nls.json
andpackage.nls.{locale}.json
files are expected to be located in the root of the project for VSCode to properly detect and apply translations. However, for projects with multiple locales, this can result in a large number of translation files cluttering the root directory.Feature Request:
I'd like to propose a feature that allows grouping all
package.nls*.json
files inside a custom folder (e.g.,packages-nls
). Thepackage.json
would still reference these files in the usual way, but with the option to define their location, similar to how thel10n
folder is currently used forbundle.l10n.json
.Example:
Instead of placing all translation files in the root, we could organize them as follows:
And in the
package.json
, we could still use translation keys like this:This way, developers could keep their root directory cleaner while still providing translation files.
Current Behavior:
If the
package.nls*.json
files are moved to a custom folder, VSCode does not recognize keys and extension shows%my-extension.helloWorld.title%