Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit fcad270

Browse files
authored
Merge pull request #1933 from github/i18n-menus
Internationalize VS menus/commands
2 parents 3f90793 + bafea53 commit fcad270

File tree

6 files changed

+266
-0
lines changed

6 files changed

+266
-0
lines changed

crowdin.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
preserve_hierarchy: true
2+
13
files:
24
- source: /src/GitHub.Resources/Resources.resx
35
translation: /%original_path%/Resources.%locale%.resx
6+
- source: /src/GitHub.VisualStudio/xlf/GitHub.VisualStudio.vsct.zh-CN.xlf
7+
translation: /%original_path%/GitHub.VisualStudio.vsct.%locale%.xlf
8+
- source: /src/GitHub.VisualStudio/xlf/VSPackage.zh-CN.xlf
9+
translation: /%original_path%/VSPackage.%locale%.xlf

nuget.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<configuration>
33
<packageSources>
44
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
5+
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
56
<add key="Custom Packages for GHfVS" value="lib" />
67
</packageSources>
78
<activePackageSource>

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
3+
<Import Project="..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.props" Condition="Exists('..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.props')" />
34
<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.props" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.props')" />
45
<Import Project="..\..\packages\LibGit2Sharp.NativeBinaries.1.0.164\build\LibGit2Sharp.NativeBinaries.props" Condition="Exists('..\..\packages\LibGit2Sharp.NativeBinaries.1.0.164\build\LibGit2Sharp.NativeBinaries.props')" />
56
<PropertyGroup>
@@ -11,6 +12,7 @@
1112
<VsixType>v3</VsixType>
1213
<IsProductComponent>false</IsProductComponent>
1314
<ExtensionInstallationFolder>GitHub\GitHub</ExtensionInstallationFolder>
15+
<XlfLanguages>zh-CN</XlfLanguages>
1416
<NuGetPackageImportStamp>
1517
</NuGetPackageImportStamp>
1618
</PropertyGroup>
@@ -861,8 +863,40 @@
861863
<Error Condition="!Exists('..\..\packages\Microsoft.VisualStudio.SDK.Analyzers.15.8.33\build\Microsoft.VisualStudio.SDK.Analyzers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VisualStudio.SDK.Analyzers.15.8.33\build\Microsoft.VisualStudio.SDK.Analyzers.targets'))" />
862864
<Error Condition="!Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.props'))" />
863865
<Error Condition="!Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.targets'))" />
866+
<Error Condition="!Exists('..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.props'))" />
867+
<Error Condition="!Exists('..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.targets'))" />
864868
</Target>
865869
<Import Project="..\..\packages\SQLitePCL.raw_basic.0.7.3.0-vs2012\build\net45\SQLitePCL.raw_basic.targets" Condition="Exists('..\..\packages\SQLitePCL.raw_basic.0.7.3.0-vs2012\build\net45\SQLitePCL.raw_basic.targets')" />
870+
<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.0.26201\build\Microsoft.VSSDK.BuildTools.targets" Condition="'$(VisualStudioVersion)' == '15.0' And Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.0.26201\build\Microsoft.VSSDK.BuildTools.targets')" />
871+
<Import Project="..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.targets" Condition="'$(VisualStudioVersion)' == '14.0' And Exists('..\..\packages\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.14.0.215\build\Microsoft.VisualStudio.Sdk.BuildTasks.14.0.targets')" />
872+
<!--
873+
This is a workaround for allowing neutral CTO resource produced from *.vsct to go in the main assembly.
874+
We move the neutral *.cto file to be categorized as WithCulture=true,Culture=en to prevent the tools from falsely reporting:
875+
error VSSDK1006: Two CTO files have the same Menus.ctmenu resource name.
876+
Note that this categorization does not apply to the items that actually produce the .resources.dll and so it will
877+
not cause an English satellite to be generated.
878+
The documented way around this is to put all resources (including neutral/en) in satellites:
879+
https://msdn.microsoft.com/en-us/library/ee943168.aspx
880+
However, that has consequences we do not want:
881+
- It breaks resx code-gen to *.designer.cs
882+
- It causes extra dll loads in en case
883+
- If we ever split satellites in to language packs, the english fallback satellites would become a special case.
884+
-->
885+
<Target Name="AssignEnCultureToNeutralCto" BeforeTargets="MergeCtoResource">
886+
<ItemGroup>
887+
<_GeneratedCTOFilesWithCulture Include="@(_GeneratedCTOFilesWithNoCulture)">
888+
<Culture>en</Culture>
889+
<WithCulture>true</WithCulture>
890+
</_GeneratedCTOFilesWithCulture>
891+
<_GeneratedCTOFilesWithNoCulture Remove="@(_GeneratedCTOFilesWithNoCulture)" />
892+
<_ResourcesToMergeWithCTOWithCultureMetadata Condition="'%(WithCulture)' != 'true'">
893+
<Culture>en</Culture>
894+
<WithCulture>true</WithCulture>
895+
</_ResourcesToMergeWithCTOWithCultureMetadata>
896+
</ItemGroup>
897+
</Target>
898+
<Import Project="..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.targets" Condition="Exists('..\..\packages\XliffTasks.0.2.0-beta-63125-01\build\XliffTasks.targets')" />
899+
<Import Project="..\..\packages\SQLitePCL.raw_basic.0.7.3.0-vs2012\build\net45\SQLitePCL.raw_basic.targets" Condition="Exists('..\..\packages\SQLitePCL.raw_basic.0.7.3.0-vs2012\build\net45\SQLitePCL.raw_basic.targets')" />
866900
<Import Project="..\..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.122\build\Microsoft.VisualStudio.Threading.Analyzers.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Threading.Analyzers.15.8.122\build\Microsoft.VisualStudio.Threading.Analyzers.targets')" />
867901
<Import Project="..\..\packages\Microsoft.VisualStudio.SDK.Analyzers.15.8.33\build\Microsoft.VisualStudio.SDK.Analyzers.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.SDK.Analyzers.15.8.33\build\Microsoft.VisualStudio.SDK.Analyzers.targets')" />
868902
<Import Project="..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.targets" Condition="Exists('..\..\packages\Microsoft.VSSDK.BuildTools.15.8.3252\build\Microsoft.VSSDK.BuildTools.targets')" />

src/GitHub.VisualStudio/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@
5454
<package id="SQLitePCL.raw_basic" version="0.7.3.0-vs2012" targetFramework="net45" />
5555
<package id="Stateless" version="2.5.56.0" targetFramework="net45" />
5656
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
57+
<package id="XliffTasks" version="0.2.0-beta-63125-01" targetFramework="net461" />
5758
</packages>
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<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">
3+
<file datatype="xml" source-language="en" target-language="zh-CN" original="../GitHub.VisualStudio.vsct">
4+
<body>
5+
<trans-unit id="addConnectionCommand|ButtonText">
6+
<source>&amp;Connect to GitHub</source>
7+
<target xml:lang="zh-CN" state="translated">连接至GitHub(&amp;C)</target>
8+
<note/>
9+
</trans-unit>
10+
<trans-unit id="addConnectionCommand|LocCanonicalName">
11+
<source>.GitHub.ConnectToGitHub</source>
12+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ConnectToGitHub</target>
13+
<note/>
14+
</trans-unit>
15+
<trans-unit id="backCommand|ButtonText">
16+
<source>Back</source>
17+
<target xml:lang="zh-CN" state="translated">返回</target>
18+
<note/>
19+
</trans-unit>
20+
<trans-unit id="backCommand|LocCanonicalName">
21+
<source>.GitHub.Back</source>
22+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Back</target>
23+
<note/>
24+
</trans-unit>
25+
<trans-unit id="copyLinkCommand|ButtonText">
26+
<source>Copy link to clipboard</source>
27+
<target xml:lang="zh-CN" state="translated">复制连结到剪贴簿</target>
28+
<note/>
29+
</trans-unit>
30+
<trans-unit id="copyLinkCommand|LocCanonicalName">
31+
<source>.GitHub.CopyLink</source>
32+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.CopyLink</target>
33+
<note/>
34+
</trans-unit>
35+
<trans-unit id="forwardCommand|ButtonText">
36+
<source>Forward</source>
37+
<target xml:lang="zh-CN" state="translated">转发</target>
38+
<note/>
39+
</trans-unit>
40+
<trans-unit id="forwardCommand|LocCanonicalName">
41+
<source>.GitHub.Forward</source>
42+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Forward</target>
43+
<note/>
44+
</trans-unit>
45+
<trans-unit id="githubCommand|ButtonText">
46+
<source>View on GitHub</source>
47+
<target xml:lang="zh-CN" state="needs-translation">View on GitHub</target>
48+
<note/>
49+
</trans-unit>
50+
<trans-unit id="githubCommand|LocCanonicalName">
51+
<source>.GitHub.ViewOnGitHub</source>
52+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ViewOnGitHub</target>
53+
<note/>
54+
</trans-unit>
55+
<trans-unit id="goToSolutionOrPullRequestFileCommand|ButtonText">
56+
<source>Go To Solution/PR File</source>
57+
<target xml:lang="zh-CN" state="needs-translation">Go To Solution/PR File</target>
58+
<note/>
59+
</trans-unit>
60+
<trans-unit id="goToSolutionOrPullRequestFileCommand|LocCanonicalName">
61+
<source>.GitHub.GoToSolutionOrPRFile</source>
62+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.GoToSolutionOrPRFile</target>
63+
<note/>
64+
</trans-unit>
65+
<trans-unit id="helpCommand|ButtonText">
66+
<source>Help</source>
67+
<target xml:lang="zh-CN" state="translated">帮助</target>
68+
<note/>
69+
</trans-unit>
70+
<trans-unit id="helpCommand|LocCanonicalName">
71+
<source>.GitHub.Help</source>
72+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Help</target>
73+
<note/>
74+
</trans-unit>
75+
<trans-unit id="idBlameCommand|ButtonText">
76+
<source>Blame</source>
77+
<target xml:lang="zh-CN" state="needs-translation">Blame</target>
78+
<note/>
79+
</trans-unit>
80+
<trans-unit id="idBlameCommand|LocCanonicalName">
81+
<source>.GitHub.Blame</source>
82+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Blame</target>
83+
<note/>
84+
</trans-unit>
85+
<trans-unit id="idCreateGistCommand|ButtonText">
86+
<source>Create a GitHub Gist</source>
87+
<target xml:lang="zh-CN" state="translated">创建一个GitHub Gist</target>
88+
<note/>
89+
</trans-unit>
90+
<trans-unit id="idCreateGistCommand|LocCanonicalName">
91+
<source>.GitHub.CreateGist</source>
92+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.CreateGist</target>
93+
<note/>
94+
</trans-unit>
95+
<trans-unit id="idCreateGistEnterpriseCommand|ButtonText">
96+
<source>Create an Enterprise Gist</source>
97+
<target xml:lang="zh-CN" state="needs-translation">Create an Enterprise Gist</target>
98+
<note/>
99+
</trans-unit>
100+
<trans-unit id="idCreateGistEnterpriseCommand|LocCanonicalName">
101+
<source>.GitHub.CreateGistEnterprise</source>
102+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.CreateGistEnterprise</target>
103+
<note/>
104+
</trans-unit>
105+
<trans-unit id="idGitHubContextMenu|ButtonText">
106+
<source>GitHub</source>
107+
<target xml:lang="zh-CN" state="translated">GitHub</target>
108+
<note/>
109+
</trans-unit>
110+
<trans-unit id="idGitHubContextMenu|CommandName">
111+
<source>GitHub</source>
112+
<target xml:lang="zh-CN" state="translated">GitHub</target>
113+
<note/>
114+
</trans-unit>
115+
<trans-unit id="idGitHubToolbar|ButtonText">
116+
<source>WindowToolBar</source>
117+
<target xml:lang="zh-CN" state="needs-translation">WindowToolBar</target>
118+
<note/>
119+
</trans-unit>
120+
<trans-unit id="idGitHubToolbar|CommandName">
121+
<source>Window Toolbar</source>
122+
<target xml:lang="zh-CN" state="needs-translation">Window Toolbar</target>
123+
<note/>
124+
</trans-unit>
125+
<trans-unit id="openFromClipboardCommand|ButtonText">
126+
<source>Open from clipboard</source>
127+
<target xml:lang="zh-CN" state="needs-translation">Open from clipboard</target>
128+
<note/>
129+
</trans-unit>
130+
<trans-unit id="openFromClipboardCommand|LocCanonicalName">
131+
<source>.GitHub.OpenFromClipboard</source>
132+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.OpenFromClipboard</target>
133+
<note/>
134+
</trans-unit>
135+
<trans-unit id="openFromUrlCommand|ButtonText">
136+
<source>Open from GitHub...</source>
137+
<target xml:lang="zh-CN" state="needs-translation">Open from GitHub...</target>
138+
<note/>
139+
</trans-unit>
140+
<trans-unit id="openFromUrlCommand|LocCanonicalName">
141+
<source>.GitHub.OpenFromUrl</source>
142+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.OpenFromUrl</target>
143+
<note/>
144+
</trans-unit>
145+
<trans-unit id="openLinkCommand|ButtonText">
146+
<source>Open on GitHub</source>
147+
<target xml:lang="zh-CN" state="needs-translation">Open on GitHub</target>
148+
<note/>
149+
</trans-unit>
150+
<trans-unit id="openLinkCommand|LocCanonicalName">
151+
<source>.GitHub.OpenLink</source>
152+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.OpenLink</target>
153+
<note/>
154+
</trans-unit>
155+
<trans-unit id="pullRequestCommand|ButtonText">
156+
<source>Pull Requests</source>
157+
<target xml:lang="zh-CN" state="translated">拉取请求</target>
158+
<note/>
159+
</trans-unit>
160+
<trans-unit id="pullRequestCommand|LocCanonicalName">
161+
<source>.GitHub.PullRequests</source>
162+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.PullRequests</target>
163+
<note/>
164+
</trans-unit>
165+
<trans-unit id="refreshCommand|ButtonText">
166+
<source>Refresh</source>
167+
<target xml:lang="zh-CN" state="translated">刷新</target>
168+
<note/>
169+
</trans-unit>
170+
<trans-unit id="refreshCommand|LocCanonicalName">
171+
<source>.GitHub.Refresh</source>
172+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.Refresh</target>
173+
<note/>
174+
</trans-unit>
175+
<trans-unit id="showCurrentPullRequestCommand|ButtonText">
176+
<source>Show Current Pull Request</source>
177+
<target xml:lang="zh-CN" state="translated">显示当前推送请求</target>
178+
<note/>
179+
</trans-unit>
180+
<trans-unit id="showCurrentPullRequestCommand|LocCanonicalName">
181+
<source>.GitHub.ShowCurrentPullRequest</source>
182+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ShowCurrentPullRequest</target>
183+
<note/>
184+
</trans-unit>
185+
<trans-unit id="showGitHubPaneCommand|ButtonText">
186+
<source>GitHub</source>
187+
<target xml:lang="zh-CN" state="translated">GitHub</target>
188+
<note/>
189+
</trans-unit>
190+
<trans-unit id="showGitHubPaneCommand|LocCanonicalName">
191+
<source>.GitHub.ShowGitHubPane</source>
192+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.ShowGitHubPane</target>
193+
<note/>
194+
</trans-unit>
195+
<trans-unit id="syncSubmodulesCommand|ButtonText">
196+
<source>Sync Submodules</source>
197+
<target xml:lang="zh-CN" state="needs-translation">Sync Submodules</target>
198+
<note/>
199+
</trans-unit>
200+
<trans-unit id="syncSubmodulesCommand|LocCanonicalName">
201+
<source>.GitHub.SyncSubmodules</source>
202+
<target xml:lang="zh-CN" state="needs-translation">.GitHub.SyncSubmodules</target>
203+
<note/>
204+
</trans-unit>
205+
</body>
206+
</file>
207+
</xliff>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<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">
3+
<file datatype="xml" source-language="en" target-language="zh-CN" original="../VSPackage.resx">
4+
<body>
5+
<trans-unit id="110">
6+
<source>GitHub.VisualStudio</source>
7+
<target xml:lang="zh-CN" state="needs-translation">GitHub.VisualStudio</target>
8+
<note/>
9+
</trans-unit>
10+
<trans-unit id="112" approved="yes">
11+
<source>A Visual Studio Extension that brings the GitHub Flow into Visual Studio.</source>
12+
<target xml:lang="zh-CN" state="translated">这是一个将GitHub工作流引入Visual Studio的扩展。</target>
13+
<note/>
14+
</trans-unit>
15+
</body>
16+
</file>
17+
</xliff>

0 commit comments

Comments
 (0)