i18n: more zh_CN, fix: crashes when connecting with no COM port, feat: remove View
suffix for view menu (#305)
* fix: crashes when connecting with no COM port * feat: remove `View` suffix for view menu * i18n: add more to Chinese(Simplified) * Revert "Merge branch 'master' of github.com:xtexChooser/ImHex" This reverts commit 8afcfe8f9d36172b431be19c4898627921822b0a, reversing changes made to 7651ad66612a93fc749f68363fa4aca084fd74b7.
This commit is contained in:
parent
c051f5d3e7
commit
eb779c5986
@ -599,14 +599,14 @@ namespace hex::plugin::builtin {
|
||||
{ "hex.builtin.setting.interface.language", "语言" },
|
||||
{ "hex.builtin.setting.interface.fps", "FPS限制" },
|
||||
{ "hex.builtin.setting.interface.highlight_alpha", "高亮不透明度" },
|
||||
//{ "hex.builtin.setting.hex_editor", "Hex Editor" },
|
||||
//{ "hex.builtin.setting.hex_editor.column_count", "Byte column count" },
|
||||
//{ "hex.builtin.setting.hex_editor.hexii", "Display HexII instead of Bytes" },
|
||||
//{ "hex.builtin.setting.hex_editor.ascii", "Display ASCII column" },
|
||||
//{ "hex.builtin.setting.hex_editor.advanced_decoding", "Display advanced decoding column" },
|
||||
//{ "hex.builtin.setting.hex_editor.grey_zeros", "Grey out zeros" },
|
||||
//{ "hex.builtin.setting.hex_editor.uppercase_hex", "Upper case Hex characters" },
|
||||
//{ "hex.builtin.setting.hex_editor.extra_info", "Display extra information" },
|
||||
{ "hex.builtin.setting.hex_editor", "Hex编辑器" },
|
||||
{ "hex.builtin.setting.hex_editor.column_count", "字节列数" },
|
||||
{ "hex.builtin.setting.hex_editor.hexii", "显示HexII替代字节" },
|
||||
{ "hex.builtin.setting.hex_editor.ascii", "显示ASCII栏" },
|
||||
{ "hex.builtin.setting.hex_editor.advanced_decoding", "显示高级解码栏" },
|
||||
{ "hex.builtin.setting.hex_editor.grey_zeros", "显示零字节为灰色" },
|
||||
{ "hex.builtin.setting.hex_editor.uppercase_hex", "大写Hex字符" },
|
||||
{ "hex.builtin.setting.hex_editor.extra_info", "显示额外信息" },
|
||||
|
||||
{ "hex.builtin.provider.file.path", "路径" },
|
||||
{ "hex.builtin.provider.file.size", "大小" },
|
||||
|
@ -17,6 +17,7 @@ namespace hex::plugin::windows {
|
||||
{ "hex.windows.view.tty_console.connect", "Connect" },
|
||||
{ "hex.windows.view.tty_console.disconnect", "Disconnect" },
|
||||
{ "hex.windows.view.tty_console.connect_error", "Failed to connect to COM Port!" },
|
||||
{ "hex.windows.view.tty_console.no_available_port", "No valid COM port is selected or no COM port is available!" },
|
||||
{ "hex.windows.view.tty_console.clear", "Clear" },
|
||||
{ "hex.windows.view.tty_console.auto_scroll", "Auto scroll" },
|
||||
{ "hex.windows.view.tty_console.console", "Console" },
|
||||
|
@ -8,7 +8,7 @@ namespace hex::plugin::windows {
|
||||
{ "hex.windows.view.tty_console.name", "TTY控制台" },
|
||||
{ "hex.windows.view.tty_console.config", "配置"},
|
||||
{ "hex.windows.view.tty_console.port", "端口" },
|
||||
{ "hex.windows.view.tty_console.reload", "重载" },
|
||||
{ "hex.windows.view.tty_console.reload", "刷新" },
|
||||
{ "hex.windows.view.tty_console.baud", "波特率" },
|
||||
{ "hex.windows.view.tty_console.num_bits", "数据位" },
|
||||
{ "hex.windows.view.tty_console.stop_bits", "终止位" },
|
||||
@ -17,6 +17,7 @@ namespace hex::plugin::windows {
|
||||
{ "hex.windows.view.tty_console.connect", "连接" },
|
||||
{ "hex.windows.view.tty_console.disconnect", "断开" },
|
||||
{ "hex.windows.view.tty_console.connect_error", "无法连接到COM端口!" },
|
||||
{ "hex.windows.view.tty_console.no_available_port", "未选择有效的COM端口或无可用COM端口!" },
|
||||
{ "hex.windows.view.tty_console.clear", "清除" },
|
||||
{ "hex.windows.view.tty_console.auto_scroll", "自动滚动" },
|
||||
{ "hex.windows.view.tty_console.console", "控制台" },
|
||||
|
@ -178,6 +178,10 @@ namespace hex::plugin::windows {
|
||||
}
|
||||
|
||||
bool ViewTTYConsole::connect() {
|
||||
if(this->m_comPorts.size() == 0 || this->m_selectedPort >= this->m_comPorts.size()) {
|
||||
View::showErrorPopup("hex.windows.view.tty_console.no_available_port"_lang);
|
||||
return true; // If false, connect_error error popup will override this error popup
|
||||
}
|
||||
this->m_portHandle = ::CreateFile(("\\\\.\\" + this->m_comPorts[this->m_selectedPort].first).c_str(),
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
0,
|
||||
|
@ -337,7 +337,7 @@ namespace hex {
|
||||
if (ImGui::BeginMenu("hex.menu.view"_lang)) {
|
||||
for (auto &view : ContentRegistry::Views::getEntries()) {
|
||||
if (view->hasViewMenuItemEntry())
|
||||
ImGui::MenuItem((LangEntry(view->getUnlocalizedName()) + " " + "hex.menu.view"_lang).c_str(), "", &view->getWindowOpenState());
|
||||
ImGui::MenuItem(LangEntry(view->getUnlocalizedName()), "", &view->getWindowOpenState());
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user