Replace the date format option with a locale option (#1130)

This commit is contained in:
Oleksii Holub
2023-09-07 14:34:08 +03:00
committed by GitHub
parent 53b11d6c49
commit 59344cedbe
22 changed files with 288 additions and 273 deletions

View File

@@ -2,6 +2,7 @@
x:Class="DiscordChatExporter.Gui.Views.Dialogs.SettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:DiscordChatExporter.Gui.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dialogs="clr-namespace:DiscordChatExporter.Gui.ViewModels.Dialogs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -93,27 +94,51 @@
DockPanel.Dock="Left"
Text="Show threads" />
<ComboBox
Width="150"
VerticalAlignment="Center"
DockPanel.Dock="Right"
ItemsSource="{Binding AvailableThreadInclusions}"
SelectedItem="{Binding ThreadInclusionMode}" />
</DockPanel>
<!-- Date format -->
<!-- Locale -->
<DockPanel
Margin="16,8"
Background="Transparent"
LastChildFill="False"
ToolTip="Format used when writing dates (uses .NET date formatting rules)">
ToolTip="Locale to use when formatting dates and numbers">
<TextBlock
VerticalAlignment="Center"
DockPanel.Dock="Left"
Text="Date format" />
<TextBox
Text="Locale" />
<ComboBox
Width="150"
VerticalAlignment="Center"
DockPanel.Dock="Right"
Text="{Binding DateFormat}" />
ItemsSource="{Binding AvailableLocales}"
SelectedItem="{Binding Locale}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={x:Static converters:LocaleToDisplayNameConverter.Instance}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</DockPanel>
<!-- UTC normalization -->
<DockPanel
Margin="16,8"
Background="Transparent"
LastChildFill="False"
ToolTip="Normalize all timestamps to UTC+0">
<TextBlock
VerticalAlignment="Center"
DockPanel.Dock="Left"
Text="Normalize to UTC" />
<ToggleButton
VerticalAlignment="Center"
DockPanel.Dock="Right"
IsChecked="{Binding IsUtcNormalizationEnabled}" />
</DockPanel>
<!-- Parallel limit -->
@@ -139,9 +164,13 @@
<Slider
Width="150"
VerticalAlignment="Center"
IsSnapToTickEnabled="True"
LargeChange="1"
Maximum="10"
Minimum="1"
SmallChange="1"
Style="{DynamicResource MaterialDesignThinSlider}"
TickFrequency="1"
Value="{Binding ParallelLimit}" />
</StackPanel>
</DockPanel>