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

add zh cn translation #3074

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

add zh cn translation #3074

wants to merge 8 commits into from

Conversation

xgdgsc
Copy link
Contributor

@xgdgsc xgdgsc commented Sep 16, 2022

Fixes #2041 .

@pfitzseb
Copy link
Member

Very cool!
Is there a writeup of this somewhere in the VS Code docs? I'm kinda curious about how localizing other strings works.

@xgdgsc
Copy link
Contributor Author

xgdgsc commented Sep 16, 2022

https://github.com/microsoft/vscode-nls official one lacks doc, and there's a third party one https://github.com/axetroy/vscode-nls-i18n

@davidanthoff
Copy link
Member

Very nice! Two questions:

  1. Can the translation files be moved into a sub folder? Root is already pretty busy and this has the potential to add a lot more files, right?
  2. What happens if we add a new command and don't provide a translation for a given language? Will it automatically fall back to English? Primarily I'm wondering what the process would look for someone who wants to add a new feature but is not familiar with some of the languages that are supported in the extension. Can someone like that just add something in English and everything will work?

I think the final question is how we would maintain this long term. @xgdgsc do you plan to keep updating this and tracking new additions to the extension and then translating them?

@xgdgsc
Copy link
Contributor Author

xgdgsc commented Sep 18, 2022

  1. https://github.com/microsoft/vscode-extension-samples/tree/main/i18n-sample found a sample of subfolder.
  2. It would auto fallback to English.
  3. I would like to maintain the zh cn translation in long term.

@xgdgsc
Copy link
Contributor Author

xgdgsc commented Sep 27, 2022

I couldn' t get the subfolder working because I didn' t find how ISO 639-3 works for simplified chinese.

@xgdgsc
Copy link
Contributor Author

xgdgsc commented Sep 28, 2022

Found an example https://github.com/microsoft/vscode-cmake-tools/tree/main/i18n , which requires gulp. But the translation doesn' t appear on my computer.

@xgdgsc
Copy link
Contributor Author

xgdgsc commented Sep 29, 2022

Found the bug in cmake tools repo that cause zh-cn translation not showing. Is it necessary to use the subfolder? I find that approach an additional complexity. The nls files are generated from the subfolder to the root folder anyway.

I found python extension uses a more sophisticated approach which also doesn' t work.

@pfitzseb
Copy link
Member

I don't mind these being in /. Let's merge this, @davidanthoff?

@xgdgsc
Copy link
Contributor Author

xgdgsc commented May 18, 2023

I find the flat modern UI with no icon so hard to locate menu items. After some time of using, I feel the translation is not for the meaning of words (which should be very easy for current julia users here), but for quickly locating of desired command item through a glimpse with Chinese charaters acting as icons. Hope these get merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for localization
3 participants