Skip to content

Commit 8c4b06a

Browse files
authored
Merge pull request #2037 from Hosch250/Issue2035
Make inspection quick fix menu use correct localization
2 parents 1e8d0c0 + 95c501f commit 8c4b06a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
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

0 commit comments

Comments
 (0)