Skip to content

Commit a4abbc0

Browse files
committed
fix: fix output of runcmdEx not integrity
1 parent a99363a commit a4abbc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/legacy/api/CommandAPI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
200200
if (command) {
201201
CommandOutput output(CommandOutputType::AllOutput);
202202
command->run(origin, output);
203+
static std::shared_ptr<Localization> localization =
204+
getI18n().getLocaleFor(getI18n().getCurrentLanguage()->getFullLanguageCode());
203205
for (auto& msg : output.getMessages()) {
204-
std::string temp;
205-
getI18n().getCurrentLanguage()->get(msg.getMessageId(), temp, msg.getParams());
206-
outputStr += temp.append("\n");
206+
outputStr += getI18n().get(msg.getMessageId(), msg.getParams(), localization).append("\n");
207207
}
208208
if (outputStr.ends_with('\n')) {
209209
outputStr.pop_back();

0 commit comments

Comments
 (0)