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/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/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/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/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..cf799865d 100644 --- a/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs +++ b/Nodejs/Product/Nodejs/Jade/IdleTimeAsyncTask.cs @@ -18,6 +18,7 @@ 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; diff --git a/Nodejs/Product/Nodejs/Nodejs.cs b/Nodejs/Product/Nodejs/Nodejs.cs index 140719cca..ad8513226 100644 --- a/Nodejs/Product/Nodejs/Nodejs.cs +++ b/Nodejs/Product/Nodejs/Nodejs.cs @@ -120,7 +120,7 @@ public static string GetPathToNodeExecutableFromEnvironment(string executable = #if !NO_WINDOWS public static void ShowNodejsNotInstalled() { MessageBox.Show( - SR.GetString(SR.NodejsNotInstalled), + Resources.NodejsNotInstalled, SR.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error @@ -129,7 +129,7 @@ public static void ShowNodejsNotInstalled() { public static void ShowNodejsPathNotFound(string path) { MessageBox.Show( - SR.GetString(SR.NodeExeDoesntExist, path), + string.Format(Resources.NodeExeDoesntExist, path), SR.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..1e47f127b 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 = string.Format( + WithErrors ? Resources.NpmStatusExecutingQueuedErrors : Resources.NpmStatusExecutingQueued, commandText, count, errorsInfo ); } else { - status = SR.GetString( - WithErrors ? SR.NpmStatusExecutingErrors : SR.NpmStatusExecuting, + status = string.Format( + WithErrors ? Resources.NpmStatusExecutingErrors : Resources.NpmStatusExecuting, commandText, errorsInfo ); } } else { - status = SR.GetString(WithErrors ? SR.NpmStatusReadyWithErrors : SR.NpmStatusReady, errorsInfo); + status = string.Format(WithErrors ? Resources.NpmStatusReadyWithErrors : Resources.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/Project/DependencyNodeProperties.cs b/Nodejs/Product/Nodejs/Project/DependencyNodeProperties.cs index 030bc8754..f8f83133f 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 SR.GetString(IsSubPackage - ? (IsGlobalInstall ? SR.PropertiesClassGlobalSubPackage : SR.PropertiesClassLocalSubPackage) - : (IsGlobalInstall ? SR.PropertiesClassGlobalPackage : SR.PropertiesClassLocalPackage) + return (IsSubPackage + ? (IsGlobalInstall ? Resources.PropertiesClassGlobalSubPackage : Resources.PropertiesClassLocalSubPackage) + : (IsGlobalInstall ? Resources.PropertiesClassGlobalPackage : Resources.PropertiesClassLocalPackage) ); } @@ -62,7 +62,7 @@ public string PackageVersion { public string RequestedVersionRange { get { var range = null == Package ? null : Package.RequestedVersionRange; - return range ?? SR.GetString(SR.RequestedVersionRangeNone); + return range ?? Resources.RequestedVersionRangeNone; } } @@ -179,13 +179,13 @@ 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; } } @@ -196,7 +196,7 @@ public string PackageType { public string LinkStatus { get { if (IsSubPackage) { - return SR.GetString(SR.LinkStatusNotApplicableSubPackages); + return Resources.LinkStatusNotApplicableSubPackages; } var package = Package; @@ -207,21 +207,21 @@ 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; } } diff --git a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs index 599c50a59..e23592820 100644 --- a/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs +++ b/Nodejs/Product/Nodejs/Project/NodeModulesNode.cs @@ -347,13 +347,13 @@ private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEv private static string GetStatusBarMessage(NpmCommandCompletedEventArgs e) { if (e.WithErrors) { - return SR.GetString( - e.Cancelled ? SR.NpmCancelledWithErrors : SR.NpmCompletedWithErrors, + return string.Format( + e.Cancelled ? Resources.NpmCancelledWithErrors : Resources.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() { diff --git a/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NodejsFileNodeProperties.cs index 352d8c71a..627a85bdd 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 { diff --git a/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs b/Nodejs/Product/Nodejs/Project/NodejsFolderNode.cs index fda25299b..45775c340 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, 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..9838e0fd5 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..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; } diff --git a/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs b/Nodejs/Product/Nodejs/Project/NodejsProjectNode.cs index 7c1388592..2ed90fb45 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; @@ -842,7 +842,7 @@ public async Task CheckForLongPaths(string npmArguments = null) { var repl = NodejsPackage.Instance.OpenReplWindow(focus: false); await repl.ExecuteCommand(".npm dedupe").HandleAllExceptions(SR.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/NpmNodeProperties.cs b/Nodejs/Product/Nodejs/Project/NpmNodeProperties.cs index 4508ae7f1..a8110f174 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 SR.GetString(IsGlobalNode ? SR.PropertiesClassGlobal : SR.PropertiesClassNpm); + return (IsGlobalNode ? Resources.PropertiesClassGlobal : Resources.PropertiesClassNpm); } [SRCategoryAttribute(SR.General)] @@ -46,7 +46,7 @@ public override string GetClassName() { [SRDescriptionAttribute(SR.NpmNodePackageInstallationDescription)] public string PackageInstallation { get { - return SR.GetString(IsGlobalNode ? SR.PackageInstallationGlobal : SR.PackageInstallationLocal); + return (IsGlobalNode ? Resources.PackageInstallationGlobal : Resources.PackageInstallationLocal); } } diff --git a/Nodejs/Product/Nodejs/Project/ProjectResources.cs b/Nodejs/Product/Nodejs/Project/ProjectResources.cs index 3d3b3ec9f..2d114a2cc 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 SR : 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 SR : 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 SR : 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(SR).Assembly), @@ -198,7 +83,7 @@ private static ResourceManager Manager { internal static string ProductName { get { - return GetString(NodejsToolsForVisualStudio); + return Resources.NodejsToolsForVisualStudio; } } } 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..2905dd550 100644 --- a/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs +++ b/Nodejs/Product/ProjectWizard/CloudServiceWizard.cs @@ -122,11 +122,11 @@ 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), + 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); @@ -147,14 +147,14 @@ public void RunStarted(object automationObject, Dictionary repla !store.GetBoolean(DontShowUpgradeDialogAgainCollection, DontShowUpgradeDialogAgainProperty, false)) { var dlg = new TaskDialog(provider) { Title = SR.ProductName, - MainInstruction = SR.GetString(SR.AzureToolsUpgradeRecommended), - Content = SR.GetString(SR.AzureToolsUpgradeInstructions), + 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/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)); } } } 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 diff --git a/Nodejs/Product/ProjectWizard/WizardHelpers.cs b/Nodejs/Product/ProjectWizard/WizardHelpers.cs index 8f4ed33ac..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(SR.GetString(SR.ErrorNoDte), SR.ProductName); + MessageBox.Show(Resources.ErrorNoDte, SR.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, SR.ProductName); } return dte; }