question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow partial string replacement in package.json/package.nls.json, to ease translations of strings containing markdown

See original GitHub issue

Currently, 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:open
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dbaeumercommented, Jan 26, 2022

Adding @TylerLeonhardt since he know owns translation.

@TylerLeonhardt I can assist with this if necessary.

1reaction
sean-mcmanuscommented, Jan 25, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Localized descriptions for built-in extensions and their settings ...
For all our built-in extensions, we have the package-nls.json such that extension and settings descriptions are localized.
Read more >
Localization Resource Files Parsing Behavior
Standard behavior. Smartling will automatically extract strings from almost all standard localization resource files without any special direction.
Read more >
Bug listing with status CONFIRMED as at 2023/01/01 18:46:32
Allow packages to be simultaneously installed." status:CONFIRMED resolution: severity:enhancement · Bug:44706 - "media-sound/wxMusik (new ebuild)" ...
Read more >
Issues Addressed in SAS 9.4 (TS1M7) - Fix List
Issue(s) Addressed: Introduced: 64842, SAS ® 9.4 software references Apache Struts libraries that contain known vulnerabilities
Read more >
10/27: nls: Update 'pl' translations. - GNU mailing lists
It contains packages that the sysadmin\n" +"wants to be globally ... +msgid "Enable" +msgstr "" -#: guix/scripts/substitute.scm:257 -# ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found