<commit_before>﻿<UserControl x:Class="ResXManager.View.Visuals.TranslatorConfiguration"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignWidth="800"
             xmlns:wpf="urn:TomsToolbox"
             xmlns:properties="clr-namespace:ResXManager.View.Properties"
             xmlns:styles="urn:TomsToolbox.Wpf.Styles"
             xmlns:infrastructure="urn:ResXManager.Infrastructure">
  <TabControl TabStripPlacement="Left" Loaded="TabControl_Loaded"
              HorizontalContentAlignment="Stretch"
              Style="{DynamicResource {x:Static styles:ResourceKeys.TabControlStyle}}"
              ItemsSource="{Binding Translators, RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}}">
    <TabControl.ItemTemplate>
      <DataTemplate>
        <DockPanel HorizontalAlignment="Stretch">
          <DockPanel.Resources>
            <wpf:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" VisibilityWhenBooleanIsFalse="Hidden" />
            <Storyboard x:Key="RotationStoryboard" RepeatBehavior="Forever">
              <DoubleAnimation By="360" Duration="00:00:02" Storyboard.TargetName="spinner" Storyboard.TargetProperty="(Rectangle.RenderTransform).(RotateTransform.Angle)" />
            </Storyboard>
          </DockPanel.Resources>
          <CheckBox DockPanel.Dock="Left" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center" Style="{DynamicResource {x:Static styles:ResourceKeys.CheckBoxStyle}}" />
          <Rectangle x:Name="spinner"
                     DockPanel.Dock="Right" VerticalAlignment="Center"
                     Visibility="{Binding IsActive, Converter={StaticResource BooleanToVisibilityConverter}}"
                     Width="8" Height="8" 
                     RenderTransformOrigin="0.5,0.5"
                     StrokeThickness="1" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}">
            <Rectangle.RenderTransform>
              <RotateTransform />
            </Rectangle.RenderTransform>
            <Rectangle.Triggers>
              <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginStoryboard Storyboard="{StaticResource RotationStoryboard}" />
              </EventTrigger>
            </Rectangle.Triggers>
          </Rectangle>
          <TextBlock Text="{Binding DisplayName}" Margin="4" VerticalAlignment="Center"/>
        </DockPanel>
      </DataTemplate>
    </TabControl.ItemTemplate>
    <TabControl.ContentTemplate>
      <DataTemplate DataType="infrastructure:ITranslator">
        <StackPanel Margin="5">
          <DockPanel Margin="8,0">
            <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
              <TextBlock VerticalAlignment="Center">
                <Run Text="Ranking:" />
                <Run Text=" "/>
              </TextBlock>
              <TextBox Width="35" Text="{Binding Ranking, StringFormat=F1}" VerticalAlignment="Center" Style="{DynamicResource {x:Static styles:ResourceKeys.TextBoxStyle}}"/>
            </StackPanel>
            <Button Tag="{Binding Uri, Mode=OneWay}" DockPanel.Dock="Right" VerticalAlignment="Center">
              <Button.Template>
                <ControlTemplate>
                  <TextBlock TextTrimming="CharacterEllipsis">
                    <Hyperlink Focusable="False" NavigateUri="{Binding Uri, Mode=OneWay}">
                      <Run Text="{Binding Uri, Mode=OneWay}" />
                    </Hyperlink>
                  </TextBlock>
                </ControlTemplate>
              </Button.Template>
            </Button>
            <ContentControl DockPanel.Dock="Left" Content="{Binding}" Margin="20,0" VerticalAlignment="Center"/>
          </DockPanel>
          <Decorator Height="4" />
          <GroupBox x:Name="AuthenticationGroup" Header="{x:Static properties:Resources.Authentication}"
                    Grid.IsSharedSizeScope="True" Style="{DynamicResource {x:Static styles:ResourceKeys.GroupBoxStyle}}">
            <StackPanel>
              <ItemsControl ItemsSource="{Binding Credentials}" Margin="2" Focusable="False">
                <ItemsControl.ItemTemplate>
                  <DataTemplate DataType="infrastructure:ICredentialItem"><commit_msg>Add translation<commit_after>﻿<UserControl x:Class="ResXManager.View.Visuals.TranslatorConfiguration"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignWidth="800"
             xmlns:wpf="urn:TomsToolbox"
             xmlns:properties="clr-namespace:ResXManager.View.Properties"
             xmlns:styles="urn:TomsToolbox.Wpf.Styles"
             xmlns:infrastructure="urn:ResXManager.Infrastructure">
  <TabControl TabStripPlacement="Left" Loaded="TabControl_Loaded"
              HorizontalContentAlignment="Stretch"
              Style="{DynamicResource {x:Static styles:ResourceKeys.TabControlStyle}}"
              ItemsSource="{Binding Translators, RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl}}">
    <TabControl.ItemTemplate>
      <DataTemplate>
        <DockPanel HorizontalAlignment="Stretch">
          <DockPanel.Resources>
            <wpf:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" VisibilityWhenBooleanIsFalse="Hidden" />
            <Storyboard x:Key="RotationStoryboard" RepeatBehavior="Forever">
              <DoubleAnimation By="360" Duration="00:00:02" Storyboard.TargetName="spinner" Storyboard.TargetProperty="(Rectangle.RenderTransform).(RotateTransform.Angle)" />
            </Storyboard>
          </DockPanel.Resources>
          <CheckBox DockPanel.Dock="Left" IsChecked="{Binding IsEnabled}" VerticalAlignment="Center" Style="{DynamicResource {x:Static styles:ResourceKeys.CheckBoxStyle}}" />
          <Rectangle x:Name="spinner"
                     DockPanel.Dock="Right" VerticalAlignment="Center"
                     Visibility="{Binding IsActive, Converter={StaticResource BooleanToVisibilityConverter}}"
                     Width="8" Height="8" 
                     RenderTransformOrigin="0.5,0.5"
                     StrokeThickness="1" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}">
            <Rectangle.RenderTransform>
              <RotateTransform />
            </Rectangle.RenderTransform>
            <Rectangle.Triggers>
              <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginStoryboard Storyboard="{StaticResource RotationStoryboard}" />
              </EventTrigger>
            </Rectangle.Triggers>
          </Rectangle>
          <TextBlock Text="{Binding DisplayName}" Margin="4" VerticalAlignment="Center"/>
        </DockPanel>
      </DataTemplate>
    </TabControl.ItemTemplate>
    <TabControl.ContentTemplate>
      <DataTemplate DataType="infrastructure:ITranslator">
        <StackPanel Margin="5">
          <DockPanel Margin="8,0">
            <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
              <TextBlock VerticalAlignment="Center">
                <Run Text="{x:Static properties:Resources.Ranking}" />
                <Run Text=" "/>
              </TextBlock>
              <TextBox Width="35" Text="{Binding Ranking, StringFormat=F1}" VerticalAlignment="Center" Style="{DynamicResource {x:Static styles:ResourceKeys.TextBoxStyle}}"/>
            </StackPanel>
            <Button Tag="{Binding Uri, Mode=OneWay}" DockPanel.Dock="Right" VerticalAlignment="Center">
              <Button.Template>
                <ControlTemplate>
                  <TextBlock TextTrimming="CharacterEllipsis">
                    <Hyperlink Focusable="False" NavigateUri="{Binding Uri, Mode=OneWay}">
                      <Run Text="{Binding Uri, Mode=OneWay}" />
                    </Hyperlink>
                  </TextBlock>
                </ControlTemplate>
              </Button.Template>
            </Button>
            <ContentControl DockPanel.Dock="Left" Content="{Binding}" Margin="20,0" VerticalAlignment="Center"/>
          </DockPanel>
          <Decorator Height="4" />
          <GroupBox x:Name="AuthenticationGroup" Header="{x:Static properties:Resources.Authentication}"
                    Grid.IsSharedSizeScope="True" Style="{DynamicResource {x:Static styles:ResourceKeys.GroupBoxStyle}}">
            <StackPanel>
              <ItemsControl ItemsSource="{Binding Credentials}" Margin="2" Focusable="False">
                <ItemsControl.ItemTemplate>
                  <DataTemplate DataType="infrastructure:ICredentialItem">
{'fraction_non_alphanumeric': 0.12204593365139244, 'fraction_numerical': 0.010429379784755353, 'mean_word_length': 2.7371475953565505, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '822135', 'n_tokens_mistral': 2487, 'n_tokens_neox': 2275, 'n_words': 323}