Skip to content

Commit

Permalink
Перевод приложения на английский язык + English README
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMALWARE committed Dec 28, 2023
1 parent e7e78cd commit 52facb3
Show file tree
Hide file tree
Showing 13 changed files with 1,120 additions and 62 deletions.
28 changes: 14 additions & 14 deletions App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected override void OnStartup(StartupEventArgs e) {
if (string.IsNullOrEmpty(AutoTotal.Properties.Settings.Default.VTKey)) {
// Первый запуск
if (!isOnlyInstance) {
System.Windows.MessageBox.Show("Сначала завершите первую настройку!", "AutoTotal", MessageBoxButton.OK, MessageBoxImage.Error);
System.Windows.MessageBox.Show(AutoTotal.Properties.Resources.FinishFirstSetup, "AutoTotal", MessageBoxButton.OK, MessageBoxImage.Error);
Environment.Exit(0);
}
new SetKeyWindow().ShowDialog();
Expand All @@ -32,11 +32,11 @@ protected override void OnStartup(StartupEventArgs e) {
if (!Autorun.Exists()) Autorun.Add();
Data.notificationManager.Show(new NotificationContent {
Title = "AutoTotal",
Message = "Программа будет запускаться автоматически при старте Windows! Это можно изменить в настройках",
Message = AutoTotal.Properties.Resources.ProgramWillAutostart,
Type = NotificationType.Information,
TrimType = NotificationTextTrimType.NoTrim,
LeftButtonAction = () => ShowSettings(),
LeftButtonContent = "Настройки"
LeftButtonContent = AutoTotal.Properties.Resources.Settings
}, expirationTime: TimeSpan.FromSeconds(10));
}

Expand All @@ -54,13 +54,13 @@ protected override void OnStartup(StartupEventArgs e) {
NotifyIcon notifyIcon = new() {
Visible = true,
Icon = new Icon(AppDomain.CurrentDomain.BaseDirectory+"\\res\\at.ico"),
Text = "AutoTotal работает в фоне",
Text = AutoTotal.Properties.Resources.WorkingInBackground,
ContextMenuStrip = new ContextMenuStrip {
Items = {
new ToolStripMenuItem("Настройки", null, (s, e) => ShowSettings()),
new ToolStripMenuItem("Добавить папку", null, (s, e) => {
new ToolStripMenuItem(AutoTotal.Properties.Resources.Settings, null, (s, e) => ShowSettings()),
new ToolStripMenuItem(AutoTotal.Properties.Resources.AddFolder, null, (s, e) => {
if (Data.settings?.IsVisible ?? false) {
System.Windows.MessageBox.Show("Добавьте папку в окне настроек!", "Добавление папки", MessageBoxButton.OK, MessageBoxImage.Warning);
System.Windows.MessageBox.Show(AutoTotal.Properties.Resources.AddFolderForce, AutoTotal.Properties.Resources.AddingFolder, MessageBoxButton.OK, MessageBoxImage.Warning);
return;
}
using var folderBrowserDialog = new FolderBrowserDialog();
Expand All @@ -74,24 +74,24 @@ protected override void OnStartup(StartupEventArgs e) {
}
}
}),
new ToolStripMenuItem("Просканировать файл...", null, (s, e) => {
new ToolStripMenuItem(AutoTotal.Properties.Resources.ScanFile, null, (s, e) => {
using var openFileDialog = new System.Windows.Forms.OpenFileDialog();
DialogResult result = openFileDialog.ShowDialog();
if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(openFileDialog.FileName)) Task.Run(async () => await Utils.ScanFile(openFileDialog.FileName));
}),
new ToolStripMenuItem("Изменить ключ API VirusTotal", null, (s, e) => new SetKeyWindow().Show()),
new ToolStripMenuItem("Выход", null, (s, e) => Environment.Exit(1))
new ToolStripMenuItem(AutoTotal.Properties.Resources.ChangeVTKey, null, (s, e) => new SetKeyWindow().Show()),
new ToolStripMenuItem(AutoTotal.Properties.Resources.Exit, null, (s, e) => Environment.Exit(1))
}
}
};
if (!e.Args.Contains("/autorun")) {
Data.notificationManager.Show(new NotificationContent {
Title = "AutoTotal",
Message = "Программа была запущена в фоне, используйте значок в трее для взаимодействия",
Message = AutoTotal.Properties.Resources.Started,
Type = NotificationType.Notification,
TrimType = NotificationTextTrimType.NoTrim,
LeftButtonAction = () => ShowSettings(),
LeftButtonContent = "Настройки",
LeftButtonContent = AutoTotal.Properties.Resources.Settings,
Icon = new BitmapImage(new Uri("pack://application:,,,/res/virustotal.png")),
}, expirationTime: TimeSpan.FromSeconds(5));
}
Expand All @@ -100,12 +100,12 @@ protected override void OnStartup(StartupEventArgs e) {
if (!Directory.Exists(path)) {
ToRemove.Add(path);
Data.notificationManager.Show(new NotificationContent {
Title = "Несуществующая папка была удалена из списка",
Title = AutoTotal.Properties.Resources.DisappearedFolder,
Message = path,
Type = NotificationType.Information,
TrimType = NotificationTextTrimType.NoTrim,
LeftButtonAction = () => ShowSettings(),
LeftButtonContent = "Настройки"
LeftButtonContent = AutoTotal.Properties.Resources.Settings
}, expirationTime: TimeSpan.FromSeconds(10));
}
else FolderSpy.Add(path);
Expand Down
15 changes: 15 additions & 0 deletions AutoTotal.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
Expand Down Expand Up @@ -68,4 +73,14 @@
<Resource Include="res\virustotal.png" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.ru-RU.resx">
<Generator></Generator>
</EmbeddedResource>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Autorun+Blocker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ public static void Unblock(string path) {
File.Delete(path + ":Zone.Identifier:$DATA");
}
}
}
}
Loading

0 comments on commit 52facb3

Please sign in to comment.