Comments (4)
For extensions there is a vscode-nls-dev package that helps with managing the files. This has support as well to bundle all strings into one file. See https://github.com/microsoft/vscode-nls/blob/main/src/common/common.ts#L8.
The vscode-nls-dev package also generates a single meta data file containing all English strings and their corresponding keys. The file is called nls.metadata.json
.
from vscode-nls.
@dbaeumer Thanks for your response. I think vscode-nls-dev is to transform all files under i18n folder to meta data file under 'out' file. So according to my understanding, the meta data file is only for running the extension after building the extension. But the strings under i18n folder which is like the source to manage is still distributed in different files. For example, when you add a new string in code, you need to add it to i18n folder and when bug exist, you need to find in all these files under the locale folder.
Same to the English strings, the meta data file contains all English strings but it's generated by vscode-nls-dev, the original English word is somehow hardcoded in code instead of referenced from a single file.
from vscode-nls.
@HuihuiWu-Microsoft as I said in my previous post you can either have single files or one bundle (https://github.com/microsoft/vscode-nls/blob/main/src/common/common.ts#L8.)
vscode-nls-dev
extracts strings from the source and generates English files to be translated. vscode-nls
allows to use different languages during runtime.
from vscode-nls.
Without the additional information we can't work on this issue. Please ping when the information is available and we will reopen the issue.
Happy Coding
from vscode-nls.
Related Issues (20)
- Add documentation about localization inside `package.json` HOT 4
- Link to extraction tools in README.md is broken HOT 1
- The module should read VSCODE_NLS_CONFIG if no config is provided.
- Catched an error in \lib\main.js at resolveLanguage(file) due to lack of main.nls.en.json
- Fallback to EN translations HOT 1
- extension i18n problem HOT 1
- Missing usage document HOT 6
- bundleMetadataFiles on windows, uses backslashes in module names HOT 4
- Use fs.readFile instead of require HOT 1
- Bundled nls doesn't work HOT 5
- Support locale and language when initializing from VSCODE_NLS_CONFIG
- localize calls cache the locale HOT 1
- Can't write corrupted.info file HOT 5
- Write some documentation HOT 1
- The default branch has been renamed from 'master' to 'main'
- Failed to load message bundle. See console for details. HOT 3
- Regression when bundling this library HOT 2
- While running in target web, I get Error: Cannot find module 'fs' HOT 1
- Module not found: Can't resolve 'vscode-nls-web-data'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-nls.