Skip to content

Commit 3be1462

Browse files
committed
Merge branch 'next' of https://github.com/rubberduck-vba/Rubberduck into reinstateParseTreeInspections
2 parents 4947e80 + 8c4b06a commit 3be1462

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

RetailCoder.VBE/Inspections/CodeInspectionQuickFix.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Antlr4.Runtime;
1+
using System.Windows.Threading;
2+
using Antlr4.Runtime;
23
using Rubberduck.VBEditor;
34

45
namespace Rubberduck.Inspections
@@ -11,6 +12,9 @@ public abstract class CodeInspectionQuickFix
1112

1213
public CodeInspectionQuickFix(ParserRuleContext context, QualifiedSelection selection, string description)
1314
{
15+
Dispatcher.CurrentDispatcher.Thread.CurrentCulture = UI.Settings.Settings.Culture;
16+
Dispatcher.CurrentDispatcher.Thread.CurrentUICulture = UI.Settings.Settings.Culture;
17+
1418
_context = context;
1519
_selection = selection;
1620
_description = description;

RetailCoder.VBE/UI/Settings/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static void LoadLanguage()
4242
{
4343
if (_configService == null)
4444
{
45-
_cultureInfo = RubberduckUI.Culture;
45+
_cultureInfo = RubberduckUI.Culture ?? Dispatcher.CurrentDispatcher.Thread.CurrentUICulture;
4646
return;
4747
}
4848

RetailCoder.VBE/UnitTesting/NewUnitTestModuleCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public NewUnitTestModuleCommand(RubberduckParserState state, ConfigurationLoader
2828
private readonly string _moduleInit = string.Concat(
2929
"'@ModuleInitialize\n"
3030
, "Public Sub ModuleInitialize()\n"
31-
, " '", RubberduckUI.UnitTest_NewModule_RunOnce, ".\n{0}\n"
31+
, " '", RubberduckUI.UnitTest_NewModule_RunOnce, ".\n {0}\n"
3232
, "End Sub\n\n"
3333
, "'@ModuleCleanup\n"
3434
, "Public Sub ModuleCleanup()\n"

0 commit comments

Comments
 (0)