This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Internationalize VS menus/commands #1933
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4271e8d
Added XliffTasks package.
grokys 1ac8fd8
Added zh-CN xlf files.
grokys 7f95625
Added xlf files to crowdin.yml.
grokys a1ebfd8
Updated crowdin.yml.
grokys d34eeba
Merge branch 'master' into i18n-menus
grokys 6de49e9
Added missing extension.
grokys 153eccc
Added preserve_hierachy.
grokys 4b72e64
New translations GitHub.VisualStudio.vsct.zh-CN.xlf (Chinese Simplified)
EditorToolsTranslationBot dba2152
Merge pull request #1932 from github/l10n_i18n-menus
grokys 280c1e2
Added VSPackage.xlf to be translated.
grokys c27ed82
New translations VSPackage.zh-CN.xlf (Chinese Simplified)
EditorToolsTranslationBot 83e5a63
New translations VSPackage.zh-CN.xlf (Chinese Simplified)
EditorToolsTranslationBot 38bdfcb
Merge pull request #1935 from github/l10n_i18n-menus
grokys 13a2995
Added missing attribute.
grokys 0cbfa42
Merge branch 'master' into i18n-menus
grokys bafea53
Fixed merge error.
grokys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
preserve_hierarchy: true | ||
|
||
files: | ||
- source: /src/GitHub.Resources/Resources.resx | ||
translation: /%original_path%/Resources.%locale%.resx | ||
- source: /src/GitHub.VisualStudio/xlf/GitHub.VisualStudio.vsct.zh-CN.xlf | ||
translation: /%original_path%/GitHub.VisualStudio.vsct.%locale%.xlf | ||
- source: /src/GitHub.VisualStudio/xlf/VSPackage.zh-CN.xlf | ||
translation: /%original_path%/VSPackage.%locale%.xlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
207 changes: 207 additions & 0 deletions
207
src/GitHub.VisualStudio/xlf/GitHub.VisualStudio.vsct.zh-CN.xlf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xliff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd"> | ||
<file datatype="xml" source-language="en" target-language="zh-CN" original="../GitHub.VisualStudio.vsct"> | ||
<body> | ||
<trans-unit id="addConnectionCommand|ButtonText"> | ||
<source>&Connect to GitHub</source> | ||
<target xml:lang="zh-CN" state="translated">连接至GitHub(&C)</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="addConnectionCommand|LocCanonicalName"> | ||
<source>.GitHub.ConnectToGitHub</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ConnectToGitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="backCommand|ButtonText"> | ||
<source>Back</source> | ||
<target xml:lang="zh-CN" state="translated">返回</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="backCommand|LocCanonicalName"> | ||
<source>.GitHub.Back</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Back</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="copyLinkCommand|ButtonText"> | ||
<source>Copy link to clipboard</source> | ||
<target xml:lang="zh-CN" state="translated">复制连结到剪贴簿</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="copyLinkCommand|LocCanonicalName"> | ||
<source>.GitHub.CopyLink</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.CopyLink</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="forwardCommand|ButtonText"> | ||
<source>Forward</source> | ||
<target xml:lang="zh-CN" state="translated">转发</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="forwardCommand|LocCanonicalName"> | ||
<source>.GitHub.Forward</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Forward</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="githubCommand|ButtonText"> | ||
<source>View on GitHub</source> | ||
<target xml:lang="zh-CN" state="needs-translation">View on GitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="githubCommand|LocCanonicalName"> | ||
<source>.GitHub.ViewOnGitHub</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ViewOnGitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="goToSolutionOrPullRequestFileCommand|ButtonText"> | ||
<source>Go To Solution/PR File</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Go To Solution/PR File</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="goToSolutionOrPullRequestFileCommand|LocCanonicalName"> | ||
<source>.GitHub.GoToSolutionOrPRFile</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.GoToSolutionOrPRFile</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="helpCommand|ButtonText"> | ||
<source>Help</source> | ||
<target xml:lang="zh-CN" state="translated">帮助</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="helpCommand|LocCanonicalName"> | ||
<source>.GitHub.Help</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Help</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idBlameCommand|ButtonText"> | ||
<source>Blame</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Blame</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idBlameCommand|LocCanonicalName"> | ||
<source>.GitHub.Blame</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Blame</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idCreateGistCommand|ButtonText"> | ||
<source>Create a GitHub Gist</source> | ||
<target xml:lang="zh-CN" state="translated">创建一个GitHub Gist</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idCreateGistCommand|LocCanonicalName"> | ||
<source>.GitHub.CreateGist</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.CreateGist</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idCreateGistEnterpriseCommand|ButtonText"> | ||
<source>Create an Enterprise Gist</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Create an Enterprise Gist</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idCreateGistEnterpriseCommand|LocCanonicalName"> | ||
<source>.GitHub.CreateGistEnterprise</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.CreateGistEnterprise</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idGitHubContextMenu|ButtonText"> | ||
<source>GitHub</source> | ||
<target xml:lang="zh-CN" state="translated">GitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idGitHubContextMenu|CommandName"> | ||
<source>GitHub</source> | ||
<target xml:lang="zh-CN" state="translated">GitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idGitHubToolbar|ButtonText"> | ||
<source>WindowToolBar</source> | ||
<target xml:lang="zh-CN" state="needs-translation">WindowToolBar</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="idGitHubToolbar|CommandName"> | ||
<source>Window Toolbar</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Window Toolbar</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="openFromClipboardCommand|ButtonText"> | ||
<source>Open from clipboard</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Open from clipboard</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="openFromClipboardCommand|LocCanonicalName"> | ||
<source>.GitHub.OpenFromClipboard</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.OpenFromClipboard</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="openFromUrlCommand|ButtonText"> | ||
<source>Open from GitHub...</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Open from GitHub...</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="openFromUrlCommand|LocCanonicalName"> | ||
<source>.GitHub.OpenFromUrl</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.OpenFromUrl</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="openLinkCommand|ButtonText"> | ||
<source>Open on GitHub</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Open on GitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="openLinkCommand|LocCanonicalName"> | ||
<source>.GitHub.OpenLink</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.OpenLink</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="pullRequestCommand|ButtonText"> | ||
<source>Pull Requests</source> | ||
<target xml:lang="zh-CN" state="translated">拉取请求</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="pullRequestCommand|LocCanonicalName"> | ||
<source>.GitHub.PullRequests</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.PullRequests</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="refreshCommand|ButtonText"> | ||
<source>Refresh</source> | ||
<target xml:lang="zh-CN" state="translated">刷新</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="refreshCommand|LocCanonicalName"> | ||
<source>.GitHub.Refresh</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Refresh</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="showCurrentPullRequestCommand|ButtonText"> | ||
<source>Show Current Pull Request</source> | ||
<target xml:lang="zh-CN" state="translated">显示当前推送请求</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="showCurrentPullRequestCommand|LocCanonicalName"> | ||
<source>.GitHub.ShowCurrentPullRequest</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ShowCurrentPullRequest</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="showGitHubPaneCommand|ButtonText"> | ||
<source>GitHub</source> | ||
<target xml:lang="zh-CN" state="translated">GitHub</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="showGitHubPaneCommand|LocCanonicalName"> | ||
<source>.GitHub.ShowGitHubPane</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ShowGitHubPane</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="syncSubmodulesCommand|ButtonText"> | ||
<source>Sync Submodules</source> | ||
<target xml:lang="zh-CN" state="needs-translation">Sync Submodules</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="syncSubmodulesCommand|LocCanonicalName"> | ||
<source>.GitHub.SyncSubmodules</source> | ||
<target xml:lang="zh-CN" state="needs-translation">.GitHub.SyncSubmodules</target> | ||
<note/> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xliff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd"> | ||
<file datatype="xml" source-language="en" target-language="zh-CN" original="../VSPackage.resx"> | ||
<body> | ||
<trans-unit id="110"> | ||
<source>GitHub.VisualStudio</source> | ||
<target xml:lang="zh-CN" state="needs-translation">GitHub.VisualStudio</target> | ||
<note/> | ||
</trans-unit> | ||
<trans-unit id="112" approved="yes"> | ||
<source>A Visual Studio Extension that brings the GitHub Flow into Visual Studio.</source> | ||
<target xml:lang="zh-CN" state="translated">这是一个将GitHub工作流引入Visual Studio的扩展。</target> | ||
<note/> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thanzh-Hans
(which I think is simplified Chinese). Is the documentation on the https://github.com/dotnet/xliff-tasks README wrong?Does Visual Studio support
zh-CN
,zh-Hans
andzh-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 werezh-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.
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
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 thanzh-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.
I'm afraid it doesn't appear to work when the
Chinese (Traditional)
language pack is installed. 😭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 tozh-TW
when using theChinese (Traditional)
language pack. The parents of this appear to bezh-TW -> zh-CHT -> zh-Hant -> zh
.@nguerrera am I correct in thinking that
zh-Hans
andzh-Hant
are treated like completely separate languages? There is no mechanism forzh-Hant
to fall back to usingzh-Hans
?