Skip to content

Commit ac03338

Browse files
committed
Merge pull request Flow-Launcher#3971 from dcog989/calculator-min-fix
1 parent f98cd8b commit ac03338

File tree

10 files changed

+329
-217
lines changed

10 files changed

+329
-217
lines changed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
using System.ComponentModel;
2-
using Flow.Launcher.Core.Resource;
1+
using Flow.Launcher.Localization.Attributes;
32

43
namespace Flow.Launcher.Plugin.Calculator
54
{
6-
[TypeConverter(typeof(LocalizationConverter))]
5+
[EnumLocalize]
76
public enum DecimalSeparator
87
{
9-
[LocalizedDescription("flowlauncher_plugin_calculator_decimal_separator_use_system_locale")]
8+
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_calculator_decimal_separator_use_system_locale))]
109
UseSystemLocale,
11-
12-
[LocalizedDescription("flowlauncher_plugin_calculator_decimal_separator_dot")]
13-
Dot,
14-
15-
[LocalizedDescription("flowlauncher_plugin_calculator_decimal_separator_comma")]
10+
11+
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_calculator_decimal_separator_dot))]
12+
Dot,
13+
14+
[EnumLocalizeKey(nameof(Localize.flowlauncher_plugin_calculator_decimal_separator_comma))]
1615
Comma
1716
}
1817
}

Plugins/Flow.Launcher.Plugin.Calculator/Flow.Launcher.Plugin.Calculator.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<ErrorReport>prompt</ErrorReport>
3434
<WarningLevel>4</WarningLevel>
3535
<Prefer32Bit>false</Prefer32Bit>
36+
<NoWarn>$(NoWarn);FLSG0007</NoWarn>
3637
</PropertyGroup>
3738

3839
<ItemGroup>
@@ -42,7 +43,6 @@
4243
</ItemGroup>
4344

4445
<ItemGroup>
45-
<ProjectReference Include="..\..\Flow.Launcher.Core\Flow.Launcher.Core.csproj" />
4646
<ProjectReference Include="..\..\Flow.Launcher.Plugin\Flow.Launcher.Plugin.csproj" />
4747
</ItemGroup>
4848

@@ -63,6 +63,7 @@
6363
</ItemGroup>
6464

6565
<ItemGroup>
66+
<PackageReference Include="Flow.Launcher.Localization" Version="0.0.5" />
6667
<PackageReference Include="Mages" Version="3.0.0" />
6768
</ItemGroup>
6869

Plugins/Flow.Launcher.Plugin.Calculator/Languages/en.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:system="clr-namespace:System;assembly=mscorlib">
55

6-
<system:String x:Key="flowlauncher_plugin_caculator_plugin_name">Calculator</system:String>
7-
<system:String x:Key="flowlauncher_plugin_caculator_plugin_description">Perform mathematical calculations (including hexadecimal values). Use ',' or '.' as thousand separator or decimal place.</system:String>
6+
<system:String x:Key="flowlauncher_plugin_calculator_plugin_name">Calculator</system:String>
7+
<system:String x:Key="flowlauncher_plugin_calculator_plugin_description">Perform mathematical calculations, including hex values and advanced functions such as 'min(1,2,3)', 'sqrt(123)' and 'cos(123)'.</system:String>
88
<system:String x:Key="flowlauncher_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
99
<system:String x:Key="flowlauncher_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
1010
<system:String x:Key="flowlauncher_plugin_calculator_copy_number_to_clipboard">Copy this number to the clipboard</system:String>
@@ -15,4 +15,5 @@
1515
<system:String x:Key="flowlauncher_plugin_calculator_decimal_separator_dot">Dot (.)</system:String>
1616
<system:String x:Key="flowlauncher_plugin_calculator_max_decimal_places">Max. decimal places</system:String>
1717
<system:String x:Key="flowlauncher_plugin_calculator_failed_to_copy">Copy failed, please try later</system:String>
18+
<system:String x:Key="flowlauncher_plugin_calculator_show_error_message">Show error message when calculation fails</system:String>
1819
</ResourceDictionary>

0 commit comments

Comments
 (0)