diff --git a/src/GitHub.App/GitHub.App.csproj b/src/GitHub.App/GitHub.App.csproj index 7da5a6de73..ccc90ff1e6 100644 --- a/src/GitHub.App/GitHub.App.csproj +++ b/src/GitHub.App/GitHub.App.csproj @@ -128,7 +128,13 @@ + + + True + True + Resources.resx + @@ -155,7 +161,6 @@ - @@ -263,6 +268,12 @@ Rothko + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + diff --git a/src/GitHub.App/GlobalSuppressions.cs b/src/GitHub.App/GlobalSuppressions.cs index 3210fb0c91..ee1265bc20 100644 Binary files a/src/GitHub.App/GlobalSuppressions.cs and b/src/GitHub.App/GlobalSuppressions.cs differ diff --git a/src/GitHub.App/Resources.Designer.cs b/src/GitHub.App/Resources.Designer.cs new file mode 100644 index 0000000000..d29a014386 --- /dev/null +++ b/src/GitHub.App/Resources.Designer.cs @@ -0,0 +1,288 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GitHub { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GitHub.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Select a containing folder for your new repository.. + /// + public static string BrowseForDirectory { + get { + return ResourceManager.GetString("BrowseForDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Clone a {0} Repository. + /// + public static string CloneTitle { + get { + return ResourceManager.GetString("CloneTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a {0} Repository. + /// + public static string CreateTitle { + get { + return ResourceManager.GetString("CreateTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please enter an Enterprise URL. + /// + public static string EnterpriseUrlValidatorEmpty { + get { + return ResourceManager.GetString("EnterpriseUrlValidatorEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please enter a valid Enterprise URL. + /// + public static string EnterpriseUrlValidatorInvalid { + get { + return ResourceManager.GetString("EnterpriseUrlValidatorInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not an Enterprise server. Please enter an Enterprise URL. + /// + public static string EnterpriseUrlValidatorNotAGitHubHost { + get { + return ResourceManager.GetString("EnterpriseUrlValidatorNotAGitHubHost", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Make sure to use your password and not a Personal Access token to log in.. + /// + public static string LoginFailedForbiddenMessage { + get { + return ResourceManager.GetString("LoginFailedForbiddenMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Check your username and password, then try again. + /// + public static string LoginFailedMessage { + get { + return ResourceManager.GetString("LoginFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connect To GitHub. + /// + public static string LoginTitle { + get { + return ResourceManager.GetString("LoginTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please enter your password. + /// + public static string PasswordValidatorEmpty { + get { + return ResourceManager.GetString("PasswordValidatorEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish repository. + /// + public static string PublishTitle { + get { + return ResourceManager.GetString("PublishTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish repository to {0}. + /// + public static string PublishToTitle { + get { + return ResourceManager.GetString("PublishToTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository '{0}/{1}' already exists.. + /// + public static string RepositoryCreationFailedAlreadyExists { + get { + return ResourceManager.GetString("RepositoryCreationFailedAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change the repository name or select a different account and try again.. + /// + public static string RepositoryCreationFailedAlreadyExistsMessage { + get { + return ResourceManager.GetString("RepositoryCreationFailedAlreadyExistsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exceeded private repositories quota.. + /// + public static string RepositoryCreationFailedQuota { + get { + return ResourceManager.GetString("RepositoryCreationFailedQuota", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository with same name already exists at this location. + /// + public static string RepositoryNameValidatorAlreadyExists { + get { + return ResourceManager.GetString("RepositoryNameValidatorAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please enter a repository name. + /// + public static string RepositoryNameValidatorEmpty { + get { + return ResourceManager.GetString("RepositoryNameValidatorEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository name must be fewer than 100 characters. + /// + public static string RepositoryNameValidatorTooLong { + get { + return ResourceManager.GetString("RepositoryNameValidatorTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Will be created as {0}. + /// + public static string SafeRepositoryNameWarning { + get { + return ResourceManager.GetString("SafeRepositoryNameWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open the two-factor authentication app on your device to view your authentication code.. + /// + public static string TwoFactorApp { + get { + return ResourceManager.GetString("TwoFactorApp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to We sent you a message via SMS with your authentication code.. + /// + public static string TwoFactorSms { + get { + return ResourceManager.GetString("TwoFactorSms", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Two-Factor authentication required. + /// + public static string TwoFactorTitle { + get { + return ResourceManager.GetString("TwoFactorTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enter a login authentication code here. + /// + public static string TwoFactorUnknown { + get { + return ResourceManager.GetString("TwoFactorUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please enter your username or email address. + /// + public static string UsernameOrEmailValidatorEmpty { + get { + return ResourceManager.GetString("UsernameOrEmailValidatorEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username or email address must not have spaces. + /// + public static string UsernameOrEmailValidatorSpaces { + get { + return ResourceManager.GetString("UsernameOrEmailValidatorSpaces", resourceCulture); + } + } + } +} diff --git a/src/GitHub.App/Resources.resx b/src/GitHub.App/Resources.resx new file mode 100644 index 0000000000..0bec3f4be7 --- /dev/null +++ b/src/GitHub.App/Resources.resx @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Select a containing folder for your new repository. + + + Clone a {0} Repository + + + Create a {0} Repository + + + Please enter an Enterprise URL + + + Please enter a valid Enterprise URL + + + Not an Enterprise server. Please enter an Enterprise URL + + + Make sure to use your password and not a Personal Access token to log in. + + + Check your username and password, then try again + + + Connect To GitHub + + + Please enter your password + + + Publish repository + + + Publish repository to {0} + + + Repository '{0}/{1}' already exists. + + + Change the repository name or select a different account and try again. + + + Exceeded private repositories quota. + + + Repository with same name already exists at this location + + + Please enter a repository name + + + Repository name must be fewer than 100 characters + + + Will be created as {0} + + + Open the two-factor authentication app on your device to view your authentication code. + + + We sent you a message via SMS with your authentication code. + + + Two-Factor authentication required + + + Enter a login authentication code here + + + Please enter your username or email address + + + Username or email address must not have spaces + + \ No newline at end of file diff --git a/src/GitHub.App/ViewModels/LoginControlViewModel.cs b/src/GitHub.App/ViewModels/LoginControlViewModel.cs index ac8b18630f..e45df7fb11 100644 --- a/src/GitHub.App/ViewModels/LoginControlViewModel.cs +++ b/src/GitHub.App/ViewModels/LoginControlViewModel.cs @@ -19,7 +19,7 @@ public LoginControlViewModel( ILoginToGitHubViewModel loginToGitHubViewModel, ILoginToGitHubForEnterpriseViewModel loginToGitHubEnterpriseViewModel) { - Title = "Connect To GitHub"; + Title = Resources.LoginTitle; RepositoryHosts = hosts; GitHubLogin = loginToGitHubViewModel; EnterpriseLogin = loginToGitHubEnterpriseViewModel; diff --git a/src/GitHub.App/ViewModels/LoginTabViewModel.cs b/src/GitHub.App/ViewModels/LoginTabViewModel.cs index acea61985e..77ede2183f 100644 --- a/src/GitHub.App/ViewModels/LoginTabViewModel.cs +++ b/src/GitHub.App/ViewModels/LoginTabViewModel.cs @@ -26,11 +26,11 @@ protected LoginTabViewModel(IRepositoryHosts repositoryHosts, IVisualStudioBrows RepositoryHosts = repositoryHosts; UsernameOrEmailValidator = ReactivePropertyValidator.For(this, x => x.UsernameOrEmail) - .IfNullOrEmpty("Please enter your username or email address") - .IfMatch(@"\s", "Username or email address must not have spaces"); + .IfNullOrEmpty(Resources.UsernameOrEmailValidatorEmpty) + .IfMatch(@"\s", Resources.UsernameOrEmailValidatorSpaces); PasswordValidator = ReactivePropertyValidator.For(this, x => x.Password) - .IfNullOrEmpty("Please enter your password"); + .IfNullOrEmpty(Resources.PasswordValidatorEmpty); canLogin = this.WhenAny( x => x.UsernameOrEmailValidator.ValidationResult.IsValid, @@ -43,12 +43,11 @@ protected LoginTabViewModel(IRepositoryHosts repositoryHosts, IVisualStudioBrows { if (ex.IsCriticalException()) return; - log.Info(string.Format(CultureInfo.InvariantCulture, "Error logging into '{0}' as '{1}'", BaseUri, - UsernameOrEmail), ex); + log.Info(string.Format(CultureInfo.InvariantCulture, "Error logging into '{0}' as '{1}'", BaseUri, UsernameOrEmail), ex); if (ex is Octokit.ForbiddenException) { ShowLogInFailedError = true; - LoginFailedMessage = "Make sure to use your password and not a Personal Access token to log in."; + LoginFailedMessage = Resources.LoginFailedForbiddenMessage; } else { @@ -80,7 +79,7 @@ protected LoginTabViewModel(IRepositoryHosts repositoryHosts, IVisualStudioBrows public IReactiveCommand Reset { get; } public IReactiveCommand NavigateForgotPassword { get; } - string loginFailedMessage = "Check your username and password, then try again"; + string loginFailedMessage = Resources.LoginFailedMessage; public string LoginFailedMessage { get { return loginFailedMessage; } diff --git a/src/GitHub.App/ViewModels/LoginToGitHubForEnterpriseViewModel.cs b/src/GitHub.App/ViewModels/LoginToGitHubForEnterpriseViewModel.cs index ee7944dc80..4f391d7787 100644 --- a/src/GitHub.App/ViewModels/LoginToGitHubForEnterpriseViewModel.cs +++ b/src/GitHub.App/ViewModels/LoginToGitHubForEnterpriseViewModel.cs @@ -22,9 +22,9 @@ public class LoginToGitHubForEnterpriseViewModel : LoginTabViewModel, ILoginToGi public LoginToGitHubForEnterpriseViewModel(IRepositoryHosts hosts, IVisualStudioBrowser browser) : base(hosts, browser) { EnterpriseUrlValidator = ReactivePropertyValidator.For(this, x => x.EnterpriseUrl) - .IfNullOrEmpty("Please enter an Enterprise URL") - .IfNotUri("Please enter a valid Enterprise URL") - .IfGitHubDotComHost("Not an Enterprise server. Please enter an Enterprise URL"); + .IfNullOrEmpty(Resources.EnterpriseUrlValidatorEmpty) + .IfNotUri(Resources.EnterpriseUrlValidatorInvalid) + .IfGitHubDotComHost(Resources.EnterpriseUrlValidatorNotAGitHubHost); canLogin = this.WhenAny( x => x.UsernameOrEmailValidator.ValidationResult.IsValid, diff --git a/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs b/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs index 6a8821dcca..77d9646aad 100644 --- a/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs +++ b/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs @@ -56,7 +56,7 @@ public RepositoryCloneViewModel( this.operatingSystem = operatingSystem; this.vsServices = vsServices; - Title = string.Format(CultureInfo.CurrentCulture, "Clone a {0} Repository", repositoryHost.Title); + Title = string.Format(CultureInfo.CurrentCulture, Resources.CloneTitle, repositoryHost.Title); Repositories = new ReactiveList(); loadRepositoriesCommand = ReactiveCommand.CreateAsyncObservable(OnLoadRepositories); isLoading = this.WhenAny(x => x.LoadingFailed, x => x.Value) @@ -243,8 +243,7 @@ IObservable ShowBrowseForDirectoryDialog() // We store this in a local variable to prevent it changing underneath us while the // folder dialog is open. var localBaseRepositoryPath = BaseRepositoryPath; - var browseResult = operatingSystem.Dialog.BrowseForDirectory(localBaseRepositoryPath, - "Select a containing folder for your new repository."); + var browseResult = operatingSystem.Dialog.BrowseForDirectory(localBaseRepositoryPath, Resources.BrowseForDirectory); if (!browseResult.Success) return; diff --git a/src/GitHub.App/ViewModels/RepositoryCreationViewModel.cs b/src/GitHub.App/ViewModels/RepositoryCreationViewModel.cs index f5019e61ff..8ac90ef2bf 100644 --- a/src/GitHub.App/ViewModels/RepositoryCreationViewModel.cs +++ b/src/GitHub.App/ViewModels/RepositoryCreationViewModel.cs @@ -58,7 +58,7 @@ public RepositoryCreationViewModel( this.operatingSystem = operatingSystem; this.repositoryCreationService = repositoryCreationService; - Title = string.Format(CultureInfo.CurrentCulture, "Create a {0} Repository", repositoryHost.Title); + Title = string.Format(CultureInfo.CurrentCulture, Resources.CreateTitle, repositoryHost.Title); SelectedGitIgnoreTemplate = GitIgnoreItem.None; SelectedLicense = LicenseItem.None; @@ -88,15 +88,15 @@ public RepositoryCreationViewModel( .WhereNotNull(); RepositoryNameValidator = ReactivePropertyValidator.ForObservable(nonNullRepositoryName) - .IfNullOrEmpty("Please enter a repository name") - .IfTrue(x => x.Length > 100, "Repository name must be fewer than 100 characters") - .IfTrue(IsAlreadyRepoAtPath, "Repository with same name already exists at this location"); + .IfNullOrEmpty(Resources.RepositoryNameValidatorEmpty) + .IfTrue(x => x.Length > 100, Resources.RepositoryNameValidatorTooLong) + .IfTrue(IsAlreadyRepoAtPath, Resources.RepositoryNameValidatorAlreadyExists); SafeRepositoryNameWarningValidator = ReactivePropertyValidator.ForObservable(nonNullRepositoryName) .Add(repoName => { var parsedReference = GetSafeRepositoryName(repoName); - return parsedReference != repoName ? "Will be created as " + parsedReference : null; + return parsedReference != repoName ? String.Format(CultureInfo.CurrentCulture, Resources.SafeRepositoryNameWarning, parsedReference) : null; }); this.WhenAny(x => x.BaseRepositoryPathValidator.ValidationResult, x => x.Value) @@ -221,7 +221,7 @@ IObservable ShowBrowseForDirectoryDialog() // folder dialog is open. var localBaseRepositoryPath = BaseRepositoryPath; var browseResult = operatingSystem.Dialog.BrowseForDirectory(localBaseRepositoryPath, - "Select a containing folder for your new repository."); + Resources.BrowseForDirectory); if (!browseResult.Success) return; @@ -319,14 +319,14 @@ PublishRepositoryUserError TranslateRepositoryCreateException(Exception ex) { string message = string.Format( CultureInfo.InvariantCulture, - "Repository '{0}/{1}' already exists.", + Resources.RepositoryCreationFailedAlreadyExists, SelectedAccount.Login, RepositoryName); - return new PublishRepositoryUserError(message, "Change the repository name or select a different account and try again."); + return new PublishRepositoryUserError(message, Resources.RepositoryCreationFailedAlreadyExistsMessage); } var quotaExceededException = ex as PrivateRepositoryQuotaExceededException; if (quotaExceededException != null && SelectedAccount != null) { - return new PublishRepositoryUserError("Exceeded private repositories quota.", quotaExceededException.Message); + return new PublishRepositoryUserError(Resources.RepositoryCreationFailedQuota, quotaExceededException.Message); } return new PublishRepositoryUserError(ex.Message); } diff --git a/src/GitHub.App/ViewModels/RepositoryPublishViewModel.cs b/src/GitHub.App/ViewModels/RepositoryPublishViewModel.cs index 2c65d4ace1..df50a548c4 100644 --- a/src/GitHub.App/ViewModels/RepositoryPublishViewModel.cs +++ b/src/GitHub.App/ViewModels/RepositoryPublishViewModel.cs @@ -47,8 +47,8 @@ public RepositoryPublishViewModel( title = this.WhenAny( x => x.SelectedHost, x => x.Value != null ? - string.Format(CultureInfo.CurrentCulture, "Publish repository to {0}", x.Value.Title) : - "Publish repository" + string.Format(CultureInfo.CurrentCulture, Resources.PublishToTitle, x.Value.Title) : + Resources.PublishTitle ) .ToProperty(this, x => x.Title); @@ -179,14 +179,14 @@ void InitializeValidation() .WhereNotNull(); RepositoryNameValidator = ReactivePropertyValidator.ForObservable(nonNullRepositoryName) - .IfNullOrEmpty("Please enter a repository name") - .IfTrue(x => x.Length > 100, "Repository name must be fewer than 100 characters"); + .IfNullOrEmpty(Resources.RepositoryNameValidatorEmpty) + .IfTrue(x => x.Length > 100, Resources.RepositoryNameValidatorTooLong); SafeRepositoryNameWarningValidator = ReactivePropertyValidator.ForObservable(nonNullRepositoryName) .Add(repoName => { var parsedReference = GetSafeRepositoryName(repoName); - return parsedReference != repoName ? "Will be created as " + parsedReference : null; + return parsedReference != repoName ? String.Format(CultureInfo.CurrentCulture, Resources.SafeRepositoryNameWarning, parsedReference) : null; }); this.WhenAny(x => x.SafeRepositoryNameWarningValidator.ValidationResult, x => x.Value) diff --git a/src/GitHub.App/ViewModels/TwoFactorDialogViewModel.cs b/src/GitHub.App/ViewModels/TwoFactorDialogViewModel.cs index 37696cfe29..d5c489f06a 100644 --- a/src/GitHub.App/ViewModels/TwoFactorDialogViewModel.cs +++ b/src/GitHub.App/ViewModels/TwoFactorDialogViewModel.cs @@ -32,7 +32,7 @@ public TwoFactorDialogViewModel( IVisualStudioBrowser browser, ITwoFactorChallengeHandler twoFactorChallengeHandler) { - Title = "Two-Factor authentication required"; + Title = Resources.TwoFactorTitle; twoFactorChallengeHandler.SetViewModel(this); var canVerify = this.WhenAny( @@ -59,12 +59,11 @@ public TwoFactorDialogViewModel( switch (type) { case TwoFactorType.Sms: - return "We sent you a message via SMS with your authentication code."; + return Resources.TwoFactorSms; case TwoFactorType.AuthenticatorApp: - return "Open the two-factor authentication app on your device to view your " + - "authentication code."; + return Resources.TwoFactorApp; case TwoFactorType.Unknown: - return "Enter a login authentication code here"; + return Resources.TwoFactorUnknown; default: return null; diff --git a/src/GitHub.UI.Reactive/Assets/Controls/ErrorMessageDisplay.xaml b/src/GitHub.UI.Reactive/Assets/Controls/ErrorMessageDisplay.xaml index f6dd3621c8..f7292b143b 100644 --- a/src/GitHub.UI.Reactive/Assets/Controls/ErrorMessageDisplay.xaml +++ b/src/GitHub.UI.Reactive/Assets/Controls/ErrorMessageDisplay.xaml @@ -29,6 +29,7 @@ Fill="{TemplateBinding IconFill}" /> - ResXFileCodeGenerator - Resources.Designer.cs + PublicResXFileCodeGenerator Designer + Resources.Designer.cs true diff --git a/src/GitHub.VisualStudio/Resources.Designer.cs b/src/GitHub.VisualStudio/Resources.Designer.cs index 4e277b0c76..2e41ed6249 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. @@ -22,7 +22,7 @@ namespace GitHub.VisualStudio { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { + public class Resources { private static global::System.Resources.ResourceManager resourceMan; @@ -36,7 +36,7 @@ internal Resources() { /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { + public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GitHub.VisualStudio.Resources", typeof(Resources).Assembly); @@ -51,7 +51,7 @@ internal Resources() { /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { + public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -59,5 +59,482 @@ internal Resources() { resourceCulture = value; } } + + /// + /// Looks up a localized string similar to Invalid authentication code. + /// + public static string authenticationFailedLabelContent { + get { + return ResourceManager.GetString("authenticationFailedLabelContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Try entering the code again or clicking the resend button to get a new authentication code.. + /// + public static string authenticationFailedLabelMessage { + get { + return ResourceManager.GetString("authenticationFailedLabelMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Authentication code sent!. + /// + public static string authenticationSentLabelContent { + get { + return ResourceManager.GetString("authenticationSentLabelContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you do not receive the authentication code, contact support@github.com.. + /// + public static string authenticationSentLabelMessage { + get { + return ResourceManager.GetString("authenticationSentLabelMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Powerful collaboration, code review, and code management for open source and private projects.. + /// + public static string BlurbText { + get { + return ResourceManager.GetString("BlurbText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Browse. + /// + public static string browsePathButtonContent { + get { + return ResourceManager.GetString("browsePathButtonContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Clone. + /// + public static string CloneLink { + get { + return ResourceManager.GetString("CloneLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not connect to github.com. + /// + public static string couldNotConnectToGitHubText { + get { + return ResourceManager.GetString("couldNotConnectToGitHubText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not connect to the server.. + /// + public static string couldNotConnectToTheServerText { + get { + return ResourceManager.GetString("couldNotConnectToTheServerText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create. + /// + public static string CreateLink { + get { + return ResourceManager.GetString("CreateLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Description (Optional). + /// + public static string descriptionOptionalText { + get { + return ResourceManager.GetString("descriptionOptionalText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Description. + /// + public static string descriptionText { + get { + return ResourceManager.GetString("descriptionText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Don’t have an account? . + /// + public static string dontHaveAnAccountText { + get { + return ResourceManager.GetString("dontHaveAnAccountText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Don’t have GitHub Enterprise? . + /// + public static string dontHaveGitHubEnterpriseText { + get { + return ResourceManager.GetString("dontHaveGitHubEnterpriseText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please check your internet connection and try again.. + /// + public static string dotComConnectionFailedMessageMessage { + get { + return ResourceManager.GetString("dotComConnectionFailedMessageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The host isn't available or is not a GitHub Enterprise server. Check the address and try again.. + /// + public static string enterpriseConnectingFailedMessage { + get { + return ResourceManager.GetString("enterpriseConnectingFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to GitHub Enterprise server address. + /// + public static string enterpriseUrlPromptText { + get { + return ResourceManager.GetString("enterpriseUrlPromptText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search repositories. + /// + public static string filterTextPromptText { + get { + return ResourceManager.GetString("filterTextPromptText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (forgot your password?). + /// + public static string ForgotPasswordLink { + get { + return ResourceManager.GetString("ForgotPasswordLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get Started. + /// + public static string GetStartedLink { + get { + return ResourceManager.GetString("GetStartedLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connect…. + /// + public static string GitHubInvitationSectionConnectLabel { + get { + return ResourceManager.GetString("GitHubInvitationSectionConnectLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish to GitHub. + /// + public static string GitHubPublishSectionTitle { + get { + return ResourceManager.GetString("GitHubPublishSectionTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Graphs. + /// + public static string GraphsNavigationItemText { + get { + return ResourceManager.GetString("GraphsNavigationItemText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git ignore. + /// + public static string ignoreTemplateListText { + get { + return ResourceManager.GetString("ignoreTemplateListText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Issues. + /// + public static string IssuesNavigationItemText { + get { + return ResourceManager.GetString("IssuesNavigationItemText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Learn more. + /// + public static string learnMoreLink { + get { + return ResourceManager.GetString("learnMoreLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to License. + /// + public static string licenseListText { + get { + return ResourceManager.GetString("licenseListText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Some or all repositories may not have loaded. Close the dialog and try again.. + /// + public static string loadingFailedMessageContent { + get { + return ResourceManager.GetString("loadingFailedMessageContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An error occurred while loading repositories. + /// + public static string loadingFailedMessageMessage { + get { + return ResourceManager.GetString("loadingFailedMessageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Local path. + /// + public static string localPathText { + get { + return ResourceManager.GetString("localPathText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Check your username and password, then try again. + /// + public static string LoginFailedMessage { + get { + return ResourceManager.GetString("LoginFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Login failed.. + /// + public static string LoginFailedText { + get { + return ResourceManager.GetString("LoginFailedText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Login. + /// + public static string LoginLink { + get { + return ResourceManager.GetString("LoginLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Private Repository. + /// + public static string makePrivateContent { + get { + return ResourceManager.GetString("makePrivateContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name. + /// + public static string nameText { + get { + return ResourceManager.GetString("nameText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No repositories. + /// + public static string noRepositoriesMessageText { + get { + return ResourceManager.GetString("noRepositoriesMessageText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Open the two-factor authentication app on your device to view your authentication code.. + /// + public static string openTwoFactorAuthAppText { + get { + return ResourceManager.GetString("openTwoFactorAuthAppText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to or. + /// + public static string orText { + get { + return ResourceManager.GetString("orText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string PasswordPrompt { + get { + return ResourceManager.GetString("PasswordPrompt", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path. + /// + public static string pathText { + get { + return ResourceManager.GetString("pathText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish. + /// + public static string publishText { + get { + return ResourceManager.GetString("publishText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pull Requests. + /// + public static string PullRequestsNavigationItemText { + get { + return ResourceManager.GetString("PullRequestsNavigationItemText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pulse. + /// + public static string PulseNavigationItemText { + get { + return ResourceManager.GetString("PulseNavigationItemText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This repository does not have a remote. Fill out the form to publish it to GitHub.. + /// + public static string RepoDoesNotHaveRemoteText { + get { + return ResourceManager.GetString("RepoDoesNotHaveRemoteText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository Name. + /// + public static string RepoNameText { + get { + return ResourceManager.GetString("RepoNameText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resend. + /// + public static string resendCodeButtonContent { + get { + return ResourceManager.GetString("resendCodeButtonContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Send the code to your registered SMS Device again. + /// + public static string resendCodeButtonToolTip { + get { + return ResourceManager.GetString("resendCodeButtonToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sign out. + /// + public static string SignOutLink { + get { + return ResourceManager.GetString("SignOutLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sign up. + /// + public static string SignUpLink { + get { + return ResourceManager.GetString("SignUpLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Two-factor authentication. + /// + public static string twoFactorAuthText { + get { + return ResourceManager.GetString("twoFactorAuthText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username or email. + /// + public static string UserNameOrEmailPromptText { + get { + return ResourceManager.GetString("UserNameOrEmailPromptText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verify. + /// + public static string verifyText { + get { + return ResourceManager.GetString("verifyText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wiki. + /// + public static string WikiNavigationItemText { + get { + return ResourceManager.GetString("WikiNavigationItemText", resourceCulture); + } + } } } diff --git a/src/GitHub.VisualStudio/Resources.resx b/src/GitHub.VisualStudio/Resources.resx index 1af7de150c..080a796302 100644 --- a/src/GitHub.VisualStudio/Resources.resx +++ b/src/GitHub.VisualStudio/Resources.resx @@ -117,4 +117,163 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Invalid authentication code + + + Try entering the code again or clicking the resend button to get a new authentication code. + + + Authentication code sent! + + + If you do not receive the authentication code, contact support@github.com. + + + Browse + + + Get Started + + + Could not connect to github.com + + + Could not connect to the server. + + + Create + + + Description (Optional) + + + Description + + + Don’t have an account? + + + Don’t have GitHub Enterprise? + + + Please check your internet connection and try again. + + + (forgot your password?) + + + Login + + + Check your username and password, then try again + + + Password + + + Username or email + + + The host isn't available or is not a GitHub Enterprise server. Check the address and try again. + + + GitHub Enterprise server address + + + An error occurred while loading repositories + + + Some or all repositories may not have loaded. Close the dialog and try again. + + + Search repositories + + + Git ignore + + + Learn more + + + License + + + Local path + + + Login failed. + + + Private Repository + + + Name + + + No repositories + + + Open the two-factor authentication app on your device to view your authentication code. + + + or + + + Publish + + + This repository does not have a remote. Fill out the form to publish it to GitHub. + + + Repository Name + + + Resend + + + Send the code to your registered SMS Device again + + + Sign out + + + Sign up + + + Two-factor authentication + + + Verify + + + Clone + + + Connect… + + + 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..366029b945 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.SignUpLink; Name = "GitHub"; Provider = "GitHub, Inc."; - Description = "Powerful collaboration, code review, and code management for open source and private projects."; + Description = Resources.BlurbText; 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 + Text="{x:Static prop:Resources.LoginLink}" /> @@ -77,11 +78,11 @@ - + - - Don’t have an account? Sign up + + @@ -90,25 +91,23 @@ - + - - Login failed. (forgot your password?) + Message="{x:Static prop:Resources.LoginFailedMessage}"> + + - - Could not connect to github.com - + Message="{x:Static prop:Resources.dotComConnectionFailedMessageMessage}"> + - + - - Don’t have GitHub Enterprise? Learn more + + @@ -142,12 +141,12 @@ - + - + - - Login failed (forgot your password?) + Message="{x:Static prop:Resources.LoginFailedMessage}"> + + - - Could not connect to the server. - + Message="{x:Static prop:Resources.enterpriseConnectingFailedMessage}"> + diff --git a/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCloneControl.xaml b/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCloneControl.xaml index 3c4374aa39..916bcffe69 100644 --- a/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCloneControl.xaml +++ b/src/GitHub.VisualStudio/UI/Views/Controls/RepositoryCloneControl.xaml @@ -1,226 +1,234 @@  - - - - - - - + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI" + xmlns:uirx="clr-namespace:GitHub.UI;assembly=GitHub.UI.Reactive" + xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Views.Controls" + 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" + Background="Transparent"> + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - + + + + + + - - Clone - + + + + + - - - - - - - - + + + - - - - - + + + + + + + + - + diff --git a/src/GitHub.VisualStudio/UI/Views/GitHubConnectContent.xaml b/src/GitHub.VisualStudio/UI/Views/GitHubConnectContent.xaml index 52e1bff55d..961fa56b2d 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:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App" + xmlns:prop="clr-namespace:GitHub.VisualStudio" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" d:DesignBackground="White" KeyboardNavigation.TabNavigation="Local" @@ -145,14 +146,14 @@ - + + - + + - + Visibility="{Binding ShowLogin, Converter={StaticResource BooleanToVisibilityConverter}}" Text="{x:Static prop:Resources.orText}"/> +