-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
Use the `zh-CN` file as the source, and upload it to crowdin as `/GitHub.VisualStudio.xlf` as advised by Andriy Poznakhovskyy at crowdin.
New Crowdin translations
New Crowdin translations
Crowdin seems to have removed this attribute, which causes an NRE in XliffTasks. Added it back in by hand for now and reported this to crowdin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Just a question about zh-CN
, zh-Hans
and zh-Hant
.
@@ -17,6 +18,7 @@ | |||
<VsixType>v3</VsixType> | |||
<IsProductComponent>false</IsProductComponent> | |||
<ExtensionInstallationFolder>GitHub\GitHub</ExtensionInstallationFolder> | |||
<XlfLanguages>zh-CN</XlfLanguages> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice you've specified zh-CN
here rather than zh-Hans
(which I think is simplified Chinese). Is the documentation on the https://github.com/dotnet/xliff-tasks README wrong?
XlfLanguages
- The set of locales to which the project is localized. Defaults to the thirteen locales supported by Visual Studio:cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant
.
Does Visual Studio support zh-CN
, zh-Hans
and zh-Hant
? 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm... not sure. The original PR had zh-HANS
translations, but then when it was re-done in #1888, the translations that came from crowdin were zh-CN
and this seems to work fine.
As for which is correct, I'm afraid I don't know enough about internationalization or Chinese in particular to say. I've tried googling and I'm not the wiser ;)
As I say, it seems to work fine, so ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://twitter.com/jcansdale/status/1042490984892903424
Is it okay to use zh-CN instead of zh-Hans/zh-Hant in Visual Studio?
The resource manager will probe based on CurrentUICulture from a culture through its parents:
For zh-CN, this goes zh-CN -> zh-CHS -> zh-Hans.
This means, for example that if CurrentUICulture is zh-CN, then it will use zh-Hans resources, but not vice versa. It might be the case that VS always sets CurrentUICulture to zh-CN when using Chinese (Simplified) language pack, in which case it would work to use zh-CN, but I am not certain of that. If that isn't true, then using zh-CN will not work in all cases.
In the end, there are just two possible choices for VS language packs:
And their descriptions align to zh-Hans and zh-Hant
> using System.Globalization;
> new CultureInfo("zh-Hans").DisplayName
"Chinese (Simplified)"
> new CultureInfo("zh-Hant").DisplayName
"Chinese (Traditional)"
So I would suggest lining up with that and just using zh-Hans and zh-Hant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maikebing when you submitted the latest round of translations from crowdin using zh-CN
rather than zh-Hans
, was there a reason for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that CultureInfo.CurrentUICulture
is set to zh-TW
when using the Chinese (Traditional)
language pack. The parents of this appear to be zh-TW -> zh-CHT -> zh-Hant -> zh
.
@nguerrera am I correct in thinking that zh-Hans
and zh-Hant
are treated like completely separate languages? There is no mechanism for zh-Hant
to fall back to using zh-Hans
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall question: src/GitHub.VisualStudio/xlf/GitHub.VisualStudio.vsct.zh-CN.xlf
Is that then a separate file that is looking for Connect to GitHub
in the original code and translating it appropriately to what is in this file if the user has this language set?
@sguthals yes, |
@grokys https://crowdin.com/project/github-visual-studio was not created by me, nor can I add a language! |
Their content is consistent, but the former is simple. The latter is a complex formulation |
Ah so it was @StanleyGoldman who created the language with @maikebing so I assume we should be using |
Chinese (Traditional) need to re-translate and revise the grammar, Simplified Chinese (zh-Hans) is not fully applicable to traditional Chinese (zh-Hant). So I propose to change zh_CN to Simplified Chinese (zh-hans), after adding zh-Hant, I will translate and solicit the views of Hong Kong and Taiwan users as soon as possible. |
@maikebing thanks! Will we be OK for this release shipping with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this will generally work for users in Mainland China (zh-CN
) but not Hong Kong and Taiwan (zh-TW
). It would be interesting to know if activity changes at all between the two groups (translated and un-translated)!
@maikebing excellent! Thanks so much for your help on this, I'm afraid our team's lack of knowledge of internationalization has really been showing ;) |
Yea, I had no idea what I was doing when I was setting up CrowdIn. I was more concerned with the automatic integration and figured we would get the languages correct as we went along. Thanks @maikebing. |
Use https://github.com/dotnet/xliff-tasks to translate
GitHub.VisualStudio.vsct
andVSPackage.resx
using.xlt
files.This should make all menus installed by the extension appear translated. A good way to test if this is working is to check the "Connect to GitHub" menu in the Team Explorer Connect Pane:
Includes a partial translation in
zh-CN
, @maikebing if you could take a look at the current state of translations on crowdin and approve/update the missing translations, that would be great!