mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Create DecimalSeperator enum
Localization is handled using the LocalizedDescription attribute and the LocalizationConverter.
This commit is contained in:
parent
2e714a8d7b
commit
73a264b00d
4 changed files with 36 additions and 3 deletions
24
Plugins/Wox.Plugin.Calculator/DecimalSeparator.cs
Normal file
24
Plugins/Wox.Plugin.Calculator/DecimalSeparator.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Wox.Core;
|
||||
|
||||
namespace Wox.Plugin.Caculator
|
||||
{
|
||||
[TypeConverter(typeof(LocalizationConverter))]
|
||||
public enum DecimalSeparator
|
||||
{
|
||||
[LocalizedDescription("wox_plugin_calculator_decimal_seperator_use_system_locale")]
|
||||
UseSystemLocale,
|
||||
|
||||
[LocalizedDescription("wox_plugin_calculator_decimal_seperator_dot")]
|
||||
Dot,
|
||||
|
||||
[LocalizedDescription("wox_plugin_calculator_decimal_seperator_comma")]
|
||||
Comma
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
|
|
@ -7,4 +7,7 @@
|
|||
<system:String x:Key="wox_plugin_calculator_not_a_number">Keine Zahl (NaN)</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_expression_not_complete">Ausdruck falsch oder nicht vollständig (Klammern vergessen?)</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_copy_number_to_clipboard">Diese Zahl in die Zwischenablage kopieren</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_decimal_seperator_use_system_locale">Systemeinstellung nutzen</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_decimal_seperator_comma">Komma (,)</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_decimal_seperator_dot">Punkt (.)</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
|
|
@ -7,4 +7,7 @@
|
|||
<system:String x:Key="wox_plugin_calculator_not_a_number">Not a number (NaN)</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_expression_not_complete">Expression wrong or incomplete (Did you forget some parentheses?)</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_copy_number_to_clipboard">Copy this number to the clipboard</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_decimal_seperator_use_system_locale">Use system locale</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_decimal_seperator_comma">Comma (,)</system:String>
|
||||
<system:String x:Key="wox_plugin_calculator_decimal_seperator_dot">Dot (.)</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
|
|
@ -46,11 +46,14 @@
|
|||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\SolutionAssemblyInfo.cs">
|
||||
<Link>Properties\SolutionAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="DecimalSeparator.cs" />
|
||||
<Compile Include="NumberTranslator.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue