Allow partial string replacement in package.json/package.nls.json, to ease translations of strings containing markdown
See original GitHub issueCurrently, various strings in package.json can be replaced with keys that refer to strings in package.nls.json. This enables localization of those strings (using vscode-nls and vscode-nls-dev, which generates package.*.nls.json for each language translation.)
Currently, only whole string replacement is supported. For example:
In package.json:
"description": "%key%"
In package.nls.json:
"key": "description string"
… works as expected. However using the following in package.json does not:
"description": "blah %key% blah"
… The resulting string is: blah %key% blah
.
This is a request to support this scenario, and resolve this string as blah description string blah
.
We have some strings that contain markdown. (i.e. strings passed to markdownDescription
properties). However, our localization team is not necessary savvy with markdown. vscode-nls-dev has been updated to allow hints/comments to be specified in package.nls.json. However, indicating that a string contain markdown does not appear to have been sufficient to educate our localization team to avoid breaking the markdown syntax.
This is a request to enable localization of markdown strings without corrupting the markdown, by allowing us to expose for localization only the portions of the strings that do not contain markdown. This seems a relatively simple fix, whereas having translators become proficient in markdown is not as simple.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Adding @TylerLeonhardt since he know owns translation.
@TylerLeonhardt I can assist with this if necessary.
@GitMensch I’m not sure what “pings” you’re referring to. Our team is still hitting problems in which the translators are breaking our markdown strings on a widespread basis, leading to like 50+ separate loc bugs having to be filed. So we’d like to be able to use
{}
replacements.