Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
add translations to macros and some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
maxijabase committed Feb 14, 2022
1 parent f2fba58 commit 57986b0
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions UI/Windows/ConfigWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ public partial class ConfigWindow

private readonly string[] CompileMacros =
{
"{editordir} - Directory of the SPCode binary",
"{scriptdir} - Directory of the compiling script",
"{copydir} - Directory where the .smx should be copied",
"{scriptfile} - Full directory and name of the script",
"{scriptname} - File name of the script",
"{pluginfile} - Full directory and name of the compiled script",
"{pluginname} - File name of the compiled script"
$"{{editordir}} {Translate("macro_editordir")}",
$"{{scriptdir}} {Translate("macro_scriptdir")}",
$"{{copydir}} {Translate("macro_copydir")}",
$"{{scriptfile}} {Translate("macro_scriptfile")}",
$"{{scriptname}} {Translate("macro_scriptname")}",
$"{{pluginfile}} {Translate("macro_pluginfile")}",
$"{{pluginname}} {Translate("macro_pluginname")}"
};

private readonly string[] CommandMacros =
{
"{plugins_reload} - Reloads all compiled plugins",
"{plugins_load} - Loads all compiled plugins",
"{plugins_unload} - Unloads all compiled plugins"
$"{{plugins_reload}} {Translate("macro_plugins_reload")}",
$"{{plugins_load}} {Translate("macro_plugins_load")}",
$"{{plugins_unload}} {Translate("macro_plugins_unload")}"
};

public ConfigWindow()
Expand Down Expand Up @@ -295,8 +295,8 @@ private void AddSMDirButton_Click(object sender, RoutedEventArgs e)
}
catch (UnauthorizedAccessException)
{
this.ShowMessageAsync("Access error",
"The directory you just specified could not be accessed properly by SPCode. You may have trouble using the includes from this directory.",
this.ShowMessageAsync(Translate("PermissionAccessError"),
Translate("PermissionAcessErrorMessage"),
MessageDialogStyle.Affirmative, Program.MainWindow.MetroDialogOptions);
}

Expand Down Expand Up @@ -655,9 +655,10 @@ private void Language_Translate()
RConPWBlock.Text = Translate("RconPw");
RConComBlock.Text = Translate("RconCom");
Rcon_MenuC.Text = Translate("RConCMDLineCom");
BackupConfigsButton.Content = Translate("BackupConfigs");
LoadConfigsButton.Content = Translate("LoadConfigs");
}


private class SimpleCommand : ICommand
{
public Predicate<object> CanExecutePredicate { get; set; }
Expand Down

0 comments on commit 57986b0

Please sign in to comment.