Make the invalid command name message translatable, as it's displayed to the user in non-error situations

Originally committed to SVN as r6683.
This commit is contained in:
Thomas Goyne 2012-04-10 20:40:54 +00:00
parent d842e73643
commit ee84961d36
1 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,8 @@
#include "command.h"
#include "icon.h"
#include "../compat.h"
#include <libaegisub/log.h>
namespace cmd {
@ -29,7 +31,8 @@ namespace cmd {
static iterator find_command(std::string const& name) {
iterator it = cmd_map.find(name);
if (it == cmd_map.end()) throw CommandNotFound("'" + name + "' is not a valid command name");
if (it == cmd_map.end())
throw CommandNotFound(STD_STR(wxString::Format(_("'%s' is not a valid command name"), lagi_wxString(name))));
return it;
}