Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show original english command names next to translated ones for extension (vscode-nls) command names #17549

Closed
WebFreak001 opened this issue Dec 19, 2016 · 6 comments
Assignees
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality l10n-platform Localization platform issues (not wrong translations) verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@WebFreak001
Copy link

Right now it doesn't seem to be possible to show the grayed out english command names next to the translated ones for extensions. I want to achieve the same effect as the built-in commands like in this picture:

https://i.webfreak.org/fcTnES.png
(Top command is how it currently looks, bottom command is the kind of style I want to achieve)

I checked the markdown extension because it has internationalization too but on there it's only the translated command too.

@egamma egamma added the extensions Issues concerning extensions label Dec 19, 2016
@dbaeumer
Copy link
Member

Currently we replace the %...% place holder with the translated string when reading the package.json file. To implement this we would need to read the package.nls.json file as well and add an additional property to the literal to store the English version of the strings as well. Something like _${key}_original_value. Then the code that processes the command contributions could look for the original value and store it with the command object.

@alexandrudima this sounds a little hacky but I have no other idea how to pass the information to the actual place were we process a contribution. Do you have a better idea?

@dbaeumer dbaeumer added feature-request Request for new features or functionality l10n-platform Localization platform issues (not wrong translations) labels Dec 20, 2016
@WebFreak001
Copy link
Author

Maybe add another value? Like keeping title in english and then adding a separate "translated_title": "%...%"

@dbaeumer
Copy link
Member

dbaeumer commented Mar 2, 2017

The code to look at is \src\vs\platform\extensionManagement\node\extensionManagementService.ts

@michelkaporin do you want to take a step at it when we are done with the translation work (xlf)

@michelkaporin
Copy link
Contributor

@dbaeumer Yes, I think I can take it after xlf work.

@dbaeumer
Copy link
Member

dbaeumer commented Mar 2, 2017

Cool.

@isidorn
Copy link
Contributor

isidorn commented Mar 30, 2017

Seems to work fine -> verified
screen shot 2017-03-30 at 15 23 00

@isidorn isidorn added the verified Verification succeeded label Mar 30, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality l10n-platform Localization platform issues (not wrong translations) verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants