<commit_before>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NeoSmart.Localization;
using System.IO;

namespace NLTUI
{
	public partial class MainForm : Form
	{
		private LocaleManager _localeManager;
		private List<Translator> _translators;
		private string _folder;

		public MainForm()
		{
			InitializeComponent();
			toolStrip1.Location = new Point(0, 0);
			toolStrip2.Location = new Point(toolStrip1.Location.X + 2, 0);
		}

		private void FillLocalesMenu(string selectedKey)
		{
			foreach(var locale in _localeManager.Locales.Values)
			{
				var entry = new ToolStripMenuItem(locale.Key);
				entry.Checked = locale.Key == selectedKey;
				entry.CheckOnClick = true;
				entry.CheckStateChanged += LocaleChanged;

				cbxLocales.DropDownItems.Add(entry);
			}
			cbxLocales.Text = selectedKey;
		}

		void LocaleChanged(object sender, EventArgs e)
		{
			var item = ((ToolStripMenuItem) sender);
			ChangeLocale(_localeManager.Locales[item.Text]);
		}

		private void ResetTranslators()
		{
			tbxTranslations.TabPages.Clear();<commit_msg>Fixed toolbar alignment<commit_after>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NeoSmart.Localization;
using System.IO;

namespace NLTUI
{
	public partial class MainForm : Form
	{
		private LocaleManager _localeManager;
		private List<Translator> _translators;
		private string _folder;

		public MainForm()
		{
			InitializeComponent();
			toolStrip1.Location = new Point(0, 0);
			toolStrip2.Location = new Point(1, 0);
		}

		private void FillLocalesMenu(string selectedKey)
		{
			foreach(var locale in _localeManager.Locales.Values)
			{
				var entry = new ToolStripMenuItem(locale.Key);
				entry.Checked = locale.Key == selectedKey;
				entry.CheckOnClick = true;
				entry.CheckStateChanged += LocaleChanged;

				cbxLocales.DropDownItems.Add(entry);
			}
			cbxLocales.Text = selectedKey;
		}

		void LocaleChanged(object sender, EventArgs e)
		{
			var item = ((ToolStripMenuItem) sender);
			ChangeLocale(_localeManager.Locales[item.Text]);
		}

		private void ResetTranslators()
		{
			tbxTranslations.TabPages.Clear();
{'fraction_non_alphanumeric': 0.09717465753424658, 'fraction_numerical': 0.005565068493150685, 'mean_word_length': 4.397228637413395, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '718167', 'n_tokens_mistral': 833, 'n_tokens_neox': 727, 'n_words': 164}