Skip to content

Commit 190a253

Browse files
authored
Merge pull request #35 from Microsoft/dev/bemcmorr/loc
Localize option strings
2 parents c382fd9 + 1f8ee41 commit 190a253

19 files changed

Lines changed: 1151 additions & 221 deletions

GoogleTestAdapter/Core/Helpers/TestProcessLauncher.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file has been modified by Microsoft on 8/2017.
1+
// This file has been modified by Microsoft on 9/2017.
22

33
using System;
44
using System.Collections.Generic;
@@ -83,8 +83,7 @@ private int LaunchProcessWithDebuggerAttached(string workingDirectory, string co
8383
_logger.LogInfo(String.Format(Resources.AttachDebuggerMessage, command));
8484
if (printTestOutput)
8585
{
86-
_logger.DebugInfo(
87-
"Note that due to restrictions of the VS Unit Testing framework, the test executable's output can not be displayed in the test console when debugging tests!");
86+
_logger.DebugInfo(Resources.DebuggerAttachedOutputMessage);
8887
}
8988
_processId = handle.LaunchProcessWithDebuggerAttached(command, workingDirectory, param, _settings.GetPathExtension(command));
9089
Process process = Process.GetProcessById(_processId.Value);

GoogleTestAdapter/Core/Resources.Designer.cs

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

GoogleTestAdapter/Core/Resources.resx

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,21 @@
145145
<value>{0}{1}: Exited with code {2}, executed command: '{3}'</value>
146146
<comment>{0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} is TestSetupBatchFile or TestTeardownBatchFile string, {2} represents a number (e.g. 5), {3} represents unlocalized file path (e.g c:\test\foo.bat)</comment>
147147
</data>
148+
<data name="CategoryMiscName" xml:space="preserve">
149+
<value>Misc</value>
150+
</data>
151+
<data name="CategoryParallelizationName" xml:space="preserve">
152+
<value>Parallelization</value>
153+
</data>
154+
<data name="CategoryRuntimeBehaviorName" xml:space="preserve">
155+
<value>Runtime behavior</value>
156+
</data>
157+
<data name="CategoryTestExecutionName" xml:space="preserve">
158+
<value>Test execution</value>
159+
</data>
160+
<data name="CategoryTraitsName" xml:space="preserve">
161+
<value>Regexes for trait assignment</value>
162+
</data>
148163
<data name="CollectedResults" xml:space="preserve">
149164
<value>{0}Collected {1} test result(s) from result XML file {2}</value>
150165
<comment>{0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5), {2} represents unlocalized file path (e.g c:\test\results.xml)</comment>
@@ -173,14 +188,38 @@
173188
<value>reason is probably a crash of test {0}</value>
174189
<comment>{0} represents an unlocalized name of test (e.g. foo)</comment>
175190
</data>
191+
<data name="CrashText" xml:space="preserve">
192+
<value>!! This test has probably CRASHED !!</value>
193+
<comment>The exclamation points and all-caps are for emphasis.</comment>
194+
</data>
176195
<data name="CreatedTestResults" xml:space="preserve">
177196
<value>{0}Created {1} test results for tests which were neither found in result XML file nor in console output</value>
178197
<comment>{0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5)</comment>
179198
</data>
199+
<data name="DebuggerAttachedOutputMessage" xml:space="preserve">
200+
<value>Note that due to restrictions of the VS Unit Testing framework, the test executable's output can not be displayed in the test console when debugging tests!</value>
201+
</data>
180202
<data name="DeleteTestDir" xml:space="preserve">
181203
<value>{0}Could not delete test directory '{1}': {2}</value>
182204
<comment>{0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents unlocalized directory path (e.g c:\test\dir), {2} represents localized exception message (e.g. "Cannot load file")</comment>
183205
</data>
206+
<data name="DescriptionOfExecutableDirPlaceHolder" xml:space="preserve">
207+
<value>{0} - directory containing the test executable</value>
208+
<comment>{0} represents a directory containing a test executable</comment>
209+
</data>
210+
<data name="DescriptionOfPlaceholdersForBatches" xml:space="preserve">
211+
<value>{0} - path of a directory which can be used by the tests
212+
{1} - id of the thread executing the current tests</value>
213+
<comment>{0} represents a directory. {1} represents a thread id.</comment>
214+
</data>
215+
<data name="DescriptionOfPlaceholdersForExecutables" xml:space="preserve">
216+
<value>{0} - executable containing the tests</value>
217+
<comment>{0} represents the path of a test executable</comment>
218+
</data>
219+
<data name="DescriptionOfSolutionDirPlaceHolder" xml:space="preserve">
220+
<value>{0} - directory of the solution (only available inside Visual Studio)</value>
221+
<comment>{0} represents a directory containing a solution file</comment>
222+
</data>
184223
<data name="DoesntMatchCustom" xml:space="preserve">
185224
<value>{0} does not match custom regex {1}</value>
186225
<comment>{0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents unlocalized string for regular expression (e.g ".*a.exe")</comment>
@@ -290,6 +329,182 @@
290329
<value>Running {0} tests...</value>
291330
<comment>{0} represents a number (e.g. 5)</comment>
292331
</data>
332+
<data name="OptionAdditionalTestExecutionParams" xml:space="preserve">
333+
<value>Additional test execution parameters</value>
334+
</data>
335+
<data name="OptionAdditionalTestExecutionParamsDescription" xml:space="preserve">
336+
<value>Additional parameters for Google Test executable. Placeholders:</value>
337+
<comment>Followed by a list of placeholders.</comment>
338+
</data>
339+
<data name="OptionBatchForTestSetup" xml:space="preserve">
340+
<value>Test setup batch file</value>
341+
</data>
342+
<data name="OptionBatchForTestSetupDescription" xml:space="preserve">
343+
<value>Batch file to be executed before test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders:</value>
344+
<comment>Followed by a list of placeholders.</comment>
345+
</data>
346+
<data name="OptionBatchForTestTeardown" xml:space="preserve">
347+
<value>Test teardown batch file</value>
348+
</data>
349+
<data name="OptionBatchForTestTeardownDescription" xml:space="preserve">
350+
<value>Batch file to be executed after test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders:</value>
351+
<comment>Followed by a list of placeholders.</comment>
352+
</data>
353+
<data name="OptionBreakOnFailure" xml:space="preserve">
354+
<value>Break on failure</value>
355+
</data>
356+
<data name="OptionBreakOnFailureDescription" xml:space="preserve">
357+
<value>If enabled, a potentially attached debugger will catch assertion failures and automatically drop into interactive mode.
358+
Google Test option: {0}</value>
359+
<comment>{0} represents a command-line flag.</comment>
360+
</data>
361+
<data name="OptionCatchExceptions" xml:space="preserve">
362+
<value>Catch exceptions</value>
363+
</data>
364+
<data name="OptionCatchExceptionsDescription" xml:space="preserve">
365+
<value>Google Test catches exceptions by default; the according test fails and test execution continues. Choosing false lets exceptions pass through, allowing the debugger to catch them.
366+
Google Test option: {0}</value>
367+
<comment>{0} represents a command-line flag.</comment>
368+
</data>
369+
<data name="OptionDebugMode" xml:space="preserve">
370+
<value>Print debug info</value>
371+
</data>
372+
<data name="OptionDebugModeDescription" xml:space="preserve">
373+
<value>If true, debug output will be printed to the test console.</value>
374+
</data>
375+
<data name="OptionEnableParallelTestExecution" xml:space="preserve">
376+
<value>Parallel test execution</value>
377+
</data>
378+
<data name="OptionEnableParallelTestExecutionDescription" xml:space="preserve">
379+
<value>Parallel test execution is achieved by means of different threads, each of which is assigned a number of tests to be executed. The threads will then sequentially invoke the necessary executables to produce the according test results.</value>
380+
</data>
381+
<data name="OptionKillProcessesOnCancel" xml:space="preserve">
382+
<value>Terminate processes on cancel</value>
383+
</data>
384+
<data name="OptionKillProcessesOnCancelDescription" xml:space="preserve">
385+
<value>If true, running test executables are actively terminated if the test execution is canceled. Note that terminating a test process might have all kinds of side effects; in particular, Google Test will not be able to perform any shutdown tasks.</value>
386+
</data>
387+
<data name="OptionMaxNrOfThreads" xml:space="preserve">
388+
<value>Maximum number of threads</value>
389+
</data>
390+
<data name="OptionMaxNrOfThreadsDescription" xml:space="preserve">
391+
<value>Maximum number of threads to be used for test execution (0: one thread for each processor).</value>
392+
</data>
393+
<data name="OptionNrOfTestRepetitions" xml:space="preserve">
394+
<value>Number of test repetitions</value>
395+
</data>
396+
<data name="OptionNrOfTestRepetitionsDescription" xml:space="preserve">
397+
<value>Tests will be run for the selected number of times (-1: infinite).
398+
Google Test option: {0}</value>
399+
<comment>{0} represents a command-line flag.</comment>
400+
</data>
401+
<data name="OptionParseSymbolInformation" xml:space="preserve">
402+
<value>Parse symbol information</value>
403+
</data>
404+
<data name="OptionParseSymbolInformationDescription" xml:space="preserve">
405+
<value>Parse debug symbol information for test executables to obtain source location information and traits (defined via the macros in GTA_Traits.h).
406+
If this is set to false, step 2 of traits discovery will be left out and only traits regexes will be effective.</value>
407+
</data>
408+
<data name="OptionPathExtension" xml:space="preserve">
409+
<value>PATH extension</value>
410+
<comment>PATH represents an environment variable and should not be localized</comment>
411+
</data>
412+
<data name="OptionPathExtensionDescription" xml:space="preserve">
413+
<value>If non-empty, the content will be appended to the PATH variable of the test execution and discovery processes.
414+
Example: C:\MyBins;{0}\MyOtherBins;
415+
Placeholders:</value>
416+
<comment>{0} represents a directory. Followed by a list of placeholders.</comment>
417+
</data>
418+
<data name="OptionPrintTestOutput" xml:space="preserve">
419+
<value>Print test output</value>
420+
</data>
421+
<data name="OptionPrintTestOutputDescription" xml:space="preserve">
422+
<value>Print the output of the Google Test executable(s) to the Tests Output window.</value>
423+
</data>
424+
<data name="OptionRunDisabledTests" xml:space="preserve">
425+
<value>Also run disabled tests</value>
426+
</data>
427+
<data name="OptionRunDisabledTestsDescription" xml:space="preserve">
428+
<value>If true, all (selected) tests will be run, even if they have been disabled.
429+
Google Test option: {0}</value>
430+
<comment>{0} represents a command-line flag.</comment>
431+
</data>
432+
<data name="OptionShowReleaseNotes" xml:space="preserve">
433+
<value>Show release notes after update</value>
434+
</data>
435+
<data name="OptionShowReleaseNotesDescription" xml:space="preserve">
436+
<value>If true, a dialog with release notes is shown after the extension has been updated.</value>
437+
</data>
438+
<data name="OptionShuffleTests" xml:space="preserve">
439+
<value>Shuffle tests per execution</value>
440+
</data>
441+
<data name="OptionShuffleTestsDescription" xml:space="preserve">
442+
<value>If true, tests will be executed in random order. Note that a true randomized order is only given when executing all tests in non-parallel fashion. Otherwise, the test excutables will most likely be executed more than once - random order is than restricted to the according executions.
443+
Google Test option: {0}</value>
444+
<comment>{0} represents a command-line flag.</comment>
445+
</data>
446+
<data name="OptionShuffleTestsSeed" xml:space="preserve">
447+
<value>Shuffle tests: Seed</value>
448+
</data>
449+
<data name="OptionShuffleTestsSeedDescription" xml:space="preserve">
450+
<value>0: Seed is computed from system time, 1&lt;=n&lt;={0}: The given seed is used. See note of option '{1}'.
451+
Google Test option: {2}</value>
452+
<comment>{0} is an integer representing the maximum value of a seed. {1} represents the localized name of another option. {2} represents a command-line flag.</comment>
453+
</data>
454+
<data name="OptionTestDiscoveryRegex" xml:space="preserve">
455+
<value>Regex for test discovery</value>
456+
</data>
457+
<data name="OptionTestDiscoveryRegexDescription" xml:space="preserve">
458+
<value>If non-empty, this regex will be used to discover the Google Test executables containing your tests.
459+
Default regex: {0}</value>
460+
<comment>{0} represents a regular expression</comment>
461+
</data>
462+
<data name="OptionTestDiscoveryTimeoutInSeconds" xml:space="preserve">
463+
<value>Test discovery timeout in s</value>
464+
<comment>"s" stands for seconds</comment>
465+
</data>
466+
<data name="OptionTestDiscoveryTimeoutInSecondsDescription" xml:space="preserve">
467+
<value>Number of seconds after which test discovery will be assumed to have failed. 0: Infinite timeout</value>
468+
</data>
469+
<data name="OptionTestNameSeparator" xml:space="preserve">
470+
<value>Test name separator</value>
471+
</data>
472+
<data name="OptionTestNameSeparatorDescription" xml:space="preserve">
473+
<value>Test names produced by Google Test might contain the character '/', which makes Visual Studio cut the name after the '/' if the Test Explorer window is not wide enough. This option's value, if non-empty, will replace the '/' character to avoid that behavior. Note that '\', ' ', '|', and '-' produce the same behavior ('.', '_', ':', and '::' are known to work). Note also that traits regexes are evaluated against the tests' display names (and must thus be consistent with this option).</value>
474+
</data>
475+
<data name="OptionTimestampOutput" xml:space="preserve">
476+
<value>Timestamp output</value>
477+
</data>
478+
<data name="OptionTimestampOutputDescription" xml:space="preserve">
479+
<value>If true, a timestamp is added to test and debug output.</value>
480+
</data>
481+
<data name="OptionTraitsDescription" xml:space="preserve">
482+
<value>Allows to override/add traits for testcases matching a regex. Traits are build up in 3 phases. First, traits are assigned to tests according to the 'Traits before' option. Next, the tests' traits (defined via the macros in GTA_Traits.h) are added to the tests, overriding traits from phase 1 with new values. Finally, the 'Traits after' option is evaluated, again in an overriding manner.
483+
Syntax: {0} separates the regex from the traits, the trait's name and value are separated by {1} and each pair of regex and trait is separated by {2}.
484+
Example: MySuite\.*{0}Type{1}Small{2}MySuite2\.*|MySuite3\.*{0}Type{1}Medium</value>
485+
<comment>{0} represents a string used to separate a regex from its traits. {1} represents a string used to separate names and values. {2} represents a string used to separate regexs.</comment>
486+
</data>
487+
<data name="OptionTraitsRegexesAfter" xml:space="preserve">
488+
<value>After test discovery</value>
489+
</data>
490+
<data name="OptionTraitsRegexesBefore" xml:space="preserve">
491+
<value>Before test discovery</value>
492+
</data>
493+
<data name="OptionUseNewTestExecutionFramework" xml:space="preserve">
494+
<value>Use new test execution framework (experimental)</value>
495+
</data>
496+
<data name="OptionUseNewTestExecutionFrameworkDescription" xml:space="preserve">
497+
<value>Make use of the new test execution framework. Advantages: test crash detection and test output printing also work in debug mode.</value>
498+
</data>
499+
<data name="OptionWorkingDir" xml:space="preserve">
500+
<value>Working directory</value>
501+
</data>
502+
<data name="OptionWorkingDirDescription" xml:space="preserve">
503+
<value>If non-empty, will set the working directory for running the tests (default: {0})
504+
Example: {1}\MyTestDir
505+
Placeholders:</value>
506+
<comment>{0} represents the default value of the working directory. {1} represents the directory containing the solution file. Followed by a list of placeholders.</comment>
507+
</data>
293508
<data name="OutputFileMissing" xml:space="preserve">
294509
<value>Output file does not exist, did your tests crash?</value>
295510
</data>
@@ -395,6 +610,10 @@
395610
<value>Test discovery was cancelled after {0} s for executable {1}</value>
396611
<comment>{0} represents a number (e.g. 5), {1} represents an unlocalized name of executable (e.g. cmd.exe) file</comment>
397612
</data>
613+
<data name="TestOutput" xml:space="preserve">
614+
<value>Test output:</value>
615+
<comment>Followed by the output of a test case</comment>
616+
</data>
398617
<data name="TestResultParse" xml:space="preserve">
399618
<value>Test result file {0} could not be parsed (completely) - your test executable has probably crashed. Exception message: {1}</value>
400619
<comment>{0} represents unlocalized file path (e.g c:\test\results.xml), {1} represents localized exception message (e.g. "Cannot load file")</comment>

0 commit comments

Comments
 (0)