mirror of
https://github.com/microsoft/PowerToys
synced 2024-11-22 17:09:28 +00:00
[PT Run - Calculator plugin] Normalize input before processing (#15131)
This commit is contained in:
parent
81e0e14008
commit
09e188621c
@ -5,6 +5,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Text;
|
||||||
using ManagedCommon;
|
using ManagedCommon;
|
||||||
using Wox.Plugin;
|
using Wox.Plugin;
|
||||||
using Wox.Plugin.Logger;
|
using Wox.Plugin.Logger;
|
||||||
@ -33,7 +34,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
|||||||
}
|
}
|
||||||
|
|
||||||
NumberTranslator translator = NumberTranslator.Create(CultureInfo.CurrentCulture, new CultureInfo("en-US"));
|
NumberTranslator translator = NumberTranslator.Create(CultureInfo.CurrentCulture, new CultureInfo("en-US"));
|
||||||
var input = translator.Translate(query.Search);
|
var input = translator.Translate(query.Search.Normalize(NormalizationForm.FormKC));
|
||||||
|
|
||||||
if (!CalculateHelper.InputValid(input))
|
if (!CalculateHelper.InputValid(input))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user