microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.04k stars 28.8k forks source link

Add way to set ID for a localization string? #193738

Open jruales opened 1 year ago

jruales commented 1 year ago

Currently, each string is assigned an ID based on a hash of the English string and the comment. The problem with this is that any small change to a string or its comment will change the ID, requiring a new translation from scratch. It might be good to allow the user to specify an ID to use for a given English string. That way, if the user makes a small change to the English string, the ID will remain the same, and the translator will be able to use the old translation as a basis for the new translation, only changing the small part that was modified in the English string.

rudyflores commented 6 months ago

@TylerLeonhardt any updates on the work for this issue? My team is looking into migrating from the old i18n but we can't do a migration unless keys are able to be provided instead of using English natural text for translation.

ehbales commented 5 months ago

I agree with the points made by @rudyflores. Another factor to consider regarding this issue is that the same text is sometimes displayed in multiple ways to the user, such as for tooltips and aria labels. Therefore, duplications are require for some strings.

Curious as to why https://github.com/microsoft/vscode-nls/issues was deprecated since that does seem to include the needed support.

Thanks for considering support for key IDs!

RichardLuo0 commented 1 month ago

Any updates on this? I can't believe this can take that long. I can't use l10n because of this.