设备被占用信息添加翻译功能

This commit is contained in:
gb 2023-08-16 18:32:37 +08:00
parent fa612c70fe
commit 68a07dd024
1 changed files with 7 additions and 2 deletions

View File

@ -627,8 +627,13 @@ bool usb_io::make_singleton(void)
singleton_->release();
singleton_ = nullptr;
last_err_ = SCANNER_ERR_OPENED_BY_OTHER_PROCESS;
str.insert(0, "\350\256\276\345\244\207\345\267\262\347\273\217\350\242\253\350\277\233\347\250\213 '");
str += "' \345\215\240\347\224\250";
std::string tips(from_default_language("\350\256\276\345\244\207\345\267\262\347\273\217\350\242\253\350\277\233\347\250\213 '%s' \345\215\240\347\224\250"));
size_t pos = tips.find("%s");
if (pos != std::string::npos)
tips.replace(pos, 2, str);
str += std::move(tips);
init_err_msg_ = str;
VLOG_MINI_1(LOG_LEVEL_FATAL, "Open failed: %s\n", str.c_str());