We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a99363a commit a4abbc0Copy full SHA for a4abbc0
src/legacy/api/CommandAPI.cpp
@@ -200,10 +200,10 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
200
if (command) {
201
CommandOutput output(CommandOutputType::AllOutput);
202
command->run(origin, output);
203
+ static std::shared_ptr<Localization> localization =
204
+ getI18n().getLocaleFor(getI18n().getCurrentLanguage()->getFullLanguageCode());
205
for (auto& msg : output.getMessages()) {
- std::string temp;
- getI18n().getCurrentLanguage()->get(msg.getMessageId(), temp, msg.getParams());
206
- outputStr += temp.append("\n");
+ outputStr += getI18n().get(msg.getMessageId(), msg.getParams(), localization).append("\n");
207
}
208
if (outputStr.ends_with('\n')) {
209
outputStr.pop_back();
0 commit comments