From 8136fc4a2b4bff8a23156640cf23e70bb726b78f Mon Sep 17 00:00:00 2001 From: jau228 Date: Thu, 6 Aug 2015 16:40:35 -0600 Subject: [PATCH 1/7] move strings from xaml to the resource file --- src/GitHub.VisualStudio/Resources.Designer.cs | 38 ++++++++++++++++++- src/GitHub.VisualStudio/Resources.resx | 12 ++++++ .../UI/Views/GitHubConnectContent.xaml | 13 ++++--- 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/src/GitHub.VisualStudio/Resources.Designer.cs b/src/GitHub.VisualStudio/Resources.Designer.cs index 4e277b0c76..54f211bc3c 100644 --- a/src/GitHub.VisualStudio/Resources.Designer.cs +++ b/src/GitHub.VisualStudio/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.0 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -59,5 +59,41 @@ internal Resources() { resourceCulture = value; } } + + /// + /// Looks up a localized string similar to Clone. + /// + internal static string cloneLinkContent { + get { + return ResourceManager.GetString("cloneLinkContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create. + /// + internal static string createLinkContent { + get { + return ResourceManager.GetString("createLinkContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Login. + /// + internal static string loginContent { + get { + return ResourceManager.GetString("loginContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sign out. + /// + internal static string signOutContent { + get { + return ResourceManager.GetString("signOutContent", resourceCulture); + } + } } } diff --git a/src/GitHub.VisualStudio/Resources.resx b/src/GitHub.VisualStudio/Resources.resx index 1af7de150c..7588984a33 100644 --- a/src/GitHub.VisualStudio/Resources.resx +++ b/src/GitHub.VisualStudio/Resources.resx @@ -117,4 +117,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Clone + + + Create + + + Login + + + Sign out + \ No newline at end of file diff --git a/src/GitHub.VisualStudio/UI/Views/GitHubConnectContent.xaml b/src/GitHub.VisualStudio/UI/Views/GitHubConnectContent.xaml index 4f9a5e9be2..4369b935c6 100644 --- a/src/GitHub.VisualStudio/UI/Views/GitHubConnectContent.xaml +++ b/src/GitHub.VisualStudio/UI/Views/GitHubConnectContent.xaml @@ -9,6 +9,7 @@ xmlns:vsui="clr-namespace:GitHub.VisualStudio.UI.Views.Controls" xmlns:helpers="clr-namespace:GitHub.Helpers;assembly=GitHub.UI" xmlns:mtcw="clr-namespace:Microsoft.TeamFoundation.Controls.WPF;assembly=Microsoft.TeamFoundation.Controls" + xmlns:prop="clr-namespace:GitHub.VisualStudio" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" d:DesignBackground="White" KeyboardNavigation.TabNavigation="Local"> @@ -27,14 +28,14 @@ - + + - + + - + Visibility="{Binding ShowLogin, Converter={StaticResource BooleanToVisibilityConverter}}" Text="{x:Static prop:Resources.orText}"/> + + Style="{StaticResource GitHubBlueLinkButton}" Content="{x:Static prop:Resources.browsePathButtonContent}"/> @@ -216,9 +217,7 @@ Margin="0,-70,0,0"> - No repositories - + Style="{DynamicResource GitHubH2TextBlock}" Text="{x:Static prop:Resources.noRepositoriesMessageText}"/> diff --git a/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCreationControl.xaml b/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCreationControl.xaml index 2dee57c56b..7541898e64 100644 --- a/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCreationControl.xaml +++ b/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCreationControl.xaml @@ -9,6 +9,7 @@ xmlns:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App" xmlns:GitHub="clr-namespace:GitHub.VisualStudio.Helpers" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:prop="clr-namespace:GitHub.VisualStudio" mc:Ignorable="d" d:DesignWidth="414" d:DesignHeight="440" @@ -40,7 +41,7 @@ x:Name="createRepositoryButton" HorizontalAlignment="Center" Icon="check"> - Create + @@ -101,7 +102,7 @@ - + diff --git a/src/GitHub.VisualStudio/UI/Views/Controls/TwoFactorControl.xaml b/src/GitHub.VisualStudio/UI/Views/Controls/TwoFactorControl.xaml index 89e1baec2b..adf81ca5b5 100644 --- a/src/GitHub.VisualStudio/UI/Views/Controls/TwoFactorControl.xaml +++ b/src/GitHub.VisualStudio/UI/Views/Controls/TwoFactorControl.xaml @@ -9,6 +9,7 @@ xmlns:helpers="clr-namespace:GitHub.Helpers;assembly=GitHub.UI" xmlns:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App" xmlns:GitHub="clr-namespace:GitHub.VisualStudio.Helpers" + xmlns:prop="clr-namespace:GitHub.VisualStudio" mc:Ignorable="d" d:DesignWidth="414" d:DesignHeight="440" @@ -29,7 +30,7 @@ - Open the two-factor authentication app on your device to view your authentication code. - Read more + + + Message="{x:Static prop:Resources.authenticationFailedLabelMessage}" + Content="{x:Static prop:Resources.authenticationFailedLabelContent}" /> + Message="{x:Static prop:Resources.authenticationSentLabelMessage}" + Content="{x:Static prop:Resources.authenticationSentLabelContent}" /> + Content="{x:Static prop:Resources.verifyText}" /> + Content="{x:Static prop:Resources.resendCodeButtonContent}" /> From d102a1d70f5662776cbb9d867eff621b82fa545f Mon Sep 17 00:00:00 2001 From: jau228 Date: Mon, 10 Aug 2015 10:49:07 -0600 Subject: [PATCH 5/7] Align the tag and removed extra space/tab --- src/common/GitHubVS.ruleset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/GitHubVS.ruleset b/src/common/GitHubVS.ruleset index 01a247bf88..0e1443d4ba 100644 --- a/src/common/GitHubVS.ruleset +++ b/src/common/GitHubVS.ruleset @@ -37,7 +37,7 @@ - + @@ -68,6 +68,6 @@ - + From 9c03a6a1c7d3f44f16d7df6594686e4076ba5108 Mon Sep 17 00:00:00 2001 From: jau228 Date: Mon, 10 Aug 2015 14:18:50 -0600 Subject: [PATCH 6/7] move strings from TeamExplorer folder cs files to the resource file --- src/GitHub.VisualStudio/Resources.Designer.cs | 108 ++++++++++++++++++ src/GitHub.VisualStudio/Resources.resx | 36 ++++++ .../Connect/GitHubInvitationSection.cs | 6 +- .../TeamExplorer/Home/GraphsNavigationItem.cs | 2 +- .../TeamExplorer/Home/IssuesNavigationItem.cs | 2 +- .../Home/PullRequestsNavigationItem.cs | 2 +- .../TeamExplorer/Home/PulseNavigationItem.cs | 2 +- .../TeamExplorer/Home/WikiNavigationItem.cs | 2 +- .../TeamExplorer/Sync/GitHubPublishSection.cs | 4 +- .../Controls/RepositoryCloneControl.xaml | 4 +- 10 files changed, 156 insertions(+), 12 deletions(-) diff --git a/src/GitHub.VisualStudio/Resources.Designer.cs b/src/GitHub.VisualStudio/Resources.Designer.cs index f3fccce480..8d9bea2f93 100644 --- a/src/GitHub.VisualStudio/Resources.Designer.cs +++ b/src/GitHub.VisualStudio/Resources.Designer.cs @@ -105,6 +105,15 @@ internal static string browsePathButtonContent { } } + /// + /// Looks up a localized string similar to Clone. + /// + internal static string cloneButtonText { + get { + return ResourceManager.GetString("cloneButtonText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Clone. /// @@ -330,6 +339,60 @@ internal static string filterTextPromptText { } } + /// + /// Looks up a localized string similar to Connect…. + /// + internal static string GitHubInvitationSectionConnectLabel { + get { + return ResourceManager.GetString("GitHubInvitationSectionConnectLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Powerful collaboration, code review, and code management for open source and private projects.. + /// + internal static string GitHubInvitationSectionDescription { + get { + return ResourceManager.GetString("GitHubInvitationSectionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sign up. + /// + internal static string GitHubInvitationSectionSignUpLabel { + get { + return ResourceManager.GetString("GitHubInvitationSectionSignUpLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Powerful collaboration, code review, and code management for open source and private projects.. + /// + internal static string GitHubPublishSectionDescription { + get { + return ResourceManager.GetString("GitHubPublishSectionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish to GitHub. + /// + internal static string GitHubPublishSectionTitle { + get { + return ResourceManager.GetString("GitHubPublishSectionTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Graphs. + /// + internal static string GraphsNavigationItemText { + get { + return ResourceManager.GetString("GraphsNavigationItemText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Git ignore. /// @@ -339,6 +402,15 @@ internal static string ignoreTemplateListText { } } + /// + /// Looks up a localized string similar to Issues. + /// + internal static string IssuesNavigationItemText { + get { + return ResourceManager.GetString("IssuesNavigationItemText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Learn more. /// @@ -447,6 +519,15 @@ internal static string orText { } } + /// + /// Looks up a localized string similar to Path. + /// + internal static string pathText { + get { + return ResourceManager.GetString("pathText", resourceCulture); + } + } + /// /// Looks up a localized string similar to for $7/month. /// @@ -492,6 +573,24 @@ internal static string publishText { } } + /// + /// Looks up a localized string similar to Pull Requests. + /// + internal static string PullRequestsNavigationItemText { + get { + return ResourceManager.GetString("PullRequestsNavigationItemText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pulse. + /// + internal static string PulseNavigationItemText { + get { + return ResourceManager.GetString("PulseNavigationItemText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Read more. /// @@ -609,6 +708,15 @@ internal static string verifyText { } } + /// + /// Looks up a localized string similar to Wiki. + /// + internal static string WikiNavigationItemText { + get { + return ResourceManager.GetString("WikiNavigationItemText", resourceCulture); + } + } + /// /// Looks up a localized string similar to You're using. /// diff --git a/src/GitHub.VisualStudio/Resources.resx b/src/GitHub.VisualStudio/Resources.resx index 5aeb48330f..dc4aeb1c6c 100644 --- a/src/GitHub.VisualStudio/Resources.resx +++ b/src/GitHub.VisualStudio/Resources.resx @@ -303,4 +303,40 @@ You're using + + Clone + + + Connect… + + + Powerful collaboration, code review, and code management for open source and private projects. + + + Sign up + + + Powerful collaboration, code review, and code management for open source and private projects. + + + Publish to GitHub + + + Graphs + + + Issues + + + Path + + + Pull Requests + + + Pulse + + + Wiki + \ No newline at end of file diff --git a/src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubInvitationSection.cs b/src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubInvitationSection.cs index 3d71b4ac4f..37c65aa355 100644 --- a/src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubInvitationSection.cs +++ b/src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubInvitationSection.cs @@ -27,11 +27,11 @@ public GitHubInvitationSection(IConnectionManager cm, Lazy lazyBrowser = browser; CanConnect = true; CanSignUp = true; - ConnectLabel = "Connect…"; - SignUpLabel = "Sign up"; + ConnectLabel = Resources.GitHubInvitationSectionConnectLabel; + SignUpLabel = Resources.GitHubInvitationSectionSignUpLabel; Name = "GitHub"; Provider = "GitHub, Inc."; - Description = "Powerful collaboration, code review, and code management for open source and private projects."; + Description = Resources.GitHubInvitationSectionDescription; Icon = GetDrawingForIcon(GetBrushForIcon()); IsVisible = cm.Connections.Count == 0; diff --git a/src/GitHub.VisualStudio/TeamExplorer/Home/GraphsNavigationItem.cs b/src/GitHub.VisualStudio/TeamExplorer/Home/GraphsNavigationItem.cs index 3319d8eb10..91076a56d1 100644 --- a/src/GitHub.VisualStudio/TeamExplorer/Home/GraphsNavigationItem.cs +++ b/src/GitHub.VisualStudio/TeamExplorer/Home/GraphsNavigationItem.cs @@ -23,7 +23,7 @@ public GraphsNavigationItem(ISimpleApiClientFactory apiFactory, Lazy - Clone + @@ -91,7 +91,7 @@ Grid.Column="0" Grid.Row="3" Margin="4,0" - Target="{Binding ElementName=clonePath}">Path + Target="{Binding ElementName=clonePath}" Content="{x:Static prop:Resources.pathText}"/> Date: Wed, 12 Aug 2015 08:59:37 -0600 Subject: [PATCH 7/7] line up the tag --- src/common/GitHubVS.ruleset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/GitHubVS.ruleset b/src/common/GitHubVS.ruleset index 0e1443d4ba..ebf59de5c0 100644 --- a/src/common/GitHubVS.ruleset +++ b/src/common/GitHubVS.ruleset @@ -37,7 +37,7 @@ - +