Some i18nifiying
This commit is contained in:
parent
39576e3180
commit
f63b26ac76
31 changed files with 538 additions and 455 deletions
|
|
@ -242,9 +242,9 @@ namespace Rests
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TShock.Log.Error("Fatal Startup Exception");
|
||||
TShock.Log.Error(GetString("Fatal Startup Exception"));
|
||||
TShock.Log.Error(ex.ToString());
|
||||
TShock.Log.ConsoleError("Invalid REST configuration: \nYou may already have a REST service bound to port {0}. \nPlease adjust your configuration and restart the server. \nPress any key to exit.", Port);
|
||||
TShock.Log.ConsoleError(GetString("Invalid REST configuration: \nYou may already have a REST service bound to port {0}. \nPlease adjust your configuration and restart the server. \nPress any key to exit.", Port));
|
||||
Console.ReadLine();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
|
@ -423,14 +423,14 @@ namespace Rests
|
|||
{
|
||||
return new RestObject("500")
|
||||
{
|
||||
{"error", "Internal server error."},
|
||||
{"error", GetString("Internal server error.") },
|
||||
{"errormsg", exception.Message},
|
||||
{"stacktrace", exception.StackTrace},
|
||||
};
|
||||
}
|
||||
return new RestObject("404")
|
||||
{
|
||||
{"error", "Specified API endpoint doesn't exist. Refer to the documentation for a list of valid endpoints."}
|
||||
{"error", GetString("Specified API endpoint doesn't exist. Refer to the documentation for a list of valid endpoints.") }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -448,7 +448,8 @@ namespace Rests
|
|||
object result = cmd.Execute(verbs, parms, request, context);
|
||||
if (cmd.DoLog && TShock.Config.Settings.LogRest)
|
||||
{
|
||||
TShock.Log.ConsoleInfo("Anonymous requested REST endpoint: " + BuildRequestUri(cmd, verbs, parms, false));
|
||||
var endpoint = BuildRequestUri(cmd, verbs, parms, false);
|
||||
TShock.Log.ConsoleInfo(GetString($"Anonymous requested REST endpoint: {endpoint}"));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
@ -479,7 +480,7 @@ namespace Rests
|
|||
requestBuilder.Append(param.Value);
|
||||
separator = '&';
|
||||
}
|
||||
|
||||
|
||||
return requestBuilder.ToString();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue