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

Commit 6f9f8a3

Browse files
committed
Resources need to be public. Consolidate strings.
Resources need to be public so that xaml can get to them. Clear duplicate strings and consolidate everything. Remove unused blocks.
1 parent 8fe153f commit 6f9f8a3

14 files changed

+361
-626
lines changed

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@
281281
</ItemGroup>
282282
<ItemGroup>
283283
<EmbeddedResource Include="Resources.resx">
284-
<Generator>ResXFileCodeGenerator</Generator>
285-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
284+
<Generator>PublicResXFileCodeGenerator</Generator>
286285
<SubType>Designer</SubType>
286+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
287287
</EmbeddedResource>
288288
<EmbeddedResource Include="VSPackage.resx">
289289
<MergeWithCTO>true</MergeWithCTO>

src/GitHub.VisualStudio/Resources.Designer.cs

Lines changed: 98 additions & 251 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.VisualStudio/Resources.resx

Lines changed: 16 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@
132132
<data name="browsePathButtonContent" xml:space="preserve">
133133
<value>Browse</value>
134134
</data>
135-
<data name="cloneLinkContent" xml:space="preserve">
136-
<value>Clone</value>
137-
</data>
138-
<data name="connect_ClickContent" xml:space="preserve">
135+
<data name="GetStartedLink" xml:space="preserve">
139136
<value>Get Started</value>
140137
</data>
141138
<data name="couldNotConnectToGitHubText" xml:space="preserve">
@@ -144,10 +141,7 @@
144141
<data name="couldNotConnectToTheServerText" xml:space="preserve">
145142
<value>Could not connect to the server.</value>
146143
</data>
147-
<data name="createLinkContent" xml:space="preserve">
148-
<value>Create</value>
149-
</data>
150-
<data name="createRepositoryButtonText" xml:space="preserve">
144+
<data name="CreateLink" xml:space="preserve">
151145
<value>Create</value>
152146
</data>
153147
<data name="descriptionOptionalText" xml:space="preserve">
@@ -165,43 +159,31 @@
165159
<data name="dotComConnectionFailedMessageMessage" xml:space="preserve">
166160
<value>Please check your internet connection and try again.</value>
167161
</data>
168-
<data name="dotComForgotPasswordLinkContent" xml:space="preserve">
162+
<data name="ForgotPasswordLink" xml:space="preserve">
169163
<value>(forgot your password?)</value>
170164
</data>
171-
<data name="dotComLogInButtonContent" xml:space="preserve">
172-
<value>Log in</value>
165+
<data name="LoginLink" xml:space="preserve">
166+
<value>Login</value>
173167
</data>
174-
<data name="dotComLoginFailedMessageMessage" xml:space="preserve">
168+
<data name="LoginFailedMessage" xml:space="preserve">
175169
<value>Check your username and password, then try again</value>
176170
</data>
177-
<data name="dotComPasswordPromptText" xml:space="preserve">
171+
<data name="PasswordPrompt" xml:space="preserve">
178172
<value>Password</value>
179173
</data>
180-
<data name="dotComUserNameOrEmailPromptText" xml:space="preserve">
174+
<data name="UserNameOrEmailPromptText" xml:space="preserve">
181175
<value>Username or email</value>
182176
</data>
183177
<data name="enterpriseConnectingFailedMessage" xml:space="preserve">
184178
<value>The host isn't available or is not a GitHub Enterprise server. Check the address and try again.</value>
185179
</data>
186-
<data name="enterpriseLogInButtonContent" xml:space="preserve">
187-
<value>Log in</value>
188-
</data>
189-
<data name="enterpriseLoginFailedMessageMessage" xml:space="preserve">
190-
<value>Check your username and password, then try again</value>
191-
</data>
192-
<data name="enterprisePasswordPromptText" xml:space="preserve">
193-
<value>Password</value>
194-
</data>
195180
<data name="enterpriseUrlPromptText" xml:space="preserve">
196181
<value>GitHub Enterprise server address</value>
197182
</data>
198-
<data name="enterpriseUserNameOrEmailPromptText" xml:space="preserve">
199-
<value>Username or email</value>
200-
</data>
201-
<data name="ErrorMessageDisplayContent" xml:space="preserve">
183+
<data name="loadingFailedMessageMessage" xml:space="preserve">
202184
<value>An error occurred while loading repositories</value>
203185
</data>
204-
<data name="ErrorMessageDisplayMessage" xml:space="preserve">
186+
<data name="loadingFailedMessageContent" xml:space="preserve">
205187
<value>Some or all repositories may not have loaded. Close the dialog and try again.</value>
206188
</data>
207189
<data name="filterTextPromptText" xml:space="preserve">
@@ -219,18 +201,9 @@
219201
<data name="localPathText" xml:space="preserve">
220202
<value>Local path</value>
221203
</data>
222-
<data name="loginContent" xml:space="preserve">
223-
<value>Login</value>
224-
</data>
225-
<data name="loginFailedText" xml:space="preserve">
204+
<data name="LoginFailedText" xml:space="preserve">
226205
<value>Login failed.</value>
227206
</data>
228-
<data name="loginLabelPrefixText" xml:space="preserve">
229-
<value>Log in</value>
230-
</data>
231-
<data name="login_ClickContent" xml:space="preserve">
232-
<value>Login</value>
233-
</data>
234207
<data name="makePrivateContent" xml:space="preserve">
235208
<value>Private Repository</value>
236209
</data>
@@ -246,12 +219,6 @@
246219
<data name="orText" xml:space="preserve">
247220
<value>or</value>
248221
</data>
249-
<data name="perMonthText" xml:space="preserve">
250-
<value>for $7/month</value>
251-
</data>
252-
<data name="pricingLinkContent" xml:space="preserve">
253-
<value>Sign up</value>
254-
</data>
255222
<data name="privateRepositoriesText" xml:space="preserve">
256223
<value>private repositories.</value>
257224
</data>
@@ -271,51 +238,33 @@
271238
<value>Repository Name</value>
272239
</data>
273240
<data name="resendCodeButtonContent" xml:space="preserve">
274-
<value>_Resend</value>
241+
<value>Resend</value>
275242
</data>
276243
<data name="resendCodeButtonToolTip" xml:space="preserve">
277244
<value>Send the code to your registered SMS Device again</value>
278245
</data>
279-
<data name="signOutContent" xml:space="preserve">
246+
<data name="SignOutLink" xml:space="preserve">
280247
<value>Sign out</value>
281248
</data>
282-
<data name="signup_ClickContent" xml:space="preserve">
249+
<data name="SignUpLink" xml:space="preserve">
283250
<value>Sign up</value>
284251
</data>
285252
<data name="twoFactorAuthText" xml:space="preserve">
286253
<value>Two-factor authentication</value>
287254
</data>
288-
<data name="upgradeAccountLinkContent" xml:space="preserve">
289-
<value>Manage plans</value>
290-
</data>
291-
<data name="upgradeAccountLinkToolTip" xml:space="preserve">
292-
<value>manage plans</value>
293-
</data>
294-
<data name="upgradeToMicroLinkContent" xml:space="preserve">
295-
<value>micro plan</value>
296-
</data>
297-
<data name="upgradeToMicroLinkToolTip" xml:space="preserve">
298-
<value>upgrade</value>
299-
</data>
300255
<data name="verifyText" xml:space="preserve">
301256
<value>Verify</value>
302257
</data>
303258
<data name="youreUsingText" xml:space="preserve">
304259
<value>You're using</value>
305260
</data>
306-
<data name="cloneButtonText" xml:space="preserve">
261+
<data name="CloneLink" xml:space="preserve">
307262
<value>Clone</value>
308263
</data>
309264
<data name="GitHubInvitationSectionConnectLabel" xml:space="preserve">
310265
<value>Connect…</value>
311266
</data>
312-
<data name="GitHubInvitationSectionDescription" xml:space="preserve">
313-
<value>Powerful collaboration, code review, and code management for open source and private projects.</value>
314-
</data>
315-
<data name="GitHubInvitationSectionSignUpLabel" xml:space="preserve">
316-
<value>Sign up</value>
317-
</data>
318-
<data name="GitHubPublishSectionDescription" xml:space="preserve">
267+
<data name="BlurbText" xml:space="preserve">
319268
<value>Powerful collaboration, code review, and code management for open source and private projects.</value>
320269
</data>
321270
<data name="GitHubPublishSectionTitle" xml:space="preserve">

src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubInvitationSection.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public GitHubInvitationSection(IConnectionManager cm, Lazy<IVisualStudioBrowser>
2727
lazyBrowser = browser;
2828
CanConnect = true;
2929
CanSignUp = true;
30-
ConnectLabel = Resources.GitHubInvitationSectionConnectLabel;
31-
SignUpLabel = Resources.GitHubInvitationSectionSignUpLabel;
30+
ConnectLabel = Resources.GetStartedLink;
31+
SignUpLabel = Resources.SignUpLink;
3232
Name = "GitHub";
3333
Provider = "GitHub, Inc.";
34-
Description = Resources.GitHubInvitationSectionDescription;
34+
Description = Resources.BlurbText;
3535
Icon = GetDrawingForIcon(GetBrushForIcon());
3636

3737
IsVisible = cm.Connections.Count == 0;

src/GitHub.VisualStudio/TeamExplorer/Sync/GitHubPublishSection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public GitHubPublishSection(ISimpleApiClientFactory apiFactory, ITeamExplorerSer
3939
Title = Resources.GitHubPublishSectionTitle;
4040
Name = "GitHub";
4141
Provider = "GitHub, Inc";
42-
Description = Resources.GitHubPublishSectionDescription;
42+
Description = Resources.BlurbText;
4343
ShowLogin = false;
4444
ShowSignup = false;
4545
ShowGetStarted = false;

src/GitHub.VisualStudio/UI/Views/Controls/LoginControl.xaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
Margin="0,0,0,10"
4545
Style="{DynamicResource GitHubH1TextBlock}"
4646
IsHitTestVisible="False"
47-
Text="{x:Static prop:Resources.loginLabelPrefixText}" />
47+
Text="{x:Static prop:Resources.LoginLink}" />
4848

4949
<ui:HorizontalShadowDivider />
5050
</StackPanel>
@@ -78,11 +78,11 @@
7878
<DockPanel Style="{StaticResource TabDockPanel}">
7979
<StackPanel DockPanel.Dock="Bottom" Margin="0">
8080
<Border Style="{StaticResource LoginButtonBorder}">
81-
<ui:OcticonCircleButton x:Name="dotComLogInButton" Icon="check" Content="{x:Static prop:Resources.dotComLogInButtonContent}" IsDefault="True" />
81+
<ui:OcticonCircleButton x:Name="dotComLogInButton" Icon="check" Content="{x:Static prop:Resources.LoginLink}" IsDefault="True" />
8282
</Border>
8383

8484
<TextBlock TextWrapping="Wrap" HorizontalAlignment="Center" Margin="0" Text="{x:Static prop:Resources.dontHaveAnAccountText}">
85-
<Hyperlink x:Name="pricingLink" ToolTip="https://github.com/pricing"><TextBlock Text="{x:Static prop:Resources.pricingLinkContent}"/></Hyperlink>
85+
<Hyperlink x:Name="pricingLink" ToolTip="https://github.com/pricing"><TextBlock Text="{x:Static prop:Resources.SignUpLink}"/></Hyperlink>
8686
</TextBlock>
8787
</StackPanel>
8888

@@ -91,16 +91,16 @@
9191
<StackPanel Style="{StaticResource FormFieldStackPanel}">
9292
<ui:PromptTextBox
9393
x:Name="dotComUserNameOrEmail"
94-
PromptText="{x:Static prop:Resources.dotComUserNameOrEmailPromptText}"
94+
PromptText="{x:Static prop:Resources.UserNameOrEmailPromptText}"
9595
Margin="0,0,0,10" />
9696

97-
<ui:SecurePasswordBox x:Name="dotComPassword" PromptText="{x:Static prop:Resources.dotComPasswordPromptText}" />
97+
<ui:SecurePasswordBox x:Name="dotComPassword" PromptText="{x:Static prop:Resources.PasswordPrompt}" />
9898

9999
<uirx:ErrorMessageDisplay
100100
x:Name="dotComLoginFailedMessage"
101-
Message="{x:Static prop:Resources.dotComLoginFailedMessageMessage}">
102-
<TextBlock TextWrapping="Wrap" Text="{x:Static prop:Resources.loginFailedText}">
103-
<Hyperlink x:Name="dotComForgotPasswordLink"><TextBlock Text="{x:Static prop:Resources.dotComForgotPasswordLinkContent}"/></Hyperlink>
101+
Message="{x:Static prop:Resources.LoginFailedMessage}">
102+
<TextBlock TextWrapping="Wrap" Text="{x:Static prop:Resources.LoginFailedText}">
103+
<Hyperlink x:Name="dotComForgotPasswordLink"><TextBlock Text="{x:Static prop:Resources.ForgotPasswordLink}"/></Hyperlink>
104104
</TextBlock>
105105
</uirx:ErrorMessageDisplay>
106106

@@ -127,7 +127,7 @@
127127
<DockPanel Style="{StaticResource TabDockPanel}">
128128
<StackPanel DockPanel.Dock="Bottom">
129129
<Border Style="{StaticResource LoginButtonBorder}">
130-
<ui:OcticonCircleButton x:Name="enterpriseLogInButton" Icon="check" Content="{x:Static prop:Resources.enterpriseLogInButtonContent}" IsDefault="True" />
130+
<ui:OcticonCircleButton x:Name="enterpriseLogInButton" Icon="check" Content="{x:Static prop:Resources.LoginLink}" IsDefault="True" />
131131
</Border>
132132

133133
<TextBlock TextWrapping="Wrap" HorizontalAlignment="Center" Margin="0" Text="{x:Static prop:Resources.dontHaveGitHubEnterpriseText}">
@@ -141,10 +141,10 @@
141141

142142
<ui:PromptTextBox
143143
x:Name="enterpriseUserNameOrEmail"
144-
PromptText="{x:Static prop:Resources.enterpriseUserNameOrEmailPromptText}"
144+
PromptText="{x:Static prop:Resources.UserNameOrEmailPromptText}"
145145
Margin="0,0,0,10" />
146146

147-
<ui:SecurePasswordBox x:Name="enterprisePassword" PromptText="{x:Static prop:Resources.enterprisePasswordPromptText}" Margin="0,0,0,10" />
147+
<ui:SecurePasswordBox x:Name="enterprisePassword" PromptText="{x:Static prop:Resources.PasswordPrompt}" Margin="0,0,0,10" />
148148

149149
<ui:PromptTextBox x:Name="enterpriseUrl" PromptText="{x:Static prop:Resources.enterpriseUrlPromptText}" />
150150

@@ -163,9 +163,9 @@
163163

164164
<uirx:ErrorMessageDisplay
165165
x:Name="enterpriseLoginFailedMessage"
166-
Message="{x:Static prop:Resources.enterpriseLoginFailedMessageMessage}">
167-
<TextBlock TextWrapping="Wrap" Text="{x:Static prop:Resources.loginFailedText}">
168-
<Hyperlink x:Name="enterpriseForgotPasswordLink"><TextBlock Text="{x:Static prop:Resources.dotComForgotPasswordLinkContent}"/></Hyperlink>
166+
Message="{x:Static prop:Resources.LoginFailedMessage}">
167+
<TextBlock TextWrapping="Wrap" Text="{x:Static prop:Resources.LoginFailedText}">
168+
<Hyperlink x:Name="enterpriseForgotPasswordLink"><TextBlock Text="{x:Static prop:Resources.ForgotPasswordLink}"/></Hyperlink>
169169
</TextBlock>
170170
</uirx:ErrorMessageDisplay>
171171

0 commit comments

Comments
 (0)