From 1889c70add179100c2cbb99180fb3696ac0cc553 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 1 Mar 2016 14:13:45 -0800 Subject: [PATCH 1/5] a --- .../Utilities.UI/UI/InteractiveWindow.cs | 620 +++++++++--------- .../NodejsPackageParametersExtension.cs | 40 +- 2 files changed, 330 insertions(+), 330 deletions(-) diff --git a/Common/Tests/Utilities.UI/UI/InteractiveWindow.cs b/Common/Tests/Utilities.UI/UI/InteractiveWindow.cs index 99669bd41..2abcdb569 100644 --- a/Common/Tests/Utilities.UI/UI/InteractiveWindow.cs +++ b/Common/Tests/Utilities.UI/UI/InteractiveWindow.cs @@ -1,310 +1,310 @@ -/* **************************************************************************** - * - * Copyright (c) Microsoft Corporation. - * - * This source code is subject to terms and conditions of the Apache License, Version 2.0. A - * copy of the license can be found in the License.html file at the root of this distribution. If - * you cannot locate the Apache License, Version 2.0, please send an email to - * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound - * by the terms of the Apache License, Version 2.0. - * - * You must not remove this notice, or any other, from this software. - * - * ***************************************************************************/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading; -using System.Windows; -using System.Windows.Automation; -using System.Windows.Threading; -using Microsoft.VisualStudio.ComponentModelHost; -#if NTVS_FEATURE_INTERACTIVEWINDOW -using Microsoft.NodejsTools.Repl; -#else -using Microsoft.VisualStudio.Repl; -#endif -using Microsoft.VisualStudio.Shell.Interop; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Microsoft.VisualStudio.Text.Editor; -using Microsoft.VisualStudioTools.VSTestHost; - -namespace TestUtilities.UI { - public class InteractiveWindow : EditorWindow { - const string CommandBase = "PythonInteractive."; - - - private sealed class ReplWindowInfo { - public readonly ManualResetEvent Idle = new ManualResetEvent(false); - public readonly ManualResetEvent ReadyForInput = new ManualResetEvent(false); - - public void OnReadyForInput() { - Console.WriteLine("Ready for input"); - ReadyForInput.Set(); - } - } - - private static ConditionalWeakTable _replWindows = new ConditionalWeakTable(); - - private readonly VisualStudioApp _app; - private readonly string _title; - private readonly ReplWindow _replWindow; - private readonly ReplWindowInfo _replWindowInfo; - - public InteractiveWindow(string title, AutomationElement element, VisualStudioApp app) - : base(null, element) { - _app = app; - _title = title; - - var compModel = _app.GetService(typeof(SComponentModel)); - var replWindowProvider = compModel.GetService(); - _replWindow = replWindowProvider.GetReplWindows() - .OfType() - .FirstOrDefault(p => p.Title.Equals(title, StringComparison.CurrentCulture)); - - _replWindowInfo = _replWindows.GetValue(_replWindow, window => { - var info = new ReplWindowInfo(); - window.ReadyForInput += new Action(info.OnReadyForInput); - return info; - }); - } - - public void Close() { - var frame = _replWindow.Frame as IVsWindowFrame; - if (frame != null) { - frame.Hide(); - } - } - - public static void CloseAll(VisualStudioApp app = null) { - IComponentModel compModel; - if (app != null) { - compModel = app.GetService(typeof(SComponentModel)); - } else { - compModel = (IComponentModel)VSTestContext.ServiceProvider.GetService(typeof(SComponentModel)); - } - var replWindowProvider = compModel.GetService(); - foreach (var frame in replWindowProvider.GetReplWindows() - .OfType() - .Select(r => r.Frame) - .OfType()) { - frame.Hide(); - } - } - - public void WaitForIdleState() { - DispatchAndWait(_replWindowInfo.Idle, () => { }, DispatcherPriority.ApplicationIdle); - } - - public void DispatchAndWait(EventWaitHandle waitHandle, Action action, DispatcherPriority priority = DispatcherPriority.Normal) { - Dispatcher dispatcher = ((FrameworkElement)ReplWindow.TextView).Dispatcher; - waitHandle.Reset(); - - dispatcher.Invoke(new Action(() => { - action(); - waitHandle.Set(); - }), priority); - - Assert.IsTrue(waitHandle.WaitOne(500)); - } - - public void WaitForText(params string[] text) { - WaitForText((IList)text); - } - - public void WaitForText(IList text) { - string expected = null; - for (int i = 0; i < 100; i++) { - WaitForIdleState(); - expected = GetExpectedText(text); - if (expected.Equals(Text, StringComparison.CurrentCulture)) { - return; - } - Thread.Sleep(100); - } - - FailWrongText(expected); - } - - public void WaitForTextContainsAll(params string[] substrings) { - for (int i = 0; i < 100; ++i) { - WaitForIdleState(); - var text = Text; - if (substrings.All(s => text.Contains(s))) { - return; - } - Thread.Sleep(100); - } - - FailWrongText("All of: " + string.Join(", ", substrings.Select(s => "<" + s + ">"))); - } - - public void WaitForTextIPython(params string[] text) { - WaitForTextIPython((IList)text); - } - - public void WaitForTextIPython(IList text) { - string expected = null; - for (int i = 0; i < 100; i++) { - WaitForIdleState(); - expected = GetExpectedText(text); - if (expected.Equals(GetIPythonText(), StringComparison.CurrentCulture)) { - return; - } - Thread.Sleep(100); - } - - FailWrongTextIPython(expected); - } - - private string GetIPythonText() { - var text = Text; - var lines = Text.Split(new[] { "\r\n" }, StringSplitOptions.None); - StringBuilder res = new StringBuilder(); - for (int i = 0; i < lines.Length; i++) { - var line = lines[i]; - - if (!line.StartsWith("[IPKernelApp] ")) { - if (i != lines.Length - 1 || text.EndsWith("\r\n")) { - res.AppendLine(line); - } else { - res.Append(line); - } - } - } - return res.ToString(); - } - - public void WaitForTextStartIPython(params string[] text) { - string expected = GetExpectedText(text); - - for (int i = 0; i < 100; i++) { - string curText = Text; - - if (GetIPythonText().StartsWith(expected, StringComparison.CurrentCulture)) { - return; - } - Thread.Sleep(100); - } - - FailWrongText(expected); - } - - private void FailWrongText(string expected) { - StringBuilder msg = new StringBuilder("Did not get text: "); - AppendRepr(msg, expected); - msg.Append(" instead got "); - AppendRepr(msg, Text); - Assert.Fail(msg.ToString()); - } - - private void FailWrongTextIPython(string expected) { - StringBuilder msg = new StringBuilder("Did not get text: "); - AppendRepr(msg, expected); - msg.Append(" instead got "); - AppendRepr(msg, GetIPythonText()); - Assert.Fail(msg.ToString()); - } - - public void WaitForSessionDismissed() { - var sessionStack = IntellisenseSessionStack; - for (int i = 0; i < 20; i++) { - if (sessionStack.TopSession == null) { - break; - } - System.Threading.Thread.Sleep(500); - } - - while (sessionStack.TopSession != null) { - sessionStack.TopSession.Dismiss(); - } - Assert.AreEqual(null, sessionStack.TopSession); - } - - public ManualResetEvent ReadyForInput { - get { - return _replWindowInfo.ReadyForInput; - } - } - - public void ClearInput() { - var buffer = _replWindow.CurrentLanguageBuffer; - if (buffer == null) { - return; - } - - var edit = buffer.CreateEdit(); - edit.Delete(0, edit.Snapshot.Length); - edit.Apply(); - } - - public void ClearScreen(bool waitForReady = true) { - Console.WriteLine("REPL Clearing screen"); - if (waitForReady) { - ReadyForInput.Reset(); - } - _app.ExecuteCommand(CommandBase + "ClearScreen"); - if (waitForReady) { - Assert.IsTrue(ReadyForInput.WaitOne(1000)); - } - } - - public void CancelExecution(int attempts = 100) { - Console.WriteLine("REPL Cancelling Execution"); - ReadyForInput.Reset(); - for (int i = 0; i < attempts && !_replWindowInfo.ReadyForInput.WaitOne(0); i++) { - ReadyForInput.Reset(); - try { - _app.ExecuteCommand(CommandBase + "CancelExecution"); - } catch { - // command may not be immediately available - } - if (ReadyForInput.WaitOne(1000)) { - break; - } - } - Assert.IsTrue(ReadyForInput.WaitOne(10000)); - } - - internal IReplWindow2 ReplWindow { - get { - return _replWindow; - } - } - - public override IWpfTextView TextView { - get { - return ReplWindow.TextView; - } - } - - public void Reset() { - Console.WriteLine("REPL resetting"); - - Assert.IsTrue(ReplWindow.Reset().Wait(10000)); - } - - public void WithStandardInputPrompt(string prompt, Action action) { - if ((bool)ReplWindow.GetOptionValue(ReplOptions.DisplayPromptInMargin)) { - action(String.Empty); - return; - } - - string oldPrompt = (string)ReplWindow.GetOptionValue(ReplOptions.StandardInputPrompt); - ReplWindow.SetOptionValue(ReplOptions.StandardInputPrompt, prompt); - try { - action(prompt); - } finally { - ReplWindow.SetOptionValue(ReplOptions.StandardInputPrompt, oldPrompt); - } - } - - internal virtual bool IsTabGroupContainer(AutomationElement element) { - var clsName = element.GetCurrentPropertyValue(AutomationElement.ClassNameProperty) as string; - return clsName == "ToolWindowTabGroupContainer" || clsName == "FloatingWindow"; - } - } -} +/* **************************************************************************** + * + * Copyright (c) Microsoft Corporation. + * + * This source code is subject to terms and conditions of the Apache License, Version 2.0. A + * copy of the license can be found in the License.html file at the root of this distribution. If + * you cannot locate the Apache License, Version 2.0, please send an email to + * vspython@microsoft.com. By using this source code in any fashion, you are agreeing to be bound + * by the terms of the Apache License, Version 2.0. + * + * You must not remove this notice, or any other, from this software. + * + * ***************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Threading; +using Microsoft.VisualStudio.ComponentModelHost; +#if NTVS_FEATURE_INTERACTIVEWINDOW +using Microsoft.NodejsTools.Repl; +#else +using Microsoft.VisualStudio.Repl; +#endif +using Microsoft.VisualStudio.Shell.Interop; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.VisualStudio.Text.Editor; +using Microsoft.VisualStudioTools.VSTestHost; + +namespace TestUtilities.UI { + public class InteractiveWindow : EditorWindow { + const string CommandBase = "PythonInteractive."; + + + private sealed class ReplWindowInfo { + public readonly ManualResetEvent Idle = new ManualResetEvent(false); + public readonly ManualResetEvent ReadyForInput = new ManualResetEvent(false); + + public void OnReadyForInput() { + Console.WriteLine("Ready for input"); + ReadyForInput.Set(); + } + } + + private static ConditionalWeakTable _replWindows = new ConditionalWeakTable(); + + private readonly VisualStudioApp _app; + private readonly string _title; + private readonly ReplWindow _replWindow; + private readonly ReplWindowInfo _replWindowInfo; + + public InteractiveWindow(string title, AutomationElement element, VisualStudioApp app) + : base(null, element) { + _app = app; + _title = title; + + var compModel = _app.GetService(typeof(SComponentModel)); + var replWindowProvider = compModel.GetService(); + _replWindow = replWindowProvider.GetReplWindows() + .OfType() + .FirstOrDefault(p => p.Title.Equals(title, StringComparison.CurrentCulture)); + + _replWindowInfo = _replWindows.GetValue(_replWindow, window => { + var info = new ReplWindowInfo(); + window.ReadyForInput += new Action(info.OnReadyForInput); + return info; + }); + } + + public void Close() { + var frame = _replWindow.Frame as IVsWindowFrame; + if (frame != null) { + frame.Hide(); + } + } + + public static void CloseAll(VisualStudioApp app = null) { + IComponentModel compModel; + if (app != null) { + compModel = app.GetService(typeof(SComponentModel)); + } else { + compModel = (IComponentModel)VSTestContext.ServiceProvider.GetService(typeof(SComponentModel)); + } + var replWindowProvider = compModel.GetService(); + foreach (var frame in replWindowProvider.GetReplWindows() + .OfType() + .Select(r => r.Frame) + .OfType()) { + frame.Hide(); + } + } + + public void WaitForIdleState() { + DispatchAndWait(_replWindowInfo.Idle, () => { }, DispatcherPriority.ApplicationIdle); + } + + public void DispatchAndWait(EventWaitHandle waitHandle, Action action, DispatcherPriority priority = DispatcherPriority.Normal) { + Dispatcher dispatcher = ((FrameworkElement)ReplWindow.TextView).Dispatcher; + waitHandle.Reset(); + + dispatcher.Invoke(new Action(() => { + action(); + waitHandle.Set(); + }), priority); + + Assert.IsTrue(waitHandle.WaitOne(500)); + } + + public void WaitForText(params string[] text) { + WaitForText((IList)text); + } + + public void WaitForText(IList text) { + string expected = null; + for (int i = 0; i < 100; i++) { + WaitForIdleState(); + expected = GetExpectedText(text); + if (expected.Equals(Text, StringComparison.CurrentCulture)) { + return; + } + Thread.Sleep(100); + } + + FailWrongText(expected); + } + + public void WaitForTextContainsAll(params string[] substrings) { + for (int i = 0; i < 100; ++i) { + WaitForIdleState(); + var text = Text; + if (substrings.All(s => text.Contains(s))) { + return; + } + Thread.Sleep(100); + } + + FailWrongText("All of: " + string.Join(", ", substrings.Select(s => "<" + s + ">"))); + } + + public void WaitForTextIPython(params string[] text) { + WaitForTextIPython((IList)text); + } + + public void WaitForTextIPython(IList text) { + string expected = null; + for (int i = 0; i < 100; i++) { + WaitForIdleState(); + expected = GetExpectedText(text); + if (expected.Equals(GetIPythonText(), StringComparison.CurrentCulture)) { + return; + } + Thread.Sleep(100); + } + + FailWrongTextIPython(expected); + } + + private string GetIPythonText() { + var text = Text; + var lines = Text.Split(new[] { "\r\n" }, StringSplitOptions.None); + StringBuilder res = new StringBuilder(); + for (int i = 0; i < lines.Length; i++) { + var line = lines[i]; + + if (!line.StartsWith("[IPKernelApp] ")) { + if (i != lines.Length - 1 || text.EndsWith("\r\n")) { + res.AppendLine(line); + } else { + res.Append(line); + } + } + } + return res.ToString(); + } + + public void WaitForTextStartIPython(params string[] text) { + string expected = GetExpectedText(text); + + for (int i = 0; i < 100; i++) { + string curText = Text; + + if (GetIPythonText().StartsWith(expected, StringComparison.CurrentCulture)) { + return; + } + Thread.Sleep(100); + } + + FailWrongText(expected); + } + + private void FailWrongText(string expected) { + StringBuilder msg = new StringBuilder("Did not get text: "); + AppendRepr(msg, expected); + msg.Append(" instead got "); + AppendRepr(msg, Text); + Assert.Fail(msg.ToString()); + } + + private void FailWrongTextIPython(string expected) { + StringBuilder msg = new StringBuilder("Did not get text: "); + AppendRepr(msg, expected); + msg.Append(" instead got "); + AppendRepr(msg, GetIPythonText()); + Assert.Fail(msg.ToString()); + } + + public void WaitForSessionDismissed() { + var sessionStack = IntellisenseSessionStack; + for (int i = 0; i < 20; i++) { + if (sessionStack.TopSession == null) { + break; + } + System.Threading.Thread.Sleep(500); + } + + while (sessionStack.TopSession != null) { + sessionStack.TopSession.Dismiss(); + } + Assert.AreEqual(null, sessionStack.TopSession); + } + + public ManualResetEvent ReadyForInput { + get { + return _replWindowInfo.ReadyForInput; + } + } + + public void ClearInput() { + var buffer = _replWindow.CurrentLanguageBuffer; + if (buffer == null) { + return; + } + + var edit = buffer.CreateEdit(); + edit.Delete(0, edit.Snapshot.Length); + edit.Apply(); + } + + public void ClearScreen(bool waitForReady = true) { + Console.WriteLine("REPL Clearing screen"); + if (waitForReady) { + ReadyForInput.Reset(); + } + _app.ExecuteCommand(CommandBase + "ClearScreen"); + if (waitForReady) { + Assert.IsTrue(ReadyForInput.WaitOne(1000)); + } + } + + public void CancelExecution(int attempts = 100) { + Console.WriteLine("REPL Cancelling Execution"); + ReadyForInput.Reset(); + for (int i = 0; i < attempts && !_replWindowInfo.ReadyForInput.WaitOne(0); i++) { + ReadyForInput.Reset(); + try { + _app.ExecuteCommand(CommandBase + "CancelExecution"); + } catch { + // command may not be immediately available + } + if (ReadyForInput.WaitOne(1000)) { + break; + } + } + Assert.IsTrue(ReadyForInput.WaitOne(10000)); + } + + internal IReplWindow2 ReplWindow { + get { + return _replWindow; + } + } + + public override IWpfTextView TextView { + get { + return ReplWindow.TextView; + } + } + + public void Reset() { + Console.WriteLine("REPL resetting"); + + Assert.IsTrue(ReplWindow.Reset().Wait(10000)); + } + + public void WithStandardInputPrompt(string prompt, Action action) { + if ((bool)ReplWindow.GetOptionValue(ReplOptions.DisplayPromptInMargin)) { + action(String.Empty); + return; + } + + string oldPrompt = (string)ReplWindow.GetOptionValue(ReplOptions.StandardInputPrompt); + ReplWindow.SetOptionValue(ReplOptions.StandardInputPrompt, prompt); + try { + action(prompt); + } finally { + ReplWindow.SetOptionValue(ReplOptions.StandardInputPrompt, oldPrompt); + } + } + + internal virtual bool IsTabGroupContainer(AutomationElement element) { + var clsName = element.GetCurrentPropertyValue(AutomationElement.ClassNameProperty) as string; + return clsName == "ToolWindowTabGroupContainer" || clsName == "FloatingWindow"; + } + } +} diff --git a/Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs b/Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs index 406411bbf..49101ccf8 100644 --- a/Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs +++ b/Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs @@ -19,7 +19,7 @@ using System.Text.RegularExpressions; using EnvDTE; using Microsoft.VisualStudio.TemplateWizard; - + namespace Microsoft.NodejsTools.ProjectWizard { class NodejsPackageParametersExtension : IWizard { public void RunStarted(object automationObject, Dictionary replacementsDictionary, WizardRunKind runKind, object[] customParams) { @@ -45,25 +45,25 @@ public void BeforeOpeningFile(ProjectItem projectItem) { public void RunFinished() { return; - } - - private const int NpmPackageNameMaxLength = 214; - - /// - /// Normalize a project name to be a valid Npm package name: https://docs.npmjs.com/files/package.json#name - /// - /// Name of a VS project. - private static string NormalizeNpmPackageName(string projectName) { - // Remove all leading url-invalid, underscore, and period characters - var npmProjectNameTransform = Regex.Replace(projectName, "^[^a-zA-Z0-9-~]*", string.Empty); - - // Replace all invalid characters with a dash - npmProjectNameTransform = Regex.Replace(npmProjectNameTransform, "[^a-zA-Z0-9-_~.]", "-"); - - // Insert hyphens between camelcased sections. - npmProjectNameTransform = Regex.Replace(npmProjectNameTransform, "([a-z0-9])([A-Z])", "$1-$2").ToLowerInvariant(); - - return npmProjectNameTransform.Substring(0, Math.Min(npmProjectNameTransform.Length, NpmPackageNameMaxLength)); + } + + private const int NpmPackageNameMaxLength = 214; + + /// + /// Normalize a project name to be a valid Npm package name: https://docs.npmjs.com/files/package.json#name + /// + /// Name of a VS project. + private static string NormalizeNpmPackageName(string projectName) { + // Remove all leading url-invalid, underscore, and period characters + var npmProjectNameTransform = Regex.Replace(projectName, "^[^a-zA-Z0-9-~]*", string.Empty); + + // Replace all invalid characters with a dash + npmProjectNameTransform = Regex.Replace(npmProjectNameTransform, "[^a-zA-Z0-9-_~.]", "-"); + + // Insert hyphens between camelcased sections. + npmProjectNameTransform = Regex.Replace(npmProjectNameTransform, "([a-z0-9])([A-Z])", "$1-$2").ToLowerInvariant(); + + return npmProjectNameTransform.Substring(0, Math.Min(npmProjectNameTransform.Length, NpmPackageNameMaxLength)); } } } From 7ad00bfda6970299b63ad0bdaec7b508121a6d73 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 2 Mar 2016 17:18:56 -0800 Subject: [PATCH 2/5] Use generated, strongly typed resource file in Nodejs **Defect** To get string resources, we currently, access everything through an SR class. This class hardcodes a bunch of strings to lookup resources in a resx by name. Hardcoding these strings is not great because these strings can get out of sync with the actual resx file. **Fix** This hooks up the resx file to generate an typed cs file automatically. This ensures that the resx file and the string resource uses cannot get out of sync. --- .../Product/Nodejs/BaseNodeProjectFactory.cs | 3 +- .../Nodejs/Commands/ImportWizardCommand.cs | 4 +- .../Debugger/Communication/DebuggerClient.cs | 4 +- .../Nodejs/Debugger/DebugEngine/AD7Engine.cs | 5 +- Nodejs/Product/Nodejs/EditFilter.cs | 4 +- .../Nodejs/Intellisense/AnalysisQueue.cs | 10 +- .../Intellisense/IntellisenseController.cs | 4 +- .../Nodejs/Intellisense/TaskProvider.cs | 4 +- .../Nodejs/Intellisense/VsProjectAnalyzer.cs | 12 +- .../Product/Nodejs/Jade/IdleTimeAsyncTask.cs | 6 +- Nodejs/Product/Nodejs/Nodejs.cs | 8 +- Nodejs/Product/Nodejs/Nodejs.csproj | 7 + .../NpmUI/LastRefreshedMessageProvider.cs | 22 +- .../Nodejs/NpmUI/NpmOutputViewModel.cs | 12 +- .../NpmUI/NpmPackageInstallViewModel.cs | 2 +- .../NpmUI/PackageCatalogEntryViewModel.cs | 2 +- .../Nodejs/Options/NodejsNpmOptionsControl.cs | 2 +- Nodejs/Product/Nodejs/Project/Attributes.cs | 6 +- .../Product/Nodejs/Project/DependencyNode.cs | 2 +- .../Project/DependencyNodeProperties.cs | 112 +- .../Product/Nodejs/Project/NodeModulesNode.cs | 14 +- .../Project/NodejsFileNodeProperties.cs | 21 +- .../Nodejs/Project/NodejsFolderNode.cs | 10 +- .../NodejsGeneralPropertyPageControl.cs | 28 +- .../Nodejs/Project/NodejsProjectLauncher.cs | 4 +- .../Nodejs/Project/NodejsProjectNode.cs | 22 +- .../Project/NodejsProjectNodeProperties.cs | 36 +- .../NodejsTypeScriptFileNodeProperties.cs | 20 +- .../Nodejs/Project/NpmNodeProperties.cs | 16 +- .../Nodejs/Project/ProjectResources.cs | 4 +- .../Nodejs/Repl/NodejsReplEvaluator.cs | 6 +- Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs | 5 +- Nodejs/Product/Nodejs/Resources.Designer.cs | 1493 +++++++++++++++++ .../ProjectWizard/CloudServiceWizard.cs | 20 +- Nodejs/Product/ProjectWizard/WizardHelpers.cs | 4 +- 35 files changed, 1715 insertions(+), 219 deletions(-) create mode 100644 Nodejs/Product/Nodejs/Resources.Designer.cs diff --git a/Nodejs/Product/Nodejs/BaseNodeProjectFactory.cs b/Nodejs/Product/Nodejs/BaseNodeProjectFactory.cs index 484bdf7ec..1d72e13f3 100644 --- a/Nodejs/Product/Nodejs/BaseNodeProjectFactory.cs +++ b/Nodejs/Product/Nodejs/BaseNodeProjectFactory.cs @@ -22,7 +22,6 @@ using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudioTools.Project; using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; -using SR = Microsoft.NodejsTools.Project.SR; namespace Microsoft.NodejsTools { [Guid(Guids.NodejsBaseProjectFactoryString)] @@ -51,7 +50,7 @@ protected override void UpgradeProject(ref ProjectRootElement projectXml, ref Pr var globals = projectXml.PropertyGroups.FirstOrDefault() ?? projectXml.AddPropertyGroup(); AddOrSetProperty(globals, NodejsConstants.Environment, envVarsProp.Value.Replace(";", "\r\n")); envVarsProp.Parent.RemoveChild(envVarsProp); - log(__VSUL_ERRORLEVEL.VSUL_INFORMATIONAL, SR.GetString(SR.UpgradedEnvironmentVariables)); + log(__VSUL_ERRORLEVEL.VSUL_INFORMATIONAL, Resources.UpgradedEnvironmentVariables); } } diff --git a/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs b/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs index 2d5fe4e16..61be07d8e 100644 --- a/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs +++ b/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs @@ -68,7 +68,7 @@ public override void DoCommand(object sender, EventArgs args) { "Some file paths could not be accessed." + Environment.NewLine + "Try moving your source code to a location where you " + "can read and write files.", - SR.ProductName + NodeJsProjectSr.ProductName ); } else { string exName = String.Empty; @@ -79,7 +79,7 @@ public override void DoCommand(object sender, EventArgs args) { MessageBox.Show( "An unexpected error " + exName + "occurred while creating your project.", - SR.ProductName + NodeJsProjectSr.ProductName ); } return; diff --git a/Nodejs/Product/Nodejs/Debugger/Communication/DebuggerClient.cs b/Nodejs/Product/Nodejs/Debugger/Communication/DebuggerClient.cs index 72c8791cc..685604a8f 100644 --- a/Nodejs/Product/Nodejs/Debugger/Communication/DebuggerClient.cs +++ b/Nodejs/Product/Nodejs/Debugger/Communication/DebuggerClient.cs @@ -22,9 +22,9 @@ using System.Threading.Tasks; using Microsoft.NodejsTools.Debugger.Commands; using Microsoft.NodejsTools.Debugger.Events; +using Microsoft.NodejsTools.Project; using Microsoft.VisualStudioTools.Project; using Newtonsoft.Json.Linq; -using SR = Microsoft.NodejsTools.Project.SR; namespace Microsoft.NodejsTools.Debugger.Communication { sealed class DebuggerClient : IDebuggerClient { @@ -103,7 +103,7 @@ public static async void RunWithRequestExceptionsHandled(Func action) { private void OnConnectionClosed(object sender, EventArgs e) { ConcurrentDictionary> messages = Interlocked.Exchange(ref _messages, new ConcurrentDictionary>()); foreach (var kv in messages) { - var exception = new IOException(SR.GetString(SR.DebuggerConnectionClosed)); + var exception = new IOException(Resources.DebuggerConnectionClosed); kv.Value.SetException(exception); } diff --git a/Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7Engine.cs b/Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7Engine.cs index d56fc4325..aeea1ef3d 100644 --- a/Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7Engine.cs +++ b/Nodejs/Product/Nodejs/Debugger/DebugEngine/AD7Engine.cs @@ -31,7 +31,6 @@ using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudioTools.Project; -using SR = Microsoft.NodejsTools.Project.SR; namespace Microsoft.NodejsTools.Debugger.DebugEngine { // AD7Engine is the primary entrypoint object for the debugging engine. @@ -1233,7 +1232,7 @@ private void OnDocumentSaved(Document document) { if (String.Equals(Path.GetExtension(module.FileName), NodejsConstants.TypeScriptExtension, StringComparison.OrdinalIgnoreCase)) { if (document.ProjectItem.ContainingProject.GetNodeProject().Build(null, null) != MSBuildResult.Successful) { var statusBar = (IVsStatusbar)ServiceProvider.GlobalProvider.GetService(typeof(SVsStatusbar)); - statusBar.SetText(SR.GetString(SR.DebuggerModuleUpdateFailed)); + statusBar.SetText(Resources.DebuggerModuleUpdateFailed); return; } } @@ -1241,7 +1240,7 @@ private void OnDocumentSaved(Document document) { DebuggerClient.RunWithRequestExceptionsHandled(async () => { if (!await Process.UpdateModuleSourceAsync(module).ConfigureAwait(false)) { var statusBar = (IVsStatusbar)ServiceProvider.GlobalProvider.GetService(typeof(SVsStatusbar)); - statusBar.SetText(SR.GetString(SR.DebuggerModuleUpdateFailed)); + statusBar.SetText(Resources.DebuggerModuleUpdateFailed); } }); } diff --git a/Nodejs/Product/Nodejs/EditFilter.cs b/Nodejs/Product/Nodejs/EditFilter.cs index 520b69eca..96ffe12b6 100644 --- a/Nodejs/Product/Nodejs/EditFilter.cs +++ b/Nodejs/Product/Nodejs/EditFilter.cs @@ -225,9 +225,9 @@ private int GotoDefinition() { } } else if (values.Count + definitions.Count == 0) { if (String.IsNullOrWhiteSpace(analysis.Expression)) { - MessageBox.Show(String.Format("Cannot go to definition. The cursor is not on a symbol."), SR.ProductName); + MessageBox.Show(String.Format("Cannot go to definition. The cursor is not on a symbol."), NodeJsProjectSr.ProductName); } else { - MessageBox.Show(String.Format("Cannot go to definition \"{0}\"", analysis.Expression), SR.ProductName); + MessageBox.Show(String.Format("Cannot go to definition \"{0}\"", analysis.Expression), NodeJsProjectSr.ProductName); } } else if (definitions.Count == 0) { ShowFindSymbolsDialog(analysis, new SymbolList("Values", StandardGlyphGroup.GlyphForwardType, values.Values)); diff --git a/Nodejs/Product/Nodejs/Intellisense/AnalysisQueue.cs b/Nodejs/Product/Nodejs/Intellisense/AnalysisQueue.cs index 924021e19..31c05ad6f 100644 --- a/Nodejs/Product/Nodejs/Intellisense/AnalysisQueue.cs +++ b/Nodejs/Product/Nodejs/Intellisense/AnalysisQueue.cs @@ -188,21 +188,21 @@ private void Worker(object threadStarted) { int count = _analyzer._jsAnalyzer.GetAndClearAnalysisCount(); if (count != 0) { var elapsedTime = TimeSpan.FromMilliseconds(watch.ElapsedMilliseconds - startTime); - statsMessage = SR.GetString(SR.StatusAnalysisUpToDate, count, FormatTime(elapsedTime)); + statsMessage = String.Format(Resources.StatusAnalysisUpToDate, count, FormatTime(elapsedTime)); } } if (_analyzer._saveToDisk && analyzedAnything && (DateTime.Now - _lastSave) > _SaveAnalysisTime) { var statusbar = (IVsStatusbar)NodejsPackage.GetGlobalService(typeof(SVsStatusbar)); if (statusbar != null) { - statusbar.SetText(SR.GetString(SR.StatusAnalysisSaving) + " " + statsMessage); + statusbar.SetText(Resources.StatusAnalysisSaving + " " + statsMessage); } _analyzer.SaveAnalysis(); _lastSave = DateTime.Now; if (statusbar != null) { - statusbar.SetText(SR.GetString(SR.StatusAnalysisSaved) + " " + statsMessage); + statusbar.SetText(Resources.StatusAnalysisSaved + " " + statsMessage); } } else if(statsMessage != null) { var statusbar = (IVsStatusbar)NodejsPackage.GetGlobalService(typeof(SVsStatusbar)); @@ -224,9 +224,9 @@ private void Worker(object threadStarted) { private static string FormatTime(TimeSpan elapsedTime) { if (elapsedTime.TotalMilliseconds < 1000) { - return elapsedTime.TotalMilliseconds + " " + SR.GetString(SR.Milliseconds); + return elapsedTime.TotalMilliseconds + " " + Resources.Milliseconds; } else if (elapsedTime.TotalSeconds < 60) { - return elapsedTime.TotalSeconds + " " + SR.GetString(SR.Seconds); + return elapsedTime.TotalSeconds + " " + Resources.Seconds; } return elapsedTime.ToString("g"); } diff --git a/Nodejs/Product/Nodejs/Intellisense/IntellisenseController.cs b/Nodejs/Product/Nodejs/Intellisense/IntellisenseController.cs index 7f925b5dc..6254c0ac5 100644 --- a/Nodejs/Product/Nodejs/Intellisense/IntellisenseController.cs +++ b/Nodejs/Product/Nodejs/Intellisense/IntellisenseController.cs @@ -663,10 +663,10 @@ private void TriggerSnippet(uint nCmdID) { string prompt; string[] snippetTypes; if ((VSConstants.VSStd2KCmdID)nCmdID == VSConstants.VSStd2KCmdID.SURROUNDWITH) { - prompt = SR.GetString(SR.SurroundWith); + prompt = Resources.SurroundWith; snippetTypes = _surroundsWithSnippetTypes; } else { - prompt = SR.GetString(SR.InsertSnippet); + prompt = Resources.InsertSnippet; snippetTypes = _allStandardSnippetTypes; } diff --git a/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs b/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs index 1a0df2484..6d63b6718 100644 --- a/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs +++ b/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs @@ -479,7 +479,7 @@ private void Worker() { private void Refresh() { _serviceProvider.GetUIThread().MustNotBeCalledFromUIThread("Refresh must not be called from the UI thread"); - RefreshAsync().WaitAndHandleAllExceptions(SR.ProductName, GetType()); + RefreshAsync().WaitAndHandleAllExceptions(NodeJsProjectSr.ProductName, GetType()); } private async Task RefreshAsync() { @@ -563,7 +563,7 @@ private void SendMessage(WorkerMessage message) { if (!_hasWorker) { _hasWorker = true; Task.Run(() => Worker()) - .HandleAllExceptions(SR.ProductName, GetType()) + .HandleAllExceptions(NodeJsProjectSr.ProductName, GetType()) .DoNotWait(); } } diff --git a/Nodejs/Product/Nodejs/Intellisense/VsProjectAnalyzer.cs b/Nodejs/Product/Nodejs/Intellisense/VsProjectAnalyzer.cs index 956f0bc28..a6b3f7b9e 100644 --- a/Nodejs/Product/Nodejs/Intellisense/VsProjectAnalyzer.cs +++ b/Nodejs/Product/Nodejs/Intellisense/VsProjectAnalyzer.cs @@ -28,6 +28,7 @@ using Microsoft.NodejsTools.Classifier; using Microsoft.NodejsTools.Options; using Microsoft.NodejsTools.Parsing; +using Microsoft.NodejsTools.Project; using Microsoft.NodejsTools.Repl; using Microsoft.VisualStudio.Language.Intellisense; using Microsoft.VisualStudio.Shell.Interop; @@ -35,7 +36,6 @@ using Microsoft.VisualStudio.Text.Adornments; using Microsoft.VisualStudioTools; using Microsoft.Win32; -using SR = Microsoft.NodejsTools.Project.SR; using Task = System.Threading.Tasks.Task; namespace Microsoft.NodejsTools.Intellisense { @@ -1349,7 +1349,7 @@ private bool LoadCachedAnalysis(AnalysisLimits limits) { if (DbHeader.SequenceEqual(header)) { var statusbar = (IVsStatusbar)NodejsPackage.GetGlobalService(typeof(SVsStatusbar)); if (statusbar != null) { - statusbar.SetText(SR.GetString(SR.StatusAnalysisLoading)); + statusbar.SetText(Resources.StatusAnalysisLoading); } Task.Run(() => { @@ -1369,20 +1369,20 @@ private bool LoadCachedAnalysis(AnalysisLimits limits) { _jsAnalyzer = analyzer; if (statusbar != null) { - statusbar.SetText(SR.GetString(SR.StatusAnalysisLoaded)); + statusbar.SetText(Resources.StatusAnalysisLoaded); } } } } catch (InvalidOperationException) { // corrupt or invalid DB if (statusbar != null) { - statusbar.SetText(SR.GetString(SR.StatusAnalysisLoadFailed)); + statusbar.SetText(Resources.StatusAnalysisLoadFailed); } } catch (Exception e) { Debug.Fail(String.Format("Unexpected exception while loading analysis: {0}", e)); // bug in deserialization if (statusbar != null) { - statusbar.SetText(SR.GetString(SR.StatusAnalysisLoadFailed)); + statusbar.SetText(Resources.StatusAnalysisLoadFailed); } } finally { stream.Dispose(); @@ -1401,7 +1401,7 @@ private bool LoadCachedAnalysis(AnalysisLimits limits) { } } } - }).HandleAllExceptions(SR.GetString(SR.NodejsToolsForVisualStudio)).DoNotWait(); + }).HandleAllExceptions(Resources.NodejsToolsForVisualStudio).DoNotWait(); disposeStream = false; return true; } diff --git a/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs b/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs index 9a2225803..04b638178 100644 --- a/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs +++ b/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs @@ -18,10 +18,10 @@ using System.Diagnostics; using System.Threading; using System.Threading.Tasks; +using Microsoft.NodejsTools.Project; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudioTools; using Microsoft.VisualStudioTools.Project; -using SR = Microsoft.NodejsTools.Project.SR; namespace Microsoft.NodejsTools.Jade { /// @@ -166,12 +166,12 @@ private void DoTaskInternal() { result = ex; } finally { NodejsPackage.Instance.GetUIThread().InvokeAsync(() => UIThreadCompletedCallback(result)) - .HandleAllExceptions(SR.ProductName) + .HandleAllExceptions(NodeJsProjectSr.ProductName) .DoNotWait(); } } else if (Interlocked.Read(ref _closed) > 0) { NodejsPackage.Instance.GetUIThread().InvokeAsync((() => UIThreadCanceledCallback(null))) - .HandleAllExceptions(SR.ProductName) + .HandleAllExceptions(NodeJsProjectSr.ProductName) .DoNotWait(); } }); diff --git a/Nodejs/Product/Nodejs/Nodejs.cs b/Nodejs/Product/Nodejs/Nodejs.cs index 140719cca..cd554b547 100644 --- a/Nodejs/Product/Nodejs/Nodejs.cs +++ b/Nodejs/Product/Nodejs/Nodejs.cs @@ -120,8 +120,8 @@ public static string GetPathToNodeExecutableFromEnvironment(string executable = #if !NO_WINDOWS public static void ShowNodejsNotInstalled() { MessageBox.Show( - SR.GetString(SR.NodejsNotInstalled), - SR.ProductName, + Resources.NodejsNotInstalled, + NodeJsProjectSr.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error ); @@ -129,8 +129,8 @@ public static void ShowNodejsNotInstalled() { public static void ShowNodejsPathNotFound(string path) { MessageBox.Show( - SR.GetString(SR.NodeExeDoesntExist, path), - SR.ProductName, + string.Format(Resources.NodeExeDoesntExist, path), + NodeJsProjectSr.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error ); diff --git a/Nodejs/Product/Nodejs/Nodejs.csproj b/Nodejs/Product/Nodejs/Nodejs.csproj index 56464a0c8..cec9ecae3 100644 --- a/Nodejs/Product/Nodejs/Nodejs.csproj +++ b/Nodejs/Product/Nodejs/Nodejs.csproj @@ -403,6 +403,11 @@ + + True + True + Resources.resx + @@ -1659,6 +1664,8 @@ Microsoft.NodejsTools.Resources true Designer + PublicResXFileCodeGenerator + Resources.Designer.cs diff --git a/Nodejs/Product/Nodejs/NpmUI/LastRefreshedMessageProvider.cs b/Nodejs/Product/Nodejs/NpmUI/LastRefreshedMessageProvider.cs index 79f4eb285..a3c68db83 100644 --- a/Nodejs/Product/Nodejs/NpmUI/LastRefreshedMessageProvider.cs +++ b/Nodejs/Product/Nodejs/NpmUI/LastRefreshedMessageProvider.cs @@ -21,12 +21,12 @@ namespace Microsoft.NodejsTools.NpmUI { internal class LastRefreshedMessageProvider { public static readonly LastRefreshedMessageProvider RefreshFailed = new LastRefreshedMessageProvider { Days = int.MaxValue, - Description = SR.GetString(SR.PackageCatalogRefreshFailed) + Description = Resources.PackageCatalogRefreshFailed }; public static readonly LastRefreshedMessageProvider RefreshInProgress = new LastRefreshedMessageProvider { Days = 0, - Description = SR.GetString(SR.PackageCatalogRefreshing) + Description = Resources.PackageCatalogRefreshing }; public static readonly LastRefreshedMessageProvider NpmNotFound = new LastRefreshedMessageProvider { @@ -39,25 +39,25 @@ private LastRefreshedMessageProvider() { } public LastRefreshedMessageProvider(DateTime lastRefreshTime) { if (lastRefreshTime == DateTime.MinValue) { Days = int.MaxValue; - Description = SR.GetString(SR.PackageCatalogRefreshFailed); + Description = Resources.PackageCatalogRefreshFailed; } else { Days = (int)(DateTime.Now.Date - lastRefreshTime.Date).TotalDays; if (Days == 0) { - Description = SR.GetString(SR.PackageCatalogRefresh0Days, lastRefreshTime); + Description = string.Format(Resources.PackageCatalogRefresh0Days, lastRefreshTime); } else if (Days == 1) { - Description = SR.GetString(SR.PackageCatalogRefresh1Day, lastRefreshTime); + Description = string.Format(Resources.PackageCatalogRefresh1Day, lastRefreshTime); } else if (Days <= 7) { - Description = SR.GetString(SR.PackageCatalogRefresh2To7Days, Days); + Description = string.Format(Resources.PackageCatalogRefresh2To7Days, Days); } else if (Days <= 14) { - Description = SR.GetString(SR.PackageCatalogRefresh1Week); + Description = Resources.PackageCatalogRefresh1Week; } else if (Days <= 21) { - Description = SR.GetString(SR.PackageCatalogRefresh2Weeks); + Description = Resources.PackageCatalogRefresh2Weeks; } else if (Days <= 31) { - Description = SR.GetString(SR.PackageCatalogRefresh3Weeks); + Description = Resources.PackageCatalogRefresh3Weeks; } else if (Days <= 92) { - Description = SR.GetString(SR.PackageCatalogRefresh1Month); + Description = Resources.PackageCatalogRefresh1Month; } else { - Description = SR.GetString(SR.PackageCatalogRefresh3Months); + Description = Resources.PackageCatalogRefresh3Months; } } } diff --git a/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs b/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs index af082df25..b43c822a3 100644 --- a/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs +++ b/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs @@ -50,7 +50,7 @@ public NpmOutputViewModel(INpmController controller) { style.Setters.Add(new Setter(Block.MarginProperty, new Thickness(0))); _output.Resources.Add(typeof(Paragraph), style); - _statusText = SR.GetString(SR.NpmStatusReady); + _statusText = Resources.NpmStatusReady; _worker = new Thread(Run); _worker.Name = "npm UI Execution"; @@ -317,21 +317,21 @@ private void UpdateStatusMessage() { if (executingCommand && null != command) { var commandText = command.ToString(); if (count > 0) { - status = SR.GetString( - WithErrors ? SR.NpmStatusExecutingQueuedErrors : SR.NpmStatusExecutingQueued, + status = NodeJsProjectSr.GetString( + WithErrors ? NodeJsProjectSr.NpmStatusExecutingQueuedErrors : NodeJsProjectSr.NpmStatusExecutingQueued, commandText, count, errorsInfo ); } else { - status = SR.GetString( - WithErrors ? SR.NpmStatusExecutingErrors : SR.NpmStatusExecuting, + status = NodeJsProjectSr.GetString( + WithErrors ? NodeJsProjectSr.NpmStatusExecutingErrors : NodeJsProjectSr.NpmStatusExecuting, commandText, errorsInfo ); } } else { - status = SR.GetString(WithErrors ? SR.NpmStatusReadyWithErrors : SR.NpmStatusReady, errorsInfo); + status = NodeJsProjectSr.GetString(WithErrors ? NodeJsProjectSr.NpmStatusReadyWithErrors : NodeJsProjectSr.NpmStatusReady, errorsInfo); } StatusText = status; diff --git a/Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs b/Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs index 6f80f01f3..8be16d70c 100644 --- a/Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs +++ b/Nodejs/Product/Nodejs/NpmUI/NpmPackageInstallViewModel.cs @@ -177,7 +177,7 @@ private async void LoadCatalog(bool forceRefresh) { CatalogControlVisibility = Visibility.Collapsed; LoadingCatalogControlVisibility = Visibility.Visible; - LoadingCatalogMessage = SR.GetString(SR.CatalogLoadingDefault); + LoadingCatalogMessage = Resources.CatalogLoadingDefault; LastRefreshedMessage = LastRefreshedMessageProvider.RefreshInProgress; diff --git a/Nodejs/Product/Nodejs/NpmUI/PackageCatalogEntryViewModel.cs b/Nodejs/Product/Nodejs/NpmUI/PackageCatalogEntryViewModel.cs index 049e246be..4e272e312 100644 --- a/Nodejs/Product/Nodejs/NpmUI/PackageCatalogEntryViewModel.cs +++ b/Nodejs/Product/Nodejs/NpmUI/PackageCatalogEntryViewModel.cs @@ -129,7 +129,7 @@ public ReadOnlyPackageCatalogEntryViewModel(IPackage package, IPackage localInst package.Homepages, (package.Keywords != null && package.Keywords.Any()) ? string.Join(", ", package.Keywords) - : SR.GetString(SR.NoKeywordsInPackage), + : Resources.NoKeywordsInPackage, localInstall != null ? (SemverVersion?)localInstall.Version : null, globalInstall != null ? (SemverVersion?)globalInstall.Version : null ) { diff --git a/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs b/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs index 5f78f45ce..ec0f2ecda 100644 --- a/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs +++ b/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs @@ -58,7 +58,7 @@ private void ClearCacheButton_Click(object sender, EventArgs e) { ); } catch (Exception exception) { try { - ActivityLog.LogError(SR.ProductName, exception.ToString()); + ActivityLog.LogError(NodeJsProjectSr.ProductName, exception.ToString()); } catch (InvalidOperationException) { // Activity Log is unavailable. } diff --git a/Nodejs/Product/Nodejs/Project/Attributes.cs b/Nodejs/Product/Nodejs/Project/Attributes.cs index 0afe08354..99cdd921f 100644 --- a/Nodejs/Product/Nodejs/Project/Attributes.cs +++ b/Nodejs/Product/Nodejs/Project/Attributes.cs @@ -28,7 +28,7 @@ public SRDisplayNameAttribute(string name) { public override string DisplayName { get { - return SR.GetString(_name); + return NodeJsProjectSr.GetString(_name); } } } @@ -45,7 +45,7 @@ public override string Description { get { if (!_replaced) { _replaced = true; - DescriptionValue = SR.GetString(base.Description); + DescriptionValue = NodeJsProjectSr.GetString(base.Description); } return base.Description; } @@ -59,7 +59,7 @@ public SRCategoryAttribute(string category) } protected override string GetLocalizedString(string value) { - return SR.GetString(value); + return NodeJsProjectSr.GetString(value); } } } diff --git a/Nodejs/Product/Nodejs/Project/DependencyNode.cs b/Nodejs/Product/Nodejs/Project/DependencyNode.cs index 6ce8dc3bc..4b9bcc10a 100644 --- a/Nodejs/Product/Nodejs/Project/DependencyNode.cs +++ b/Nodejs/Product/Nodejs/Project/DependencyNode.cs @@ -267,7 +267,7 @@ internal override int ExecCommandOnNode(Guid cmdGroup, uint cmd, uint nCmdexecop if (ex is InvalidOperationException || ex is Win32Exception) { MessageBox.Show( String.Format("Path to module does not exist:\n {0}", path), - SR.ProductName, + NodeJsProjectSr.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); return VSConstants.S_FALSE; diff --git a/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs index 030bc8754..442459c45 100644 --- a/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs @@ -32,37 +32,37 @@ internal DependencyNodeProperties(DependencyNode node) : base(node) {} private IPackage Package { get { return DependencyNode.Package; } } public override string GetClassName() { - return SR.GetString(IsSubPackage - ? (IsGlobalInstall ? SR.PropertiesClassGlobalSubPackage : SR.PropertiesClassLocalSubPackage) - : (IsGlobalInstall ? SR.PropertiesClassGlobalPackage : SR.PropertiesClassLocalPackage) + return NodeJsProjectSr.GetString(IsSubPackage + ? (IsGlobalInstall ? NodeJsProjectSr.PropertiesClassGlobalSubPackage : NodeJsProjectSr.PropertiesClassLocalSubPackage) + : (IsGlobalInstall ? NodeJsProjectSr.PropertiesClassGlobalPackage : NodeJsProjectSr.PropertiesClassLocalPackage) ); } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackageName)] - [SRDescriptionAttribute(SR.NpmPackageNameDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackageName)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageNameDescription)] public string PackageName { get { return null == Package ? null : Package.Name; } } - [SRCategoryAttribute(SR.CategoryVersion)] - [SRDisplayName(SR.NpmPackageVersion)] - [SRDescriptionAttribute(SR.NpmPackageVersionDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryVersion)] + [SRDisplayName(NodeJsProjectSr.NpmPackageVersion)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageVersionDescription)] public string PackageVersion { get { return null == Package ? null : Package.Version.ToString(); } } - [SRCategoryAttribute(SR.CategoryVersion)] - [SRDisplayName(SR.NpmPackageRequestedVersionRange)] - [SRDescriptionAttribute(SR.NpmPackageRequestedVersionRangeDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryVersion)] + [SRDisplayName(NodeJsProjectSr.NpmPackageRequestedVersionRange)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageRequestedVersionRangeDescription)] public string RequestedVersionRange { get { var range = null == Package ? null : Package.RequestedVersionRange; - return range ?? SR.GetString(SR.RequestedVersionRangeNone); + return range ?? Resources.RequestedVersionRangeNone; } } @@ -100,18 +100,18 @@ private IPackageCatalog MostRecentlyLoadedCatalog { // } //} - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackageDescription)] - [SRDescriptionAttribute(SR.NpmPackageDescriptionDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackageDescription)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageDescriptionDescription)] public string Description { get { return null == Package ? null : Package.Description; } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackageKeywords)] - [SRDescriptionAttribute(SR.NpmPackageKeywordsDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackageKeywords)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageKeywordsDescription)] public string Keywords { get { if (null == Package) { @@ -129,9 +129,9 @@ public string Keywords { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackageAuthor)] - [SRDescriptionAttribute(SR.NpmPackageAuthorDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackageAuthor)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageAuthorDescription)] public string Author { get { var author = null == Package ? null : Package.Author; @@ -139,9 +139,9 @@ public string Author { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackagePath)] - [SRDescriptionAttribute(SR.NpmPackagePathDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackagePath)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackagePathDescription)] public string Path { get { return null == Package ? null : Package.Path; @@ -172,31 +172,31 @@ internal bool IsSubPackage { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackageType)] - [SRDescriptionAttribute(SR.NpmPackageTypeDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackageType)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageTypeDescription)] public string PackageType { get { if (IsGlobalInstall) { return IsSubPackage - ? SR.GetString(SR.PackageTypeGlobalSubpackage) - : SR.GetString(SR.PackageTypeGlobal); + ? Resources.PackageTypeGlobalSubpackage + : Resources.PackageTypeGlobal; } return IsSubPackage - ? SR.GetString(SR.PackageTypeLocalSubpackage) - : SR.GetString(SR.PackageTypeLocal); + ? Resources.PackageTypeLocalSubpackage + : Resources.PackageTypeLocal; } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmPackageLinkStatus)] - [SRDescriptionAttribute(SR.NpmPackageLinkStatusDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmPackageLinkStatus)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageLinkStatusDescription)] public string LinkStatus { get { if (IsSubPackage) { - return SR.GetString(SR.LinkStatusNotApplicableSubPackages); + return Resources.LinkStatusNotApplicableSubPackages; } var package = Package; @@ -207,63 +207,63 @@ public string LinkStatus { if (null != root) { var local = root.Modules[package.Name]; return null == local || local.Version != package.Version - ? SR.GetString(SR.LinkStatusNotLinkedToProject) - : SR.GetString(SR.LinkStatusLinkedToProject); + ? Resources.LinkStatusNotLinkedToProject + : Resources.LinkStatusLinkedToProject; } } else { var global = controller.GlobalPackages; if (null != global) { var installed = global.Modules[package.Name]; return null == installed || installed.Version != package.Version - ? SR.GetString(SR.LinkStatusLocallyInstalled) - : SR.GetString(SR.LinkStatusLinkedFromGlobal); + ? Resources.LinkStatusLocallyInstalled + : Resources.LinkStatusLinkedFromGlobal; } } } - return SR.GetString(SR.LinkStatusUnknown); + return Resources.LinkStatusUnknown; } } - [SRCategoryAttribute(SR.CategoryStatus)] - [SRDisplayName(SR.NpmPackageIsListedInParentPackageJson)] - [SRDescriptionAttribute(SR.NpmPackageIsListedInParentPackageJsonDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] + [SRDisplayName(NodeJsProjectSr.NpmPackageIsListedInParentPackageJson)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsListedInParentPackageJsonDescription)] public bool IsListedInParentPackageJson { get { return null != Package && Package.IsListedInParentPackageJson; } } - [SRCategoryAttribute(SR.CategoryStatus)] - [SRDisplayName(SR.NpmPackageIsMissing)] - [SRDescriptionAttribute(SR.NpmPackageIsMissingDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] + [SRDisplayName(NodeJsProjectSr.NpmPackageIsMissing)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsMissingDescription)] public bool IsMissing { get { return null != Package && Package.IsMissing; } } - [SRCategoryAttribute(SR.CategoryStatus)] - [SRDisplayName(SR.NpmPackageIsDevDependency)] - [SRDescriptionAttribute(SR.NpmPackageIsDevDependencyDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] + [SRDisplayName(NodeJsProjectSr.NpmPackageIsDevDependency)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsDevDependencyDescription)] public bool IsDevDependency { get { return null != Package && Package.IsDevDependency; } } - [SRCategoryAttribute(SR.CategoryStatus)] - [SRDisplayName(SR.NpmPackageIsOptionalDependency)] - [SRDescriptionAttribute(SR.NpmPackageIsOptionalDependencyDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] + [SRDisplayName(NodeJsProjectSr.NpmPackageIsOptionalDependency)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsOptionalDependencyDescription)] public bool IsOptionalDependency { get { return null != Package && Package.IsOptionalDependency; } } - [SRCategoryAttribute(SR.CategoryStatus)] - [SRDisplayName(SR.NpmPackageIsBundledDependency)] - [SRDescriptionAttribute(SR.NpmPackageIsBundledDependencyDescription)] + [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] + [SRDisplayName(NodeJsProjectSr.NpmPackageIsBundledDependency)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsBundledDependencyDescription)] public bool IsBundledDependency { get { return null != Package && Package.IsBundledDependency; diff --git a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs index 599c50a59..ff7be3856 100644 --- a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs @@ -265,7 +265,7 @@ private void ForceUpdateStatusBarWithNpmActivity(string activity) { private void ForceUpdateStatusBarWithNpmActivitySafe(string activity) { ProjectMgr.Site.GetUIThread().InvokeAsync(() => ForceUpdateStatusBarWithNpmActivity(activity)) - .HandleAllExceptions(SR.ProductName) + .HandleAllExceptions(NodeJsProjectSr.ProductName) .DoNotWait(); } @@ -341,19 +341,19 @@ private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEv StopNpmIdleTimer(); _npmIdleTimer = new Timer( - _ => ProjectMgr.Site.GetUIThread().Invoke(() => _projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(SR.ProductName).DoNotWait()), + _ => ProjectMgr.Site.GetUIThread().Invoke(() => _projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(NodeJsProjectSr.ProductName).DoNotWait()), null, 1000, Timeout.Infinite); } private static string GetStatusBarMessage(NpmCommandCompletedEventArgs e) { if (e.WithErrors) { - return SR.GetString( - e.Cancelled ? SR.NpmCancelledWithErrors : SR.NpmCompletedWithErrors, + return NodeJsProjectSr.GetString( + e.Cancelled ? NodeJsProjectSr.NpmCancelledWithErrors : NodeJsProjectSr.NpmCompletedWithErrors, e.CommandText); } else if (e.Cancelled) { - return SR.GetString(SR.NpmCancelled, e.CommandText); + return string.Format(Resources.NpmCancelled, e.CommandText); } - return SR.GetString(SR.NpmSuccessfullyCompleted, e.CommandText); + return string.Format(Resources.NpmSuccessfullyCompleted, e.CommandText); } private void StopNpmIdleTimer() { @@ -368,7 +368,7 @@ private void StopNpmIdleTimer() { internal void ReloadHierarchySafe() { NodejsPackage.Instance.GetUIThread().InvokeAsync(ReloadHierarchy) - .HandleAllExceptions(SR.ProductName) + .HandleAllExceptions(NodeJsProjectSr.ProductName) .DoNotWait(); } diff --git a/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs index 352d8c71a..33b832f64 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs @@ -31,7 +31,6 @@ using VSLangProj; using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; using Microsoft.NodejsTools.TestFrameworks; -using SR = Microsoft.NodejsTools.Project.SR; namespace Microsoft.NodejsTools.Project { @@ -41,16 +40,16 @@ internal NodejsIncludedFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(SR.Advanced)] - [LocDisplayName(SR.TestFramework)] - [SRDescriptionAttribute(SR.TestFrameworkDescription)] + [SRCategoryAttribute(NodeJsProjectSr.Advanced)] + [LocDisplayName(NodeJsProjectSr.TestFramework)] + [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] [TypeConverter(typeof(TestFrameworkStringConverter))] public string TestFramework { get { - return GetProperty(SR.TestFramework, string.Empty); + return GetProperty(NodeJsProjectSr.TestFramework, string.Empty); } set { - SetProperty(SR.TestFramework, value.ToString()); + SetProperty(NodeJsProjectSr.TestFramework, value.ToString()); } } } @@ -61,16 +60,16 @@ internal NodejsLinkFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(SR.Advanced)] - [LocDisplayName(SR.TestFramework)] - [SRDescriptionAttribute(SR.TestFrameworkDescription)] + [SRCategoryAttribute(NodeJsProjectSr.Advanced)] + [LocDisplayName(NodeJsProjectSr.TestFramework)] + [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] [TypeConverter(typeof(TestFrameworkStringConverter))] public string TestFramework { get { - return GetProperty(SR.TestFramework, string.Empty); + return GetProperty(NodeJsProjectSr.TestFramework, string.Empty); } set { - SetProperty(SR.TestFramework, value.ToString()); + SetProperty(NodeJsProjectSr.TestFramework, value.ToString()); } } } diff --git a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs index fda25299b..dead6f360 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs @@ -217,20 +217,20 @@ internal void SetItemTypeRecursively(prjBuildAction buildAction) { } private bool ShouldIncludeNodeModulesFolderInProject() { - var includeNodeModulesButton = new TaskDialogButton(SR.GetString(SR.IncludeNodeModulesIncludeTitle), SR.GetString(SR.IncludeNodeModulesIncludeDescription)); - var cancelOperationButton = new TaskDialogButton(SR.GetString(SR.IncludeNodeModulesCancelTitle)); + var includeNodeModulesButton = new TaskDialogButton(Resources.IncludeNodeModulesIncludeTitle, Resources.IncludeNodeModulesIncludeDescription); + var cancelOperationButton = new TaskDialogButton(Resources.IncludeNodeModulesCancelTitle); var taskDialog = new TaskDialog(_project.ProjectMgr.Site) { AllowCancellation = true, EnableHyperlinks = true, - Title = SR.ProductName, + Title = NodeJsProjectSr.ProductName, MainIcon = TaskDialogIcon.Warning, - Content = SR.GetString(SR.IncludeNodeModulesContent), + Content = Resources.IncludeNodeModulesContent, Buttons = { cancelOperationButton, includeNodeModulesButton }, FooterIcon = TaskDialogIcon.Information, - Footer = SR.GetString(SR.IncludeNodeModulesInformation), + Footer = Resources.IncludeNodeModulesInformation, SelectedButton = cancelOperationButton }; diff --git a/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs b/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs index 3d646f5f1..8e00c6d92 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs @@ -44,16 +44,16 @@ public NodejsGeneralPropertyPageControl(NodejsGeneralPropertyPage page) : this() } private void AddToolTips() { - _tooltip.SetToolTip(_nodeExePath, SR.GetString(SR.NodeExePathToolTip)); - _tooltip.SetToolTip(_nodeExeArguments, SR.GetString(SR.NodeExeArgumentsToolTip)); - _tooltip.SetToolTip(_scriptFile, SR.GetString(SR.ScriptFileToolTip)); - _tooltip.SetToolTip(_scriptArguments, SR.GetString(SR.ScriptArgumentsToolTip)); - _tooltip.SetToolTip(_nodejsPort, SR.GetString(SR.NodejsPortToolTip)); - _tooltip.SetToolTip(_startBrowser, SR.GetString(SR.StartBrowserToolTip)); - _tooltip.SetToolTip(_workingDir, SR.GetString(SR.WorkingDirToolTip)); - _tooltip.SetToolTip(_launchUrl, SR.GetString(SR.LaunchUrlToolTip)); - _tooltip.SetToolTip(_debuggerPort, SR.GetString(SR.DebuggerPort)); - _tooltip.SetToolTip(_envVars, SR.GetString(SR.EnvironmentVariables)); + _tooltip.SetToolTip(_nodeExePath, Resources.NodeExePathToolTip); + _tooltip.SetToolTip(_nodeExeArguments, Resources.NodeExeArgumentsToolTip); + _tooltip.SetToolTip(_scriptFile, Resources.ScriptFileToolTip); + _tooltip.SetToolTip(_scriptArguments, Resources.ScriptArgumentsToolTip); + _tooltip.SetToolTip(_nodejsPort, Resources.NodejsPortToolTip); + _tooltip.SetToolTip(_startBrowser, Resources.StartBrowserToolTip); + _tooltip.SetToolTip(_workingDir, Resources.WorkingDirToolTip); + _tooltip.SetToolTip(_launchUrl, Resources.LaunchUrlToolTip); + _tooltip.SetToolTip(_debuggerPort, Resources.DebuggerPort); + _tooltip.SetToolTip(_envVars, Resources.EnvironmentVariables); } public string NodeExePath { @@ -158,7 +158,7 @@ private void Changed(object sender, EventArgs e) { private void SetCueBanner() { string cueBanner = Nodejs.NodeExePath; if (String.IsNullOrEmpty(cueBanner)) { - cueBanner = SR.GetString(SR.NodejsNotInstalledShort); + cueBanner = Resources.NodejsNotInstalledShort; } NativeMethods.SendMessageW( @@ -174,7 +174,7 @@ private void NodeExePathChanged(object sender, EventArgs e) { File.Exists(Nodejs.GetAbsoluteNodeExePath(_propPage.Project.ProjectHome, _nodeExePath.Text))) { _nodeExeErrorProvider.SetError(_nodeExePath, String.Empty); } else { - _nodeExeErrorProvider.SetError(_nodeExePath, SR.GetString(SR.NodeExePathNotFound)); + _nodeExeErrorProvider.SetError(_nodeExePath, Resources.NodeExePathNotFound); } Changed(sender, e); } @@ -204,7 +204,7 @@ private void PortChanged(object sender, EventArgs e) { var textSender = (TextBox)sender; if (!textSender.Text.Contains("$(") && textSender.Text.Any(ch => !Char.IsDigit(ch))) { - _nodeExeErrorProvider.SetError(textSender, SR.GetString(SR.InvalidPortNumber)); + _nodeExeErrorProvider.SetError(textSender, Resources.InvalidPortNumber); } else { _nodeExeErrorProvider.SetError(textSender, String.Empty); } @@ -213,7 +213,7 @@ private void PortChanged(object sender, EventArgs e) { private void WorkingDirTextChanged(object sender, EventArgs e) { if (!_workingDir.Text.Contains("$(") && !Directory.Exists(_workingDir.Text)) { - _nodeExeErrorProvider.SetError(_workingDir, SR.GetString(SR.WorkingDirInvalidOrMissing)); + _nodeExeErrorProvider.SetError(_workingDir, Resources.WorkingDirInvalidOrMissing); } else { _nodeExeErrorProvider.SetError(_workingDir, String.Empty); } diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs index e2186f36c..29f6446a8 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs @@ -146,7 +146,7 @@ private string GetFullUrl() { return GetFullUrl(host, TestServerPort); } catch (UriFormatException) { var output = OutputWindowRedirector.GetGeneral(NodejsPackage.Instance); - output.WriteErrorLine(SR.GetString(SR.ErrorInvalidLaunchUrl, host)); + output.WriteErrorLine(Resources.ErrorInvalidLaunchUrl, host); output.ShowAndActivate(); return string.Empty; } @@ -216,7 +216,7 @@ private bool DoesProjectSupportDebugging() { return MessageBox.Show( "This TypeScript project has 'Combine Javascript output into file' option enabled. This option is not supported by NTVS debugger, " + "and may result in erratic behavior of breakpoints, stepping, and debug tool windows. Are you sure you want to start debugging?", - SR.ProductName, + NodeJsProjectSr.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning ) == DialogResult.Yes; diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs index 7c1388592..c11dc50ab 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs @@ -794,18 +794,18 @@ public async Task CheckForLongPaths(string npmArguments = null) { var taskDialog = new TaskDialog(NodejsPackage.Instance) { AllowCancellation = true, EnableHyperlinks = true, - Title = SR.GetString(SR.LongPathWarningTitle), + Title = Resources.LongPathWarningTitle, MainIcon = TaskDialogIcon.Warning, - Content = SR.GetString(SR.LongPathWarningText), - CollapsedControlText = SR.GetString(SR.LongPathShowPathsExceedingTheLimit), - ExpandedControlText = SR.GetString(SR.LongPathHidePathsExceedingTheLimit), + Content = Resources.LongPathWarningText, + CollapsedControlText = Resources.LongPathShowPathsExceedingTheLimit, + ExpandedControlText = Resources.LongPathHidePathsExceedingTheLimit, Buttons = { - (dedupeButton = new TaskDialogButton(SR.GetString(SR.LongPathNpmDedupe), SR.GetString(SR.LongPathNpmDedupeDetail))), - (ignoreButton = new TaskDialogButton(SR.GetString(SR.LongPathDoNothingButWarnNextTime))), - (disableButton = new TaskDialogButton(SR.GetString(SR.LongPathDoNothingAndDoNotWarnAgain), SR.GetString(SR.LongPathDoNothingAndDoNotWarnAgainDetail))) + (dedupeButton = new TaskDialogButton(Resources.LongPathNpmDedupe, Resources.LongPathNpmDedupeDetail)), + (ignoreButton = new TaskDialogButton(Resources.LongPathDoNothingButWarnNextTime)), + (disableButton = new TaskDialogButton(Resources.LongPathDoNothingAndDoNotWarnAgain, Resources.LongPathDoNothingAndDoNotWarnAgainDetail)) }, FooterIcon = TaskDialogIcon.Information, - Footer = SR.GetString(SR.LongPathFooter) + Footer = Resources.LongPathFooter }; taskDialog.HyperlinkClicked += (sender, e) => { @@ -830,7 +830,7 @@ public async Task CheckForLongPaths(string npmArguments = null) { var longPaths = await Task.Factory.StartNew(() => GetLongSubPaths(ProjectHome) .Concat(GetLongSubPaths(_intermediateOutputPath)) - .Select(lpi => string.Format("• {1}\u00A0{2}", lpi.FullPath, lpi.RelativePath, SR.GetString(SR.LongPathClickToCopy))) + .Select(lpi => string.Format("• {1}\u00A0{2}", lpi.FullPath, lpi.RelativePath, Resources.LongPathClickToCopy)) .ToArray()); if (longPaths.Length == 0) { return; @@ -840,9 +840,9 @@ public async Task CheckForLongPaths(string npmArguments = null) { var button = taskDialog.ShowModal(); if (button == dedupeButton) { var repl = NodejsPackage.Instance.OpenReplWindow(focus: false); - await repl.ExecuteCommand(".npm dedupe").HandleAllExceptions(SR.ProductName); + await repl.ExecuteCommand(".npm dedupe").HandleAllExceptions(NodeJsProjectSr.ProductName); - taskDialog.Content += "\r\n\r\n" + SR.GetString(SR.LongPathNpmDedupeDidNotHelp); + taskDialog.Content += "\r\n\r\n" + Resources.LongPathNpmDedupeDidNotHelp; taskDialog.Buttons.Remove(dedupeButton); goto recheck; } else if (button == disableButton) { diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs index d078e1264..486c04d74 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs @@ -54,9 +54,9 @@ public uint TargetFramework { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NodeExePath)] - [SRDescriptionAttribute(SR.NodeExePathDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NodeExePath)] + [SRDescriptionAttribute(NodeJsProjectSr.NodeExePathDescription)] public string NodeExePath { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -72,9 +72,9 @@ public string NodeExePath { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NodeExeArguments)] - [SRDescriptionAttribute(SR.NodeExeArgumentsDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NodeExeArguments)] + [SRDescriptionAttribute(NodeJsProjectSr.NodeExeArgumentsDescription)] public string NodeExeArguments { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -88,9 +88,9 @@ public string NodeExeArguments { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.ScriptArguments)] - [SRDescriptionAttribute(SR.ScriptArgumentsDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.ScriptArguments)] + [SRDescriptionAttribute(NodeJsProjectSr.ScriptArgumentsDescription)] public string ScriptArguments { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -104,9 +104,9 @@ public string ScriptArguments { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NodejsPort)] - [SRDescriptionAttribute(SR.NodejsPortDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NodejsPort)] + [SRDescriptionAttribute(NodeJsProjectSr.NodejsPortDescription)] public int? NodejsPort { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke((Func)(() => { @@ -124,9 +124,9 @@ public int? NodejsPort { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.LaunchUrl)] - [SRDescriptionAttribute(SR.LaunchUrlDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.LaunchUrl)] + [SRDescriptionAttribute(NodeJsProjectSr.LaunchUrlDescription)] public string LaunchUrl { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -140,9 +140,9 @@ public string LaunchUrl { } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.StartWebBrowser)] - [SRDescriptionAttribute(SR.StartWebBrowserDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.StartWebBrowser)] + [SRDescriptionAttribute(NodeJsProjectSr.StartWebBrowserDescription)] public bool StartWebBrowser { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { diff --git a/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs index bbf32b996..b7a072645 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs @@ -38,19 +38,19 @@ internal NodejsTypeScriptFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(SR.Advanced)] - [LocDisplayName(SR.TestFramework)] - [SRDescriptionAttribute(SR.TestFrameworkDescription)] + [SRCategoryAttribute(NodeJsProjectSr.Advanced)] + [LocDisplayName(NodeJsProjectSr.TestFramework)] + [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] public string TestFramework { get { - var framework = this.HierarchyNode.ItemNode.GetMetadata(SR.TestFramework); + var framework = this.HierarchyNode.ItemNode.GetMetadata(NodeJsProjectSr.TestFramework); if (String.IsNullOrWhiteSpace(framework)) { return String.Empty; } return Convert.ToString(framework); } set { - this.HierarchyNode.ItemNode.SetMetadata(SR.TestFramework, value.ToString()); + this.HierarchyNode.ItemNode.SetMetadata(NodeJsProjectSr.TestFramework, value.ToString()); } } } @@ -61,12 +61,12 @@ internal NodejsTypeScriptLinkFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(SR.Advanced)] - [LocDisplayName(SR.TestFramework)] - [SRDescriptionAttribute(SR.TestFrameworkDescription)] + [SRCategoryAttribute(NodeJsProjectSr.Advanced)] + [LocDisplayName(NodeJsProjectSr.TestFramework)] + [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] public string TestFramework { get { - var framework = this.HierarchyNode.ItemNode.GetMetadata(SR.TestFramework); + var framework = this.HierarchyNode.ItemNode.GetMetadata(NodeJsProjectSr.TestFramework); if (String.IsNullOrEmpty(framework)) { return String.Empty; } @@ -74,7 +74,7 @@ public string TestFramework { } set { - this.HierarchyNode.ItemNode.SetMetadata(SR.TestFramework, value.ToString()); + this.HierarchyNode.ItemNode.SetMetadata(NodeJsProjectSr.TestFramework, value.ToString()); } } } diff --git a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs index 4508ae7f1..06cf69580 100644 --- a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs @@ -38,21 +38,21 @@ private bool IsGlobalNode { } public override string GetClassName() { - return SR.GetString(IsGlobalNode ? SR.PropertiesClassGlobal : SR.PropertiesClassNpm); + return NodeJsProjectSr.GetString(IsGlobalNode ? NodeJsProjectSr.PropertiesClassGlobal : NodeJsProjectSr.PropertiesClassNpm); } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmNodePackageInstallation)] - [SRDescriptionAttribute(SR.NpmNodePackageInstallationDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmNodePackageInstallation)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmNodePackageInstallationDescription)] public string PackageInstallation { get { - return SR.GetString(IsGlobalNode ? SR.PackageInstallationGlobal : SR.PackageInstallationLocal); + return NodeJsProjectSr.GetString(IsGlobalNode ? NodeJsProjectSr.PackageInstallationGlobal : NodeJsProjectSr.PackageInstallationLocal); } } - [SRCategoryAttribute(SR.General)] - [SRDisplayName(SR.NpmNodePath)] - [SRDescriptionAttribute(SR.NpmNodePathDescription)] + [SRCategoryAttribute(NodeJsProjectSr.General)] + [SRDisplayName(NodeJsProjectSr.NpmNodePath)] + [SRDescriptionAttribute(NodeJsProjectSr.NpmNodePathDescription)] public string Path { get { var node = NpmNode; diff --git a/Nodejs/Product/Nodejs/Project/ProjectResources.cs b/Nodejs/Product/Nodejs/Project/ProjectResources.cs index 3d3b3ec9f..0010f0c2c 100644 --- a/Nodejs/Product/Nodejs/Project/ProjectResources.cs +++ b/Nodejs/Product/Nodejs/Project/ProjectResources.cs @@ -20,7 +20,7 @@ using CommonSR = Microsoft.VisualStudioTools.Project.SR; namespace Microsoft.NodejsTools.Project { - internal class SR : CommonSR { + internal class NodeJsProjectSr : CommonSR { internal const string NodejsToolsForVisualStudio = "NodejsToolsForVisualStudio"; internal const string AzureToolsInstallInstructions = "AzureToolsInstallInstructions"; @@ -182,7 +182,7 @@ internal class SR : CommonSR { internal const string WorkingDirToolTip = "WorkingDirToolTip"; private static readonly Lazy _manager = new Lazy( - () => new System.Resources.ResourceManager("Microsoft.NodejsTools.Resources", typeof(SR).Assembly), + () => new System.Resources.ResourceManager("Microsoft.NodejsTools.Resources", typeof(NodeJsProjectSr).Assembly), LazyThreadSafetyMode.ExecutionAndPublication ); diff --git a/Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs b/Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs index f91c2ea68..60c12b02a 100644 --- a/Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs +++ b/Nodejs/Product/Nodejs/Repl/NodejsReplEvaluator.cs @@ -58,7 +58,7 @@ public Task Initialize(IReplWindow window) { _window.SetOptionValue(ReplOptions.SupportAnsiColors, true); _window.SetOptionValue(ReplOptions.UseSmartUpDown, true); - _window.WriteLine(SR.GetString(SR.ReplInitializationMessage)); + _window.WriteLine(Resources.ReplInitializationMessage); return ExecutionResult.Succeeded; } @@ -179,11 +179,11 @@ private void Connect() { string nodeExePath = GetNodeExePath(); if (String.IsNullOrWhiteSpace(nodeExePath)) { - _window.WriteError(SR.GetString(SR.NodejsNotInstalled)); + _window.WriteError(Resources.NodejsNotInstalled); _window.WriteError(Environment.NewLine); return; } else if (!File.Exists(nodeExePath)) { - _window.WriteError(SR.GetString(SR.NodeExeDoesntExist, nodeExePath)); + _window.WriteError(string.Format(Resources.NodeExeDoesntExist, nodeExePath)); _window.WriteError(Environment.NewLine); return; } diff --git a/Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs b/Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs index 7fb7c2b2d..4bca431c7 100644 --- a/Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs +++ b/Nodejs/Product/Nodejs/Repl/NpmReplCommand.cs @@ -30,7 +30,6 @@ using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudioTools.Project; -using SR = Microsoft.NodejsTools.Project.SR; using Task = System.Threading.Tasks.Task; namespace Microsoft.NodejsTools.Repl { @@ -146,9 +145,9 @@ await ExecuteNpmCommandAsync( null); if (npmReplRedirector.HasErrors) { - window.WriteError(SR.GetString(SR.NpmReplCommandCompletedWithErrors, arguments)); + window.WriteError(string.Format(Resources.NpmReplCommandCompletedWithErrors, arguments)); } else { - window.WriteLine(SR.GetString(SR.NpmSuccessfullyCompleted, arguments)); + window.WriteLine(string.Format(Resources.NpmSuccessfullyCompleted, arguments)); } if (nodejsProject != null) { diff --git a/Nodejs/Product/Nodejs/Resources.Designer.cs b/Nodejs/Product/Nodejs/Resources.Designer.cs new file mode 100644 index 000000000..d1506d823 --- /dev/null +++ b/Nodejs/Product/Nodejs/Resources.Designer.cs @@ -0,0 +1,1493 @@ +//------------------------------------------------------------------------------ +// +// 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 Microsoft.NodejsTools { + 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("Microsoft.NodejsTools.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 These tools are a free download for your version of Visual Studio that allow you to write, deploy and debug applications for Microsoft Azure in a range of programming languages.. + /// + public static string AzureToolsInstallInstructions { + get { + return ResourceManager.GetString("AzureToolsInstallInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This project requires Microsoft Azure Tools for Visual Studio.. + /// + public static string AzureToolsRequired { + get { + return ResourceManager.GetString("AzureToolsRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your project can still be created, but some manual configuration of your project will be required and features may be missing or limited. + /// + ///We recommend installing the latest version of Microsoft Azure Tools for Visual Studio.. + /// + public static string AzureToolsUpgradeInstructions { + get { + return ResourceManager.GetString("AzureToolsUpgradeInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your version of Microsoft Azure Tools is not supported by Node.js Tools for Visual Studio.. + /// + public static string AzureToolsUpgradeRecommended { + get { + return ResourceManager.GetString("AzureToolsUpgradeRecommended", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading published package list.... + /// + public static string CatalogLoadingDefault { + get { + return ResourceManager.GetString("CatalogLoadingDefault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Catalog retrieval aborted - npm.cmd not found. + /// + public static string CatalogLoadingNoNpm { + get { + return ResourceManager.GetString("CatalogLoadingNoNpm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Status. + /// + public static string CategoryStatus { + get { + return ResourceManager.GetString("CategoryStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version. + /// + public static string CategoryVersion { + get { + return ResourceManager.GetString("CategoryVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &Continue + ///Some manual steps will be required to configure your project.. + /// + public static string ContinueWithoutAzureToolsUpgrade { + get { + return ResourceManager.GetString("ContinueWithoutAzureToolsUpgrade", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Debugger connection was closed.. + /// + public static string DebuggerConnectionClosed { + get { + return ResourceManager.GetString("DebuggerConnectionClosed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to update file contents.. + /// + public static string DebuggerModuleUpdateFailed { + get { + return ResourceManager.GetString("DebuggerModuleUpdateFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the port used to communicate with the debugger. + /// + public static string DebuggerPort { + get { + return ResourceManager.GetString("DebuggerPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Do not show this warning again.. + /// + public static string DontShowAgain { + get { + return ResourceManager.GetString("DontShowAgain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &Download and install now + ///You will need to restart Visual Studio after installation.. + /// + public static string DownloadAndInstall { + get { + return ResourceManager.GetString("DownloadAndInstall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies environment variables to be set in the spawned process in the form: + /// + ///NAME1=value1 + ///NAME2=value2 + ///.... + /// + public static string EnvironmentVariables { + get { + return ResourceManager.GetString("EnvironmentVariables", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to start wizard: no automation object available.. + /// + public static string ErrorNoDte { + get { + return ResourceManager.GetString("ErrorNoDte", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Do nothing (recommended). + /// + public static string IncludeNodeModulesCancelTitle { + get { + return ResourceManager.GetString("IncludeNodeModulesCancelTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Including 'node_modules' in your project is generally unnecessary, and may reduce Visual Studio's performance. You can continue to use and deploy packages from 'node_modules' without including it in your project.. + /// + public static string IncludeNodeModulesContent { + get { + return ResourceManager.GetString("IncludeNodeModulesContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This may be a long-running operation, during which Visual Studio will be unusable.. + /// + public static string IncludeNodeModulesIncludeDescription { + get { + return ResourceManager.GetString("IncludeNodeModulesIncludeDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Include 'node_modules' folder in project. + /// + public static string IncludeNodeModulesIncludeTitle { + get { + return ResourceManager.GetString("IncludeNodeModulesIncludeTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <a href="http://go.microsoft.com/fwlink/?LinkID=518083">More Information</a>. + /// + public static string IncludeNodeModulesInformation { + get { + return ResourceManager.GetString("IncludeNodeModulesInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insert Snippet. + /// + public static string InsertSnippet { + get { + return ResourceManager.GetString("InsertSnippet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid port number - the port should contain only digits.. + /// + public static string InvalidPortNumber { + get { + return ResourceManager.GetString("InvalidPortNumber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the URL to open in the browser. If unspecified http://localhost:port is used.\r\nIf a port is specified, it needs to be specified here as well.. + /// + public static string LaunchUrlToolTip { + get { + return ResourceManager.GetString("LaunchUrlToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installed locally or linked from global packages. + /// + public static string LinkStatusLinkedFromGlobal { + get { + return ResourceManager.GetString("LinkStatusLinkedFromGlobal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Linked or installed into project. + /// + public static string LinkStatusLinkedToProject { + get { + return ResourceManager.GetString("LinkStatusLinkedToProject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installed locally. + /// + public static string LinkStatusLocallyInstalled { + get { + return ResourceManager.GetString("LinkStatusLocallyInstalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not applicable for sub-packages.. + /// + public static string LinkStatusNotApplicableSubPackages { + get { + return ResourceManager.GetString("LinkStatusNotApplicableSubPackages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not linked to project. + /// + public static string LinkStatusNotLinkedToProject { + get { + return ResourceManager.GetString("LinkStatusNotLinkedToProject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown. + /// + public static string LinkStatusUnknown { + get { + return ResourceManager.GetString("LinkStatusUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy Full Path. + /// + public static string LongPathClickToCopy { + get { + return ResourceManager.GetString("LongPathClickToCopy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Do nothing and &never warn me again. + /// + public static string LongPathDoNothingAndDoNotWarnAgain { + get { + return ResourceManager.GetString("LongPathDoNothingAndDoNotWarnAgain", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You can re-enable the check in Tools → Options → Node.js Tools → General.. + /// + public static string LongPathDoNothingAndDoNotWarnAgainDetail { + get { + return ResourceManager.GetString("LongPathDoNothingAndDoNotWarnAgainDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Do nothing, but &warn me next time it happens. + /// + public static string LongPathDoNothingButWarnNextTime { + get { + return ResourceManager.GetString("LongPathDoNothingButWarnNextTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <a href="#help">Get more information</a>. + /// + public static string LongPathFooter { + get { + return ResourceManager.GetString("LongPathFooter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide &paths exceeding the limit. + /// + public static string LongPathHidePathsExceedingTheLimit { + get { + return ResourceManager.GetString("LongPathHidePathsExceedingTheLimit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run 'npm &dedupe' on the project. + /// + public static string LongPathNpmDedupe { + get { + return ResourceManager.GetString("LongPathNpmDedupe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In some cases, deduplicating packages can reduce the amount of nesting in node_modules sufficiently to resolve the issue.. + /// + public static string LongPathNpmDedupeDetail { + get { + return ResourceManager.GetString("LongPathNpmDedupeDetail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unfortunately, running 'npm dedupe' did not resolve the issue. Please consult the <a href="#help">documentation</a> for other potential workarounds.. + /// + public static string LongPathNpmDedupeDidNotHelp { + get { + return ResourceManager.GetString("LongPathNpmDedupeDidNotHelp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show &paths exceeding the limit. + /// + public static string LongPathShowPathsExceedingTheLimit { + get { + return ResourceManager.GetString("LongPathShowPathsExceedingTheLimit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your project folder contains one or more paths that exceed the <a href="#msdn">260 character limit</a>. Visual Studio <a href="#uservoice">does not fully support</a> such projects. You may run into issues building and publishing your project, or interference with other Visual Studio and Node.js Tools features.. + /// + public static string LongPathWarningText { + get { + return ResourceManager.GetString("LongPathWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path Too Long Warning. + /// + public static string LongPathWarningTitle { + get { + return ResourceManager.GetString("LongPathWarningTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to milliseconds. + /// + public static string Milliseconds { + get { + return ResourceManager.GetString("Milliseconds", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string NewVersionNo { + get { + return ResourceManager.GetString("NewVersionNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Not applicable for sub-packages. + /// + public static string NewVersionNotApplicableSubpackage { + get { + return ResourceManager.GetString("NewVersionNotApplicableSubpackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package catalog not yet retrieved. + /// + public static string NewVersionPackageCatalogNotRetrieved { + get { + return ResourceManager.GetString("NewVersionPackageCatalogNotRetrieved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown. + /// + public static string NewVersionUnknown { + get { + return ResourceManager.GetString("NewVersionUnknown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes: {0}. + /// + public static string NewVersionYes { + get { + return ResourceManager.GetString("NewVersionYes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Arguments to Node.exe. + /// + public static string NodeExeArguments { + get { + return ResourceManager.GetString("NodeExeArguments", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the options provided to node.exe, such as -e or -i.. + /// + public static string NodeExeArgumentsDescription { + get { + return ResourceManager.GetString("NodeExeArgumentsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the options provided to node.exe, such as -e or -i.. + /// + public static string NodeExeArgumentsToolTip { + get { + return ResourceManager.GetString("NodeExeArgumentsToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your project is currently configured to look for Node.exe at "{0}" but the file does not exist.. + /// + public static string NodeExeDoesntExist { + get { + return ResourceManager.GetString("NodeExeDoesntExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.exe path. + /// + public static string NodeExePath { + get { + return ResourceManager.GetString("NodeExePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the path to the node.exe executable.. + /// + public static string NodeExePathDescription { + get { + return ResourceManager.GetString("NodeExePathDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified Node.js interpreter does not exist.. + /// + public static string NodeExePathNotFound { + get { + return ResourceManager.GetString("NodeExePathNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the path to the node.exe executable.. + /// + public static string NodeExePathToolTip { + get { + return ResourceManager.GetString("NodeExePathToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js does not appear to be installed. Please download and install Node.js or specify the location of node.exe on the Project | Properties page.. + /// + public static string NodejsNotInstalled { + get { + return ResourceManager.GetString("NodejsNotInstalled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js has not been detected on your computer. + /// + public static string NodejsNotInstalledShort { + get { + return ResourceManager.GetString("NodejsNotInstalledShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This version of Node.js ({0}) is not supported. Please upgrade to Node.js v0.10.20 or later.. + /// + public static string NodejsNotSupported { + get { + return ResourceManager.GetString("NodejsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js Port. + /// + public static string NodejsPort { + get { + return ResourceManager.GetString("NodejsPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the port number used for process.env.port, if unspecified a random port is generated.. + /// + public static string NodejsPortDescription { + get { + return ResourceManager.GetString("NodejsPortDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the port number used for process.env.port, if unspecified a random port is generated.. + /// + public static string NodejsPortToolTip { + get { + return ResourceManager.GetString("NodejsPortToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js Tools for Visual Studio. + /// + public static string NodejsToolsForVisualStudio { + get { + return ResourceManager.GetString("NodejsToolsForVisualStudio", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (This package has no keywords.). + /// + public static string NoKeywordsInPackage { + get { + return ResourceManager.GetString("NoKeywordsInPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} cancelled. + /// + public static string NpmCancelled { + get { + return ResourceManager.GetString("NpmCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} cancelled with errors - see Output window for details. + /// + public static string NpmCancelledWithErrors { + get { + return ResourceManager.GetString("NpmCancelledWithErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} completed with errors - see Output window for details. + /// + public static string NpmCompletedWithErrors { + get { + return ResourceManager.GetString("NpmCompletedWithErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package Installations. + /// + public static string NpmNodePackageInstallation { + get { + return ResourceManager.GetString("NpmNodePackageInstallation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether the node manages local or global npm package installations.. + /// + public static string NpmNodePackageInstallationDescription { + get { + return ResourceManager.GetString("NpmNodePackageInstallationDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path. + /// + public static string NpmNodePath { + get { + return ResourceManager.GetString("NpmNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base path in which npm packages are installed.. + /// + public static string NpmNodePathDescription { + get { + return ResourceManager.GetString("NpmNodePathDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Npm. + /// + public static string NpmOutputPaneTitle { + get { + return ResourceManager.GetString("NpmOutputPaneTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Author. + /// + public static string NpmPackageAuthor { + get { + return ResourceManager.GetString("NpmPackageAuthor", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary or original author of package; there may also be additional contributors.. + /// + public static string NpmPackageAuthorDescription { + get { + return ResourceManager.GetString("NpmPackageAuthorDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Description. + /// + public static string NpmPackageDescription { + get { + return ResourceManager.GetString("NpmPackageDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package description.. + /// + public static string NpmPackageDescriptionDescription { + get { + return ResourceManager.GetString("NpmPackageDescriptionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (enter arguments above). + /// + public static string NpmPackageInstallHelpMessage { + get { + return ResourceManager.GetString("NpmPackageInstallHelpMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Bundled Dependency. + /// + public static string NpmPackageIsBundledDependency { + get { + return ResourceManager.GetString("NpmPackageIsBundledDependency", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether or not the package is a bundled dependency.. + /// + public static string NpmPackageIsBundledDependencyDescription { + get { + return ResourceManager.GetString("NpmPackageIsBundledDependencyDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dev Dependency. + /// + public static string NpmPackageIsDevDependency { + get { + return ResourceManager.GetString("NpmPackageIsDevDependency", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether or not the package is a development dependency.. + /// + public static string NpmPackageIsDevDependencyDescription { + get { + return ResourceManager.GetString("NpmPackageIsDevDependencyDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Listed As Dependency. + /// + public static string NpmPackageIsListedInParentPackageJson { + get { + return ResourceManager.GetString("NpmPackageIsListedInParentPackageJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether or not the package is listed as a package.json dependency.. + /// + public static string NpmPackageIsListedInParentPackageJsonDescription { + get { + return ResourceManager.GetString("NpmPackageIsListedInParentPackageJsonDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Missing. + /// + public static string NpmPackageIsMissing { + get { + return ResourceManager.GetString("NpmPackageIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether or not the package is a missing dependency.. + /// + public static string NpmPackageIsMissingDescription { + get { + return ResourceManager.GetString("NpmPackageIsMissingDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Optional Dependency. + /// + public static string NpmPackageIsOptionalDependency { + get { + return ResourceManager.GetString("NpmPackageIsOptionalDependency", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether or not the package is an optional dependency.. + /// + public static string NpmPackageIsOptionalDependencyDescription { + get { + return ResourceManager.GetString("NpmPackageIsOptionalDependencyDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Keywords. + /// + public static string NpmPackageKeywords { + get { + return ResourceManager.GetString("NpmPackageKeywords", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package keywords.. + /// + public static string NpmPackageKeywordsDescription { + get { + return ResourceManager.GetString("NpmPackageKeywordsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link Status. + /// + public static string NpmPackageLinkStatus { + get { + return ResourceManager.GetString("NpmPackageLinkStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether a package has been linked from globally installed packages.. + /// + public static string NpmPackageLinkStatusDescription { + get { + return ResourceManager.GetString("NpmPackageLinkStatusDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package Name. + /// + public static string NpmPackageName { + get { + return ResourceManager.GetString("NpmPackageName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name of package, as specified in its package.json.. + /// + public static string NpmPackageNameDescription { + get { + return ResourceManager.GetString("NpmPackageNameDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Newer Version Available. + /// + public static string NpmPackageNewVersionAvailable { + get { + return ResourceManager.GetString("NpmPackageNewVersionAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether or not a newer version of the package is available.. + /// + public static string NpmPackageNewVersionAvailableDescription { + get { + return ResourceManager.GetString("NpmPackageNewVersionAvailableDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path. + /// + public static string NpmPackagePath { + get { + return ResourceManager.GetString("NpmPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Location of package on disk.. + /// + public static string NpmPackagePathDescription { + get { + return ResourceManager.GetString("NpmPackagePathDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Requested Version. + /// + public static string NpmPackageRequestedVersionRange { + get { + return ResourceManager.GetString("NpmPackageRequestedVersionRange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version of package requested in package.json belonging to parent package or project.. + /// + public static string NpmPackageRequestedVersionRangeDescription { + get { + return ResourceManager.GetString("NpmPackageRequestedVersionRangeDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package Type. + /// + public static string NpmPackageType { + get { + return ResourceManager.GetString("NpmPackageType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates whether package is global, or locally installed in your project, and whether or not it is a sub-package.. + /// + public static string NpmPackageTypeDescription { + get { + return ResourceManager.GetString("NpmPackageTypeDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version. + /// + public static string NpmPackageVersion { + get { + return ResourceManager.GetString("NpmPackageVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installed version of package.. + /// + public static string NpmPackageVersionDescription { + get { + return ResourceManager.GetString("NpmPackageVersionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} completed with errors. + /// + public static string NpmReplCommandCompletedWithErrors { + get { + return ResourceManager.GetString("NpmReplCommandCompletedWithErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Executing: {0}. + /// + public static string NpmStatusExecuting { + get { + return ResourceManager.GetString("NpmStatusExecuting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Errors Encountered ({1}) - Executing: {0}. + /// + public static string NpmStatusExecutingErrors { + get { + return ResourceManager.GetString("NpmStatusExecutingErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Executing: {0} ({1} command(s) queued). + /// + public static string NpmStatusExecutingQueued { + get { + return ResourceManager.GetString("NpmStatusExecutingQueued", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Errors Encountered ({2}) - Executing: {0} ({1} command(s) queued). + /// + public static string NpmStatusExecutingQueuedErrors { + get { + return ResourceManager.GetString("NpmStatusExecutingQueuedErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ready. + /// + public static string NpmStatusReady { + get { + return ResourceManager.GetString("NpmStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ready - Command(s) completed with errors ({0}). + /// + public static string NpmStatusReadyWithErrors { + get { + return ResourceManager.GetString("NpmStatusReadyWithErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} successfully completed. + /// + public static string NpmSuccessfullyCompleted { + get { + return ResourceManager.GetString("NpmSuccessfullyCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Today at {0:t}. + /// + public static string PackageCatalogRefresh0Days { + get { + return ResourceManager.GetString("PackageCatalogRefresh0Days", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yesterday at {0:t}. + /// + public static string PackageCatalogRefresh1Day { + get { + return ResourceManager.GetString("PackageCatalogRefresh1Day", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than 1 month ago. + /// + public static string PackageCatalogRefresh1Month { + get { + return ResourceManager.GetString("PackageCatalogRefresh1Month", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than 1 week ago. + /// + public static string PackageCatalogRefresh1Week { + get { + return ResourceManager.GetString("PackageCatalogRefresh1Week", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} days ago. + /// + public static string PackageCatalogRefresh2To7Days { + get { + return ResourceManager.GetString("PackageCatalogRefresh2To7Days", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than 2 weeks ago. + /// + public static string PackageCatalogRefresh2Weeks { + get { + return ResourceManager.GetString("PackageCatalogRefresh2Weeks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than 3 months ago. + /// + public static string PackageCatalogRefresh3Months { + get { + return ResourceManager.GetString("PackageCatalogRefresh3Months", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to More than 3 weeks ago. + /// + public static string PackageCatalogRefresh3Weeks { + get { + return ResourceManager.GetString("PackageCatalogRefresh3Weeks", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Far too long ago. + /// + public static string PackageCatalogRefresh6Months { + get { + return ResourceManager.GetString("PackageCatalogRefresh6Months", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Refresh failed - see output below for details. + /// + public static string PackageCatalogRefreshFailed { + get { + return ResourceManager.GetString("PackageCatalogRefreshFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Currently refreshing. + /// + public static string PackageCatalogRefreshing { + get { + return ResourceManager.GetString("PackageCatalogRefreshing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - info for {0} packages retrieved. + /// + public static string PackageCount { + get { + return ResourceManager.GetString("PackageCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global. + /// + public static string PackageInstallationGlobal { + get { + return ResourceManager.GetString("PackageInstallationGlobal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Local. + /// + public static string PackageInstallationLocal { + get { + return ResourceManager.GetString("PackageInstallationLocal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installed globally. + /// + public static string PackageInstalledGlobally { + get { + return ResourceManager.GetString("PackageInstalledGlobally", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Old version {0} installed globally. + /// + public static string PackageInstalledGloballyOldVersion { + get { + return ResourceManager.GetString("PackageInstalledGloballyOldVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installed locally. + /// + public static string PackageInstalledLocally { + get { + return ResourceManager.GetString("PackageInstalledLocally", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Old version {0} installed locally. + /// + public static string PackageInstalledLocallyOldVersion { + get { + return ResourceManager.GetString("PackageInstalledLocallyOldVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - {0} matching packages. + /// + public static string PackageMatchCount { + get { + return ResourceManager.GetString("PackageMatchCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global. + /// + public static string PackageTypeGlobal { + get { + return ResourceManager.GetString("PackageTypeGlobal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global sub-package. + /// + public static string PackageTypeGlobalSubpackage { + get { + return ResourceManager.GetString("PackageTypeGlobalSubpackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Local. + /// + public static string PackageTypeLocal { + get { + return ResourceManager.GetString("PackageTypeLocal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Local sub-package. + /// + public static string PackageTypeLocalSubpackage { + get { + return ResourceManager.GetString("PackageTypeLocalSubpackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global npm Packages Properties. + /// + public static string PropertiesClassGlobal { + get { + return ResourceManager.GetString("PropertiesClassGlobal", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global Package Properties. + /// + public static string PropertiesClassGlobalPackage { + get { + return ResourceManager.GetString("PropertiesClassGlobalPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Global Sub-Package Properties. + /// + public static string PropertiesClassGlobalSubPackage { + get { + return ResourceManager.GetString("PropertiesClassGlobalSubPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Local Package Properties. + /// + public static string PropertiesClassLocalPackage { + get { + return ResourceManager.GetString("PropertiesClassLocalPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Local Sub-Package Properties. + /// + public static string PropertiesClassLocalSubPackage { + get { + return ResourceManager.GetString("PropertiesClassLocalSubPackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to npm Packages Properties. + /// + public static string PropertiesClassNpm { + get { + return ResourceManager.GetString("PropertiesClassNpm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js interactive window. Type .help for a list of commands.. + /// + public static string ReplInitializationMessage { + get { + return ResourceManager.GetString("ReplInitializationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to None. + /// + public static string RequestedVersionRangeNone { + get { + return ResourceManager.GetString("RequestedVersionRangeNone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the arguments passed to the script on launch.. + /// + public static string ScriptArgumentsToolTip { + get { + return ResourceManager.GetString("ScriptArgumentsToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the script run on launch.. + /// + public static string ScriptFileTooltip { + get { + return ResourceManager.GetString("ScriptFileTooltip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to seconds. + /// + public static string Seconds { + get { + return ResourceManager.GetString("Seconds", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When checked a web browser is opened on launch. + /// + public static string StartBrowserToolTip { + get { + return ResourceManager.GetString("StartBrowserToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cached Node.js analysis loaded.. + /// + public static string StatusAnalysisLoaded { + get { + return ResourceManager.GetString("StatusAnalysisLoaded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading cached Node.js analysis failed.. + /// + public static string StatusAnalysisLoadFailed { + get { + return ResourceManager.GetString("StatusAnalysisLoadFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading cached Node.js analysis for project.... + /// + public static string StatusAnalysisLoading { + get { + return ResourceManager.GetString("StatusAnalysisLoading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js analysis saved to disk. + /// + public static string StatusAnalysisSaved { + get { + return ResourceManager.GetString("StatusAnalysisSaved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Saving Node.js analysis to disk.... + /// + public static string StatusAnalysisSaving { + get { + return ResourceManager.GetString("StatusAnalysisSaving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Node.js code analysis is up to date, analyzed {0:N0} function(s) in {1}. + /// + public static string StatusAnalysisUpToDate { + get { + return ResourceManager.GetString("StatusAnalysisUpToDate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Surround With. + /// + public static string SurroundWith { + get { + return ResourceManager.GetString("SurroundWith", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test Framework. + /// + public static string TestFramework { + get { + return ResourceManager.GetString("TestFramework", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the test framework this file applies to.. + /// + public static string TestFrameworkDescription { + get { + return ResourceManager.GetString("TestFrameworkDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replaced <EnvironmentVariables> property with <Environment>. This project will no longer work with NTVS 1.0 beta 2 or below.. + /// + public static string UpgradedEnvironmentVariables { + get { + return ResourceManager.GetString("UpgradedEnvironmentVariables", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified working directory is invalid or missing.. + /// + public static string WorkingDirInvalidOrMissing { + get { + return ResourceManager.GetString("WorkingDirInvalidOrMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specifies the working directory where the node.exe process is launched.. + /// + public static string WorkingDirToolTip { + get { + return ResourceManager.GetString("WorkingDirToolTip", resourceCulture); + } + } + } +} diff --git a/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs b/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs index bf07cd510..57c20bad0 100644 --- a/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs +++ b/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs @@ -121,12 +121,12 @@ public void RunStarted(object automationObject, Dictionary repla } var dlg = new TaskDialog(provider) { - Title = SR.ProductName, - MainInstruction = SR.GetString(SR.AzureToolsRequired), - Content = SR.GetString(SR.AzureToolsInstallInstructions), + Title = NodeJsProjectSr.ProductName, + MainInstruction = Resources.AzureToolsRequired, + Content = Resources.AzureToolsInstallInstructions, AllowCancellation = true }; - var download = new TaskDialogButton(SR.GetString(SR.DownloadAndInstall)); + var download = new TaskDialogButton(Resources.DownloadAndInstall); dlg.Buttons.Add(download); dlg.Buttons.Add(TaskDialogButton.Cancel); @@ -146,15 +146,15 @@ public void RunStarted(object automationObject, Dictionary repla if (!store.CollectionExists(DontShowUpgradeDialogAgainCollection) || !store.GetBoolean(DontShowUpgradeDialogAgainCollection, DontShowUpgradeDialogAgainProperty, false)) { var dlg = new TaskDialog(provider) { - Title = SR.ProductName, - MainInstruction = SR.GetString(SR.AzureToolsUpgradeRecommended), - Content = SR.GetString(SR.AzureToolsUpgradeInstructions), + Title = NodeJsProjectSr.ProductName, + MainInstruction = Resources.AzureToolsUpgradeRecommended, + Content = Resources.AzureToolsUpgradeInstructions, AllowCancellation = true, - VerificationText = SR.GetString(SR.DontShowAgain) + VerificationText = Resources.DontShowAgain }; - var download = new TaskDialogButton(SR.GetString(SR.DownloadAndInstall)); + var download = new TaskDialogButton(Resources.DownloadAndInstall); dlg.Buttons.Add(download); - var cont = new TaskDialogButton(SR.GetString(SR.ContinueWithoutAzureToolsUpgrade)); + var cont = new TaskDialogButton(Resources.ContinueWithoutAzureToolsUpgrade); dlg.Buttons.Add(cont); dlg.Buttons.Add(TaskDialogButton.Cancel); diff --git a/Nodejs/Product/ProjectWizard/WizardHelpers.cs b/Nodejs/Product/ProjectWizard/WizardHelpers.cs index 8f4ed33ac..5da59d78d 100644 --- a/Nodejs/Product/ProjectWizard/WizardHelpers.cs +++ b/Nodejs/Product/ProjectWizard/WizardHelpers.cs @@ -28,7 +28,7 @@ public static IServiceProvider GetProvider(object automationObject) { if (oleProvider != null) { return new ServiceProvider(oleProvider); } - MessageBox.Show(SR.GetString(SR.ErrorNoDte), SR.ProductName); + MessageBox.Show(Resources.ErrorNoDte, NodeJsProjectSr.ProductName); return null; } @@ -41,7 +41,7 @@ public static DTE GetDTE(object automationObject) { } } if (dte == null) { - MessageBox.Show(SR.GetString(SR.ErrorNoDte), SR.ProductName); + MessageBox.Show(Resources.ErrorNoDte, NodeJsProjectSr.ProductName); } return dte; } From c4528d2665344e1c20c6a75814a7b2f06ead0736 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 2 Mar 2016 17:34:48 -0800 Subject: [PATCH 3/5] Renamed original class back to original and fixed a few references --- Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs | 10 +++++----- .../Product/Nodejs/Project/DependencyNodeProperties.cs | 6 +++--- Nodejs/Product/Nodejs/Project/NodeModulesNode.cs | 4 ++-- .../Nodejs/Project/NodejsGeneralPropertyPageControl.cs | 2 +- Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs | 2 +- Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs | 2 +- Nodejs/Product/Nodejs/Project/ProjectResources.cs | 2 +- Nodejs/Product/ProjectWizard/ProjectWizard.csproj | 3 +++ 8 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs b/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs index b43c822a3..1e47f127b 100644 --- a/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs +++ b/Nodejs/Product/Nodejs/NpmUI/NpmOutputViewModel.cs @@ -317,21 +317,21 @@ private void UpdateStatusMessage() { if (executingCommand && null != command) { var commandText = command.ToString(); if (count > 0) { - status = NodeJsProjectSr.GetString( - WithErrors ? NodeJsProjectSr.NpmStatusExecutingQueuedErrors : NodeJsProjectSr.NpmStatusExecutingQueued, + status = string.Format( + WithErrors ? Resources.NpmStatusExecutingQueuedErrors : Resources.NpmStatusExecutingQueued, commandText, count, errorsInfo ); } else { - status = NodeJsProjectSr.GetString( - WithErrors ? NodeJsProjectSr.NpmStatusExecutingErrors : NodeJsProjectSr.NpmStatusExecuting, + status = string.Format( + WithErrors ? Resources.NpmStatusExecutingErrors : Resources.NpmStatusExecuting, commandText, errorsInfo ); } } else { - status = NodeJsProjectSr.GetString(WithErrors ? NodeJsProjectSr.NpmStatusReadyWithErrors : NodeJsProjectSr.NpmStatusReady, errorsInfo); + status = string.Format(WithErrors ? Resources.NpmStatusReadyWithErrors : Resources.NpmStatusReady, errorsInfo); } StatusText = status; diff --git a/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs index 442459c45..5b131b6cd 100644 --- a/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs @@ -32,9 +32,9 @@ internal DependencyNodeProperties(DependencyNode node) : base(node) {} private IPackage Package { get { return DependencyNode.Package; } } public override string GetClassName() { - return NodeJsProjectSr.GetString(IsSubPackage - ? (IsGlobalInstall ? NodeJsProjectSr.PropertiesClassGlobalSubPackage : NodeJsProjectSr.PropertiesClassLocalSubPackage) - : (IsGlobalInstall ? NodeJsProjectSr.PropertiesClassGlobalPackage : NodeJsProjectSr.PropertiesClassLocalPackage) + return (IsSubPackage + ? (IsGlobalInstall ? Resources.PropertiesClassGlobalSubPackage : Resources.PropertiesClassLocalSubPackage) + : (IsGlobalInstall ? Resources.PropertiesClassGlobalPackage : Resources.PropertiesClassLocalPackage) ); } diff --git a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs index ff7be3856..794849005 100644 --- a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs @@ -347,8 +347,8 @@ private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEv private static string GetStatusBarMessage(NpmCommandCompletedEventArgs e) { if (e.WithErrors) { - return NodeJsProjectSr.GetString( - e.Cancelled ? NodeJsProjectSr.NpmCancelledWithErrors : NodeJsProjectSr.NpmCompletedWithErrors, + return string.Format( + e.Cancelled ? Resources.NpmCancelledWithErrors : Resources.NpmCompletedWithErrors, e.CommandText); } else if (e.Cancelled) { return string.Format(Resources.NpmCancelled, e.CommandText); diff --git a/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs b/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs index 8e00c6d92..9838e0fd5 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsGeneralPropertyPageControl.cs @@ -46,7 +46,7 @@ public NodejsGeneralPropertyPageControl(NodejsGeneralPropertyPage page) : this() private void AddToolTips() { _tooltip.SetToolTip(_nodeExePath, Resources.NodeExePathToolTip); _tooltip.SetToolTip(_nodeExeArguments, Resources.NodeExeArgumentsToolTip); - _tooltip.SetToolTip(_scriptFile, Resources.ScriptFileToolTip); + _tooltip.SetToolTip(_scriptFile, Resources.ScriptFileTooltip); _tooltip.SetToolTip(_scriptArguments, Resources.ScriptArgumentsToolTip); _tooltip.SetToolTip(_nodejsPort, Resources.NodejsPortToolTip); _tooltip.SetToolTip(_startBrowser, Resources.StartBrowserToolTip); diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs index 29f6446a8..b84e88f43 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs @@ -146,7 +146,7 @@ private string GetFullUrl() { return GetFullUrl(host, TestServerPort); } catch (UriFormatException) { var output = OutputWindowRedirector.GetGeneral(NodejsPackage.Instance); - output.WriteErrorLine(Resources.ErrorInvalidLaunchUrl, host); + output.WriteErrorLine(SR.GetString(SR.ErrorInvalidLaunchUrl, host)); output.ShowAndActivate(); return string.Empty; } diff --git a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs index 06cf69580..9fbf69345 100644 --- a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs @@ -46,7 +46,7 @@ public override string GetClassName() { [SRDescriptionAttribute(NodeJsProjectSr.NpmNodePackageInstallationDescription)] public string PackageInstallation { get { - return NodeJsProjectSr.GetString(IsGlobalNode ? NodeJsProjectSr.PackageInstallationGlobal : NodeJsProjectSr.PackageInstallationLocal); + return (IsGlobalNode ? Resources.PackageInstallationGlobal : Resources.PackageInstallationLocal); } } diff --git a/Nodejs/Product/Nodejs/Project/ProjectResources.cs b/Nodejs/Product/Nodejs/Project/ProjectResources.cs index 0010f0c2c..ce1faef45 100644 --- a/Nodejs/Product/Nodejs/Project/ProjectResources.cs +++ b/Nodejs/Product/Nodejs/Project/ProjectResources.cs @@ -198,7 +198,7 @@ private static ResourceManager Manager { internal static string ProductName { get { - return GetString(NodejsToolsForVisualStudio); + return Resources.NodejsToolsForVisualStudio; } } } diff --git a/Nodejs/Product/ProjectWizard/ProjectWizard.csproj b/Nodejs/Product/ProjectWizard/ProjectWizard.csproj index 9b8761718..251c6c108 100644 --- a/Nodejs/Product/ProjectWizard/ProjectWizard.csproj +++ b/Nodejs/Product/ProjectWizard/ProjectWizard.csproj @@ -92,6 +92,9 @@ PkgCmdID.cs + + Resources.Designer.cs + TestFrameworkDirectories.cs From e08f06636067c17ace7c0acf5f7608ab5ade3de5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 2 Mar 2016 17:52:53 -0800 Subject: [PATCH 4/5] Restored strings that are still used by attributes --- .../Nodejs/Project/NpmNodeProperties.cs | 2 +- .../Nodejs/Project/ProjectResources.cs | 115 ------------------ 2 files changed, 1 insertion(+), 116 deletions(-) diff --git a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs index 9fbf69345..9f94a0f0f 100644 --- a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs @@ -38,7 +38,7 @@ private bool IsGlobalNode { } public override string GetClassName() { - return NodeJsProjectSr.GetString(IsGlobalNode ? NodeJsProjectSr.PropertiesClassGlobal : NodeJsProjectSr.PropertiesClassNpm); + return (IsGlobalNode ? Resources.PropertiesClassGlobal : Resources.PropertiesClassNpm); } [SRCategoryAttribute(NodeJsProjectSr.General)] diff --git a/Nodejs/Product/Nodejs/Project/ProjectResources.cs b/Nodejs/Product/Nodejs/Project/ProjectResources.cs index ce1faef45..c2e601e3a 100644 --- a/Nodejs/Product/Nodejs/Project/ProjectResources.cs +++ b/Nodejs/Product/Nodejs/Project/ProjectResources.cs @@ -23,82 +23,22 @@ namespace Microsoft.NodejsTools.Project { internal class NodeJsProjectSr : CommonSR { internal const string NodejsToolsForVisualStudio = "NodejsToolsForVisualStudio"; - internal const string AzureToolsInstallInstructions = "AzureToolsInstallInstructions"; - internal const string AzureToolsRequired = "AzureToolsRequired"; - internal const string AzureToolsUpgradeInstructions = "AzureToolsUpgradeInstructions"; - internal const string AzureToolsUpgradeRecommended = "AzureToolsUpgradeRecommended"; - internal const string CatalogLoadingDefault = "CatalogLoadingDefault"; - internal const string CatalogLoadingNoNpm = "CatalogLoadingNoNpm"; internal const string CategoryStatus = "CategoryStatus"; internal const string CategoryVersion = "CategoryVersion"; - internal const string ContinueWithoutAzureToolsUpgrade = "ContinueWithoutAzureToolsUpgrade"; - internal const string DebuggerConnectionClosed = "DebuggerConnectionClosed"; - internal const string DebuggerModuleUpdateFailed = "DebuggerModuleUpdateFailed"; - internal const string DebuggerPort = "DebuggerPort"; - internal const string DontShowAgain = "DontShowAgain"; - internal const string DownloadAndInstall = "DownloadAndInstall"; - internal const string EnvironmentVariables = "EnvironmentVariables"; - internal const string ErrorNoDte = "ErrorNoDte"; - internal const string IncludeNodeModulesCancelTitle = "IncludeNodeModulesCancelTitle"; - internal const string IncludeNodeModulesContent = "IncludeNodeModulesContent"; - internal const string IncludeNodeModulesIncludeDescription = "IncludeNodeModulesIncludeDescription"; - internal const string IncludeNodeModulesIncludeTitle = "IncludeNodeModulesIncludeTitle"; - internal const string IncludeNodeModulesInformation = "IncludeNodeModulesInformation"; - internal const string InsertSnippet = "InsertSnippet"; - internal const string InvalidPortNumber = "InvalidPortNumber"; - internal const string LaunchUrlToolTip = "LaunchUrlToolTip"; - internal const string LinkStatusLinkedFromGlobal = "LinkStatusLinkedFromGlobal"; - internal const string LinkStatusLinkedToProject = "LinkStatusLinkedToProject"; - internal const string LinkStatusLocallyInstalled = "LinkStatusLocallyInstalled"; - internal const string LinkStatusNotApplicableSubPackages = "LinkStatusNotApplicableSubPackages"; - internal const string LinkStatusNotLinkedToProject = "LinkStatusNotLinkedToProject"; - internal const string LinkStatusUnknown = "LinkStatusUnknown"; - internal const string LongPathClickToCopy = "LongPathClickToCopy"; - internal const string LongPathDoNothingAndDoNotWarnAgain = "LongPathDoNothingAndDoNotWarnAgain"; - internal const string LongPathDoNothingAndDoNotWarnAgainDetail = "LongPathDoNothingAndDoNotWarnAgainDetail"; - internal const string LongPathDoNothingButWarnNextTime = "LongPathDoNothingButWarnNextTime"; - internal const string LongPathFooter = "LongPathFooter"; - internal const string LongPathHidePathsExceedingTheLimit = "LongPathHidePathsExceedingTheLimit"; - internal const string LongPathNpmDedupe = "LongPathNpmDedupe"; - internal const string LongPathNpmDedupeDetail = "LongPathNpmDedupeDetail"; - internal const string LongPathNpmDedupeDidNotHelp = "LongPathNpmDedupeDidNotHelp"; - internal const string LongPathShowPathsExceedingTheLimit = "LongPathShowPathsExceedingTheLimit"; - internal const string LongPathWarningText = "LongPathWarningText"; - internal const string LongPathWarningTitle = "LongPathWarningTitle"; - internal const string Milliseconds = "Milliseconds"; - internal const string NewVersionNo = "NewVersionNo"; - internal const string NewVersionNotApplicableSubpackage = "NewVersionNotApplicableSubpackage"; - internal const string NewVersionPackageCatalogNotRetrieved = "NewVersionPackageCatalogNotRetrieved"; - internal const string NewVersionUnknown = "NewVersionUnknown"; - internal const string NewVersionYes = "NewVersionYes"; internal const string NodeExeArguments = "NodeExeArguments"; internal const string NodeExeArgumentsDescription = "NodeExeArgumentsDescription"; - internal const string NodeExeArgumentsToolTip = "NodeExeArgumentsToolTip"; - internal const string NodeExeDoesntExist = "NodeExeDoesntExist"; internal const string NodeExePath = "NodeExePath"; internal const string NodeExePathDescription = "NodeExePathDescription"; - internal const string NodeExePathNotFound = "NodeExePathNotFound"; - internal const string NodeExePathToolTip = "NodeExePathToolTip"; - internal const string NodejsNotInstalled = "NodejsNotInstalled"; - internal const string NodejsNotInstalledShort = "NodejsNotInstalledShort"; - internal const string NodejsNotSupported = "NodejsNotSupported"; internal const string NodejsPort = "NodejsPort"; internal const string NodejsPortDescription = "NodejsPortDescription"; - internal const string NodejsPortToolTip = "NodejsPortToolTip"; - internal const string NoKeywordsInPackage = "NoKeywordsInPackage"; - internal const string NpmCancelled = "NpmCancelled"; - internal const string NpmCancelledWithErrors = "NpmCancelledWithErrors"; - internal const string NpmCompletedWithErrors = "NpmCompletedWithErrors"; internal const string NpmNodePackageInstallation = "NpmNodePackageInstallation"; internal const string NpmNodePackageInstallationDescription = "NpmNodePackageInstallationDescription"; internal const string NpmNodePath = "NpmNodePath"; internal const string NpmNodePathDescription = "NpmNodePathDescription"; - internal const string NpmOutputPaneTitle = "NpmOutputPaneTitle"; internal const string NpmPackageAuthor = "NpmPackageAuthor"; internal const string NpmPackageAuthorDescription = "NpmPackageAuthorDescription"; internal const string NpmPackageDescription = "NpmPackageDescription"; internal const string NpmPackageDescriptionDescription = "NpmPackageDescriptionDescription"; - internal const string NpmPackageInstallHelpMessage = "NpmPackageInstallHelpMessage"; internal const string NpmPackageIsBundledDependency = "NpmPackageIsBundledDependency"; internal const string NpmPackageIsBundledDependencyDescription = "NpmPackageIsBundledDependencyDescription"; internal const string NpmPackageIsDevDependency = "NpmPackageIsDevDependency"; @@ -115,8 +55,6 @@ internal class NodeJsProjectSr : CommonSR { internal const string NpmPackageLinkStatusDescription = "NpmPackageLinkStatusDescription"; internal const string NpmPackageName = "NpmPackageName"; internal const string NpmPackageNameDescription = "NpmPackageNameDescription"; - internal const string NpmPackageNewVersionAvailable = "NpmPackageNewVersionAvailable"; - internal const string NpmPackageNewVersionAvailableDescription = "NpmPackageNewVersionAvailableDescription"; internal const string NpmPackagePath = "NpmPackagePath"; internal const string NpmPackagePathDescription = "NpmPackagePathDescription"; internal const string NpmPackageRequestedVersionRange = "NpmPackageRequestedVersionRange"; @@ -125,61 +63,8 @@ internal class NodeJsProjectSr : CommonSR { internal const string NpmPackageTypeDescription = "NpmPackageTypeDescription"; internal const string NpmPackageVersion = "NpmPackageVersion"; internal const string NpmPackageVersionDescription = "NpmPackageVersionDescription"; - internal const string NpmReplCommandCompletedWithErrors = "NpmReplCommandCompletedWithErrors"; - internal const string NpmStatusExecuting = "NpmStatusExecuting"; - internal const string NpmStatusExecutingErrors = "NpmStatusExecutingErrors"; - internal const string NpmStatusExecutingQueued = "NpmStatusExecutingQueued"; - internal const string NpmStatusExecutingQueuedErrors = "NpmStatusExecutingQueuedErrors"; - internal const string NpmStatusReady = "NpmStatusReady"; - internal const string NpmStatusReadyWithErrors = "NpmStatusReadyWithErrors"; - internal const string NpmSuccessfullyCompleted = "NpmSuccessfullyCompleted"; - internal const string PackageCatalogRefresh0Days = "PackageCatalogRefresh0Days"; - internal const string PackageCatalogRefresh1Day = "PackageCatalogRefresh1Day"; - internal const string PackageCatalogRefresh1Month = "PackageCatalogRefresh1Month"; - internal const string PackageCatalogRefresh1Week = "PackageCatalogRefresh1Week"; - internal const string PackageCatalogRefresh2To7Days = "PackageCatalogRefresh2To7Days"; - internal const string PackageCatalogRefresh2Weeks = "PackageCatalogRefresh2Weeks"; - internal const string PackageCatalogRefresh3Months = "PackageCatalogRefresh3Months"; - internal const string PackageCatalogRefresh3Weeks = "PackageCatalogRefresh3Weeks"; - internal const string PackageCatalogRefresh6Months = "PackageCatalogRefresh6Months"; - internal const string PackageCatalogRefreshFailed = "PackageCatalogRefreshFailed"; - internal const string PackageCatalogRefreshing = "PackageCatalogRefreshing"; - internal const string PackageCount = "PackageCount"; - internal const string PackageInstallationGlobal = "PackageInstallationGlobal"; - internal const string PackageInstallationLocal = "PackageInstallationLocal"; - internal const string PackageInstalledGlobally = "PackageInstalledGlobally"; - internal const string PackageInstalledGloballyOldVersion = "PackageInstalledGloballyOldVersion"; - internal const string PackageInstalledLocally = "PackageInstalledLocally"; - internal const string PackageInstalledLocallyOldVersion = "PackageInstalledLocallyOldVersion"; - internal const string PackageMatchCount = "PackageMatchCount"; - internal const string PackageTypeGlobal = "PackageTypeGlobal"; - internal const string PackageTypeGlobalSubpackage = "PackageTypeGlobalSubpackage"; - internal const string PackageTypeLocal = "PackageTypeLocal"; - internal const string PackageTypeLocalSubpackage = "PackageTypeLocalSubpackage"; - internal const string PropertiesClassGlobal = "PropertiesClassGlobal"; - internal const string PropertiesClassGlobalPackage = "PropertiesClassGlobalPackage"; - internal const string PropertiesClassGlobalSubPackage = "PropertiesClassGlobalSubPackage"; - internal const string PropertiesClassLocalPackage = "PropertiesClassLocalPackage"; - internal const string PropertiesClassLocalSubPackage = "PropertiesClassLocalSubPackage"; - internal const string PropertiesClassNpm = "PropertiesClassNpm"; - internal const string ReplInitializationMessage = "ReplInitializationMessage"; - internal const string RequestedVersionRangeNone = "RequestedVersionRangeNone"; - internal const string ScriptArgumentsToolTip = "ScriptArgumentsToolTip"; - internal const string ScriptFileToolTip = "ScriptFileTooltip"; - internal const string Seconds = "Seconds"; - internal const string StartBrowserToolTip = "StartBrowserToolTip"; - internal const string StatusAnalysisLoaded = "StatusAnalysisLoaded"; - internal const string StatusAnalysisLoadFailed = "StatusAnalysisLoadFailed"; - internal const string StatusAnalysisLoading = "StatusAnalysisLoading"; - internal const string StatusAnalysisSaved = "StatusAnalysisSaved"; - internal const string StatusAnalysisSaving = "StatusAnalysisSaving"; - internal const string StatusAnalysisUpToDate = "StatusAnalysisUpToDate"; - internal const string SurroundWith = "SurroundWith"; internal const string TestFramework = "TestFramework"; internal const string TestFrameworkDescription = "TestFrameworkDescription"; - internal const string UpgradedEnvironmentVariables = "UpgradedEnvironmentVariables"; - internal const string WorkingDirInvalidOrMissing = "WorkingDirInvalidOrMissing"; - internal const string WorkingDirToolTip = "WorkingDirToolTip"; private static readonly Lazy _manager = new Lazy( () => new System.Resources.ResourceManager("Microsoft.NodejsTools.Resources", typeof(NodeJsProjectSr).Assembly), From adf70820a2e9e5f0a57c7b2cfb94d0dd18343265 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 2 Mar 2016 17:55:05 -0800 Subject: [PATCH 5/5] Renamed SR class back to SR post refactoring --- .../Nodejs/Commands/ImportWizardCommand.cs | 4 +- Nodejs/Product/Nodejs/EditFilter.cs | 4 +- .../Nodejs/Intellisense/TaskProvider.cs | 4 +- .../Product/Nodejs/Jade/IdleTimeAsyncTask.cs | 5 +- Nodejs/Product/Nodejs/Nodejs.cs | 4 +- .../Nodejs/Options/NodejsNpmOptionsControl.cs | 2 +- Nodejs/Product/Nodejs/Project/Attributes.cs | 6 +- .../Product/Nodejs/Project/DependencyNode.cs | 2 +- .../Project/DependencyNodeProperties.cs | 84 +++++++++---------- .../Product/Nodejs/Project/NodeModulesNode.cs | 6 +- .../Project/NodejsFileNodeProperties.cs | 20 ++--- .../Nodejs/Project/NodejsFolderNode.cs | 2 +- .../Nodejs/Project/NodejsProjectLauncher.cs | 4 +- .../Nodejs/Project/NodejsProjectNode.cs | 2 +- .../Project/NodejsProjectNodeProperties.cs | 36 ++++---- .../NodejsTypeScriptFileNodeProperties.cs | 20 ++--- .../Nodejs/Project/NpmNodeProperties.cs | 12 +-- .../Nodejs/Project/ProjectResources.cs | 4 +- .../ProjectWizard/CloudServiceWizard.cs | 4 +- Nodejs/Product/ProjectWizard/WizardHelpers.cs | 4 +- 20 files changed, 115 insertions(+), 114 deletions(-) diff --git a/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs b/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs index 61be07d8e..2d5fe4e16 100644 --- a/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs +++ b/Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs @@ -68,7 +68,7 @@ public override void DoCommand(object sender, EventArgs args) { "Some file paths could not be accessed." + Environment.NewLine + "Try moving your source code to a location where you " + "can read and write files.", - NodeJsProjectSr.ProductName + SR.ProductName ); } else { string exName = String.Empty; @@ -79,7 +79,7 @@ public override void DoCommand(object sender, EventArgs args) { MessageBox.Show( "An unexpected error " + exName + "occurred while creating your project.", - NodeJsProjectSr.ProductName + SR.ProductName ); } return; diff --git a/Nodejs/Product/Nodejs/EditFilter.cs b/Nodejs/Product/Nodejs/EditFilter.cs index 96ffe12b6..520b69eca 100644 --- a/Nodejs/Product/Nodejs/EditFilter.cs +++ b/Nodejs/Product/Nodejs/EditFilter.cs @@ -225,9 +225,9 @@ private int GotoDefinition() { } } else if (values.Count + definitions.Count == 0) { if (String.IsNullOrWhiteSpace(analysis.Expression)) { - MessageBox.Show(String.Format("Cannot go to definition. The cursor is not on a symbol."), NodeJsProjectSr.ProductName); + MessageBox.Show(String.Format("Cannot go to definition. The cursor is not on a symbol."), SR.ProductName); } else { - MessageBox.Show(String.Format("Cannot go to definition \"{0}\"", analysis.Expression), NodeJsProjectSr.ProductName); + MessageBox.Show(String.Format("Cannot go to definition \"{0}\"", analysis.Expression), SR.ProductName); } } else if (definitions.Count == 0) { ShowFindSymbolsDialog(analysis, new SymbolList("Values", StandardGlyphGroup.GlyphForwardType, values.Values)); diff --git a/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs b/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs index 6d63b6718..1a0df2484 100644 --- a/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs +++ b/Nodejs/Product/Nodejs/Intellisense/TaskProvider.cs @@ -479,7 +479,7 @@ private void Worker() { private void Refresh() { _serviceProvider.GetUIThread().MustNotBeCalledFromUIThread("Refresh must not be called from the UI thread"); - RefreshAsync().WaitAndHandleAllExceptions(NodeJsProjectSr.ProductName, GetType()); + RefreshAsync().WaitAndHandleAllExceptions(SR.ProductName, GetType()); } private async Task RefreshAsync() { @@ -563,7 +563,7 @@ private void SendMessage(WorkerMessage message) { if (!_hasWorker) { _hasWorker = true; Task.Run(() => Worker()) - .HandleAllExceptions(NodeJsProjectSr.ProductName, GetType()) + .HandleAllExceptions(SR.ProductName, GetType()) .DoNotWait(); } } diff --git a/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs b/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs index 04b638178..cf799865d 100644 --- a/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs +++ b/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs @@ -22,6 +22,7 @@ using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudioTools; using Microsoft.VisualStudioTools.Project; +using SR = Microsoft.NodejsTools.Project.SR; namespace Microsoft.NodejsTools.Jade { /// @@ -166,12 +167,12 @@ private void DoTaskInternal() { result = ex; } finally { NodejsPackage.Instance.GetUIThread().InvokeAsync(() => UIThreadCompletedCallback(result)) - .HandleAllExceptions(NodeJsProjectSr.ProductName) + .HandleAllExceptions(SR.ProductName) .DoNotWait(); } } else if (Interlocked.Read(ref _closed) > 0) { NodejsPackage.Instance.GetUIThread().InvokeAsync((() => UIThreadCanceledCallback(null))) - .HandleAllExceptions(NodeJsProjectSr.ProductName) + .HandleAllExceptions(SR.ProductName) .DoNotWait(); } }); diff --git a/Nodejs/Product/Nodejs/Nodejs.cs b/Nodejs/Product/Nodejs/Nodejs.cs index cd554b547..ad8513226 100644 --- a/Nodejs/Product/Nodejs/Nodejs.cs +++ b/Nodejs/Product/Nodejs/Nodejs.cs @@ -121,7 +121,7 @@ public static string GetPathToNodeExecutableFromEnvironment(string executable = public static void ShowNodejsNotInstalled() { MessageBox.Show( Resources.NodejsNotInstalled, - NodeJsProjectSr.ProductName, + SR.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error ); @@ -130,7 +130,7 @@ public static void ShowNodejsNotInstalled() { public static void ShowNodejsPathNotFound(string path) { MessageBox.Show( string.Format(Resources.NodeExeDoesntExist, path), - NodeJsProjectSr.ProductName, + SR.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error ); diff --git a/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs b/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs index ec0f2ecda..5f78f45ce 100644 --- a/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs +++ b/Nodejs/Product/Nodejs/Options/NodejsNpmOptionsControl.cs @@ -58,7 +58,7 @@ private void ClearCacheButton_Click(object sender, EventArgs e) { ); } catch (Exception exception) { try { - ActivityLog.LogError(NodeJsProjectSr.ProductName, exception.ToString()); + ActivityLog.LogError(SR.ProductName, exception.ToString()); } catch (InvalidOperationException) { // Activity Log is unavailable. } diff --git a/Nodejs/Product/Nodejs/Project/Attributes.cs b/Nodejs/Product/Nodejs/Project/Attributes.cs index 99cdd921f..0afe08354 100644 --- a/Nodejs/Product/Nodejs/Project/Attributes.cs +++ b/Nodejs/Product/Nodejs/Project/Attributes.cs @@ -28,7 +28,7 @@ public SRDisplayNameAttribute(string name) { public override string DisplayName { get { - return NodeJsProjectSr.GetString(_name); + return SR.GetString(_name); } } } @@ -45,7 +45,7 @@ public override string Description { get { if (!_replaced) { _replaced = true; - DescriptionValue = NodeJsProjectSr.GetString(base.Description); + DescriptionValue = SR.GetString(base.Description); } return base.Description; } @@ -59,7 +59,7 @@ public SRCategoryAttribute(string category) } protected override string GetLocalizedString(string value) { - return NodeJsProjectSr.GetString(value); + return SR.GetString(value); } } } diff --git a/Nodejs/Product/Nodejs/Project/DependencyNode.cs b/Nodejs/Product/Nodejs/Project/DependencyNode.cs index 4b9bcc10a..6ce8dc3bc 100644 --- a/Nodejs/Product/Nodejs/Project/DependencyNode.cs +++ b/Nodejs/Product/Nodejs/Project/DependencyNode.cs @@ -267,7 +267,7 @@ internal override int ExecCommandOnNode(Guid cmdGroup, uint cmd, uint nCmdexecop if (ex is InvalidOperationException || ex is Win32Exception) { MessageBox.Show( String.Format("Path to module does not exist:\n {0}", path), - NodeJsProjectSr.ProductName, + SR.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); return VSConstants.S_FALSE; diff --git a/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs index 5b131b6cd..f8f83133f 100644 --- a/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs @@ -38,27 +38,27 @@ public override string GetClassName() { ); } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackageName)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageNameDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackageName)] + [SRDescriptionAttribute(SR.NpmPackageNameDescription)] public string PackageName { get { return null == Package ? null : Package.Name; } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryVersion)] - [SRDisplayName(NodeJsProjectSr.NpmPackageVersion)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageVersionDescription)] + [SRCategoryAttribute(SR.CategoryVersion)] + [SRDisplayName(SR.NpmPackageVersion)] + [SRDescriptionAttribute(SR.NpmPackageVersionDescription)] public string PackageVersion { get { return null == Package ? null : Package.Version.ToString(); } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryVersion)] - [SRDisplayName(NodeJsProjectSr.NpmPackageRequestedVersionRange)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageRequestedVersionRangeDescription)] + [SRCategoryAttribute(SR.CategoryVersion)] + [SRDisplayName(SR.NpmPackageRequestedVersionRange)] + [SRDescriptionAttribute(SR.NpmPackageRequestedVersionRangeDescription)] public string RequestedVersionRange { get { var range = null == Package ? null : Package.RequestedVersionRange; @@ -100,18 +100,18 @@ private IPackageCatalog MostRecentlyLoadedCatalog { // } //} - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackageDescription)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageDescriptionDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackageDescription)] + [SRDescriptionAttribute(SR.NpmPackageDescriptionDescription)] public string Description { get { return null == Package ? null : Package.Description; } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackageKeywords)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageKeywordsDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackageKeywords)] + [SRDescriptionAttribute(SR.NpmPackageKeywordsDescription)] public string Keywords { get { if (null == Package) { @@ -129,9 +129,9 @@ public string Keywords { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackageAuthor)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageAuthorDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackageAuthor)] + [SRDescriptionAttribute(SR.NpmPackageAuthorDescription)] public string Author { get { var author = null == Package ? null : Package.Author; @@ -139,9 +139,9 @@ public string Author { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackagePath)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackagePathDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackagePath)] + [SRDescriptionAttribute(SR.NpmPackagePathDescription)] public string Path { get { return null == Package ? null : Package.Path; @@ -172,9 +172,9 @@ internal bool IsSubPackage { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackageType)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageTypeDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackageType)] + [SRDescriptionAttribute(SR.NpmPackageTypeDescription)] public string PackageType { get { if (IsGlobalInstall) { @@ -190,9 +190,9 @@ public string PackageType { } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmPackageLinkStatus)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageLinkStatusDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmPackageLinkStatus)] + [SRDescriptionAttribute(SR.NpmPackageLinkStatusDescription)] public string LinkStatus { get { if (IsSubPackage) { @@ -225,45 +225,45 @@ public string LinkStatus { } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] - [SRDisplayName(NodeJsProjectSr.NpmPackageIsListedInParentPackageJson)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsListedInParentPackageJsonDescription)] + [SRCategoryAttribute(SR.CategoryStatus)] + [SRDisplayName(SR.NpmPackageIsListedInParentPackageJson)] + [SRDescriptionAttribute(SR.NpmPackageIsListedInParentPackageJsonDescription)] public bool IsListedInParentPackageJson { get { return null != Package && Package.IsListedInParentPackageJson; } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] - [SRDisplayName(NodeJsProjectSr.NpmPackageIsMissing)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsMissingDescription)] + [SRCategoryAttribute(SR.CategoryStatus)] + [SRDisplayName(SR.NpmPackageIsMissing)] + [SRDescriptionAttribute(SR.NpmPackageIsMissingDescription)] public bool IsMissing { get { return null != Package && Package.IsMissing; } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] - [SRDisplayName(NodeJsProjectSr.NpmPackageIsDevDependency)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsDevDependencyDescription)] + [SRCategoryAttribute(SR.CategoryStatus)] + [SRDisplayName(SR.NpmPackageIsDevDependency)] + [SRDescriptionAttribute(SR.NpmPackageIsDevDependencyDescription)] public bool IsDevDependency { get { return null != Package && Package.IsDevDependency; } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] - [SRDisplayName(NodeJsProjectSr.NpmPackageIsOptionalDependency)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsOptionalDependencyDescription)] + [SRCategoryAttribute(SR.CategoryStatus)] + [SRDisplayName(SR.NpmPackageIsOptionalDependency)] + [SRDescriptionAttribute(SR.NpmPackageIsOptionalDependencyDescription)] public bool IsOptionalDependency { get { return null != Package && Package.IsOptionalDependency; } } - [SRCategoryAttribute(NodeJsProjectSr.CategoryStatus)] - [SRDisplayName(NodeJsProjectSr.NpmPackageIsBundledDependency)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmPackageIsBundledDependencyDescription)] + [SRCategoryAttribute(SR.CategoryStatus)] + [SRDisplayName(SR.NpmPackageIsBundledDependency)] + [SRDescriptionAttribute(SR.NpmPackageIsBundledDependencyDescription)] public bool IsBundledDependency { get { return null != Package && Package.IsBundledDependency; diff --git a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs index 794849005..e23592820 100644 --- a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs @@ -265,7 +265,7 @@ private void ForceUpdateStatusBarWithNpmActivity(string activity) { private void ForceUpdateStatusBarWithNpmActivitySafe(string activity) { ProjectMgr.Site.GetUIThread().InvokeAsync(() => ForceUpdateStatusBarWithNpmActivity(activity)) - .HandleAllExceptions(NodeJsProjectSr.ProductName) + .HandleAllExceptions(SR.ProductName) .DoNotWait(); } @@ -341,7 +341,7 @@ private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEv StopNpmIdleTimer(); _npmIdleTimer = new Timer( - _ => ProjectMgr.Site.GetUIThread().Invoke(() => _projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(NodeJsProjectSr.ProductName).DoNotWait()), + _ => ProjectMgr.Site.GetUIThread().Invoke(() => _projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(SR.ProductName).DoNotWait()), null, 1000, Timeout.Infinite); } @@ -368,7 +368,7 @@ private void StopNpmIdleTimer() { internal void ReloadHierarchySafe() { NodejsPackage.Instance.GetUIThread().InvokeAsync(ReloadHierarchy) - .HandleAllExceptions(NodeJsProjectSr.ProductName) + .HandleAllExceptions(SR.ProductName) .DoNotWait(); } diff --git a/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs index 33b832f64..627a85bdd 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs @@ -40,16 +40,16 @@ internal NodejsIncludedFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(NodeJsProjectSr.Advanced)] - [LocDisplayName(NodeJsProjectSr.TestFramework)] - [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] + [SRCategoryAttribute(SR.Advanced)] + [LocDisplayName(SR.TestFramework)] + [SRDescriptionAttribute(SR.TestFrameworkDescription)] [TypeConverter(typeof(TestFrameworkStringConverter))] public string TestFramework { get { - return GetProperty(NodeJsProjectSr.TestFramework, string.Empty); + return GetProperty(SR.TestFramework, string.Empty); } set { - SetProperty(NodeJsProjectSr.TestFramework, value.ToString()); + SetProperty(SR.TestFramework, value.ToString()); } } } @@ -60,16 +60,16 @@ internal NodejsLinkFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(NodeJsProjectSr.Advanced)] - [LocDisplayName(NodeJsProjectSr.TestFramework)] - [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] + [SRCategoryAttribute(SR.Advanced)] + [LocDisplayName(SR.TestFramework)] + [SRDescriptionAttribute(SR.TestFrameworkDescription)] [TypeConverter(typeof(TestFrameworkStringConverter))] public string TestFramework { get { - return GetProperty(NodeJsProjectSr.TestFramework, string.Empty); + return GetProperty(SR.TestFramework, string.Empty); } set { - SetProperty(NodeJsProjectSr.TestFramework, value.ToString()); + SetProperty(SR.TestFramework, value.ToString()); } } } diff --git a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs index dead6f360..45775c340 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs @@ -222,7 +222,7 @@ private bool ShouldIncludeNodeModulesFolderInProject() { var taskDialog = new TaskDialog(_project.ProjectMgr.Site) { AllowCancellation = true, EnableHyperlinks = true, - Title = NodeJsProjectSr.ProductName, + Title = SR.ProductName, MainIcon = TaskDialogIcon.Warning, Content = Resources.IncludeNodeModulesContent, Buttons = { diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs index b84e88f43..393c2c5e4 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectLauncher.cs @@ -146,7 +146,7 @@ private string GetFullUrl() { return GetFullUrl(host, TestServerPort); } catch (UriFormatException) { var output = OutputWindowRedirector.GetGeneral(NodejsPackage.Instance); - output.WriteErrorLine(SR.GetString(SR.ErrorInvalidLaunchUrl, host)); + output.WriteErrorLine(VisualStudioTools.Project.SR.GetString(VisualStudioTools.Project.SR.ErrorInvalidLaunchUrl, host)); output.ShowAndActivate(); return string.Empty; } @@ -216,7 +216,7 @@ private bool DoesProjectSupportDebugging() { return MessageBox.Show( "This TypeScript project has 'Combine Javascript output into file' option enabled. This option is not supported by NTVS debugger, " + "and may result in erratic behavior of breakpoints, stepping, and debug tool windows. Are you sure you want to start debugging?", - NodeJsProjectSr.ProductName, + SR.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Warning ) == DialogResult.Yes; diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs index c11dc50ab..2ed90fb45 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs @@ -840,7 +840,7 @@ public async Task CheckForLongPaths(string npmArguments = null) { var button = taskDialog.ShowModal(); if (button == dedupeButton) { var repl = NodejsPackage.Instance.OpenReplWindow(focus: false); - await repl.ExecuteCommand(".npm dedupe").HandleAllExceptions(NodeJsProjectSr.ProductName); + await repl.ExecuteCommand(".npm dedupe").HandleAllExceptions(SR.ProductName); taskDialog.Content += "\r\n\r\n" + Resources.LongPathNpmDedupeDidNotHelp; taskDialog.Buttons.Remove(dedupeButton); diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs index 486c04d74..d078e1264 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsProjectNodeProperties.cs @@ -54,9 +54,9 @@ public uint TargetFramework { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NodeExePath)] - [SRDescriptionAttribute(NodeJsProjectSr.NodeExePathDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NodeExePath)] + [SRDescriptionAttribute(SR.NodeExePathDescription)] public string NodeExePath { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -72,9 +72,9 @@ public string NodeExePath { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NodeExeArguments)] - [SRDescriptionAttribute(NodeJsProjectSr.NodeExeArgumentsDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NodeExeArguments)] + [SRDescriptionAttribute(SR.NodeExeArgumentsDescription)] public string NodeExeArguments { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -88,9 +88,9 @@ public string NodeExeArguments { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.ScriptArguments)] - [SRDescriptionAttribute(NodeJsProjectSr.ScriptArgumentsDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.ScriptArguments)] + [SRDescriptionAttribute(SR.ScriptArgumentsDescription)] public string ScriptArguments { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -104,9 +104,9 @@ public string ScriptArguments { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NodejsPort)] - [SRDescriptionAttribute(NodeJsProjectSr.NodejsPortDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NodejsPort)] + [SRDescriptionAttribute(SR.NodejsPortDescription)] public int? NodejsPort { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke((Func)(() => { @@ -124,9 +124,9 @@ public int? NodejsPort { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.LaunchUrl)] - [SRDescriptionAttribute(NodeJsProjectSr.LaunchUrlDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.LaunchUrl)] + [SRDescriptionAttribute(SR.LaunchUrlDescription)] public string LaunchUrl { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { @@ -140,9 +140,9 @@ public string LaunchUrl { } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.StartWebBrowser)] - [SRDescriptionAttribute(NodeJsProjectSr.StartWebBrowserDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.StartWebBrowser)] + [SRDescriptionAttribute(SR.StartWebBrowserDescription)] public bool StartWebBrowser { get { return HierarchyNode.ProjectMgr.Site.GetUIThread().Invoke(() => { diff --git a/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs index b7a072645..bbf32b996 100644 --- a/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NodejsTypeScriptFileNodeProperties.cs @@ -38,19 +38,19 @@ internal NodejsTypeScriptFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(NodeJsProjectSr.Advanced)] - [LocDisplayName(NodeJsProjectSr.TestFramework)] - [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] + [SRCategoryAttribute(SR.Advanced)] + [LocDisplayName(SR.TestFramework)] + [SRDescriptionAttribute(SR.TestFrameworkDescription)] public string TestFramework { get { - var framework = this.HierarchyNode.ItemNode.GetMetadata(NodeJsProjectSr.TestFramework); + var framework = this.HierarchyNode.ItemNode.GetMetadata(SR.TestFramework); if (String.IsNullOrWhiteSpace(framework)) { return String.Empty; } return Convert.ToString(framework); } set { - this.HierarchyNode.ItemNode.SetMetadata(NodeJsProjectSr.TestFramework, value.ToString()); + this.HierarchyNode.ItemNode.SetMetadata(SR.TestFramework, value.ToString()); } } } @@ -61,12 +61,12 @@ internal NodejsTypeScriptLinkFileNodeProperties(HierarchyNode node) : base(node) { } - [SRCategoryAttribute(NodeJsProjectSr.Advanced)] - [LocDisplayName(NodeJsProjectSr.TestFramework)] - [SRDescriptionAttribute(NodeJsProjectSr.TestFrameworkDescription)] + [SRCategoryAttribute(SR.Advanced)] + [LocDisplayName(SR.TestFramework)] + [SRDescriptionAttribute(SR.TestFrameworkDescription)] public string TestFramework { get { - var framework = this.HierarchyNode.ItemNode.GetMetadata(NodeJsProjectSr.TestFramework); + var framework = this.HierarchyNode.ItemNode.GetMetadata(SR.TestFramework); if (String.IsNullOrEmpty(framework)) { return String.Empty; } @@ -74,7 +74,7 @@ public string TestFramework { } set { - this.HierarchyNode.ItemNode.SetMetadata(NodeJsProjectSr.TestFramework, value.ToString()); + this.HierarchyNode.ItemNode.SetMetadata(SR.TestFramework, value.ToString()); } } } diff --git a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs index 9f94a0f0f..a8110f174 100644 --- a/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs +++ b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs @@ -41,18 +41,18 @@ public override string GetClassName() { return (IsGlobalNode ? Resources.PropertiesClassGlobal : Resources.PropertiesClassNpm); } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmNodePackageInstallation)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmNodePackageInstallationDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmNodePackageInstallation)] + [SRDescriptionAttribute(SR.NpmNodePackageInstallationDescription)] public string PackageInstallation { get { return (IsGlobalNode ? Resources.PackageInstallationGlobal : Resources.PackageInstallationLocal); } } - [SRCategoryAttribute(NodeJsProjectSr.General)] - [SRDisplayName(NodeJsProjectSr.NpmNodePath)] - [SRDescriptionAttribute(NodeJsProjectSr.NpmNodePathDescription)] + [SRCategoryAttribute(SR.General)] + [SRDisplayName(SR.NpmNodePath)] + [SRDescriptionAttribute(SR.NpmNodePathDescription)] public string Path { get { var node = NpmNode; diff --git a/Nodejs/Product/Nodejs/Project/ProjectResources.cs b/Nodejs/Product/Nodejs/Project/ProjectResources.cs index c2e601e3a..2d114a2cc 100644 --- a/Nodejs/Product/Nodejs/Project/ProjectResources.cs +++ b/Nodejs/Product/Nodejs/Project/ProjectResources.cs @@ -20,7 +20,7 @@ using CommonSR = Microsoft.VisualStudioTools.Project.SR; namespace Microsoft.NodejsTools.Project { - internal class NodeJsProjectSr : CommonSR { + internal class SR : CommonSR { internal const string NodejsToolsForVisualStudio = "NodejsToolsForVisualStudio"; internal const string CategoryStatus = "CategoryStatus"; @@ -67,7 +67,7 @@ internal class NodeJsProjectSr : CommonSR { internal const string TestFrameworkDescription = "TestFrameworkDescription"; private static readonly Lazy _manager = new Lazy( - () => new System.Resources.ResourceManager("Microsoft.NodejsTools.Resources", typeof(NodeJsProjectSr).Assembly), + () => new System.Resources.ResourceManager("Microsoft.NodejsTools.Resources", typeof(SR).Assembly), LazyThreadSafetyMode.ExecutionAndPublication ); diff --git a/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs b/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs index 57c20bad0..2905dd550 100644 --- a/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs +++ b/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs @@ -121,7 +121,7 @@ public void RunStarted(object automationObject, Dictionary repla } var dlg = new TaskDialog(provider) { - Title = NodeJsProjectSr.ProductName, + Title = SR.ProductName, MainInstruction = Resources.AzureToolsRequired, Content = Resources.AzureToolsInstallInstructions, AllowCancellation = true @@ -146,7 +146,7 @@ public void RunStarted(object automationObject, Dictionary repla if (!store.CollectionExists(DontShowUpgradeDialogAgainCollection) || !store.GetBoolean(DontShowUpgradeDialogAgainCollection, DontShowUpgradeDialogAgainProperty, false)) { var dlg = new TaskDialog(provider) { - Title = NodeJsProjectSr.ProductName, + Title = SR.ProductName, MainInstruction = Resources.AzureToolsUpgradeRecommended, Content = Resources.AzureToolsUpgradeInstructions, AllowCancellation = true, diff --git a/Nodejs/Product/ProjectWizard/WizardHelpers.cs b/Nodejs/Product/ProjectWizard/WizardHelpers.cs index 5da59d78d..0c3555599 100644 --- a/Nodejs/Product/ProjectWizard/WizardHelpers.cs +++ b/Nodejs/Product/ProjectWizard/WizardHelpers.cs @@ -28,7 +28,7 @@ public static IServiceProvider GetProvider(object automationObject) { if (oleProvider != null) { return new ServiceProvider(oleProvider); } - MessageBox.Show(Resources.ErrorNoDte, NodeJsProjectSr.ProductName); + MessageBox.Show(Resources.ErrorNoDte, SR.ProductName); return null; } @@ -41,7 +41,7 @@ public static DTE GetDTE(object automationObject) { } } if (dte == null) { - MessageBox.Show(Resources.ErrorNoDte, NodeJsProjectSr.ProductName); + MessageBox.Show(Resources.ErrorNoDte, SR.ProductName); } return dte; }