diff --git a/config/main_menu.conf b/config/main_menu.conf index 529e1bd8..98f02ed7 100644 --- a/config/main_menu.conf +++ b/config/main_menu.conf @@ -38,6 +38,7 @@ panel: zcalibrate name: {{ gettext('Nozzle Offset') }} icon: nozzle_offset panel: nozzle_offset +enable: {{ printer.extruders.count > 1 }} [menu __main more limits] name: {{ gettext('Limits') }} diff --git a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo index 6f1e6970..a546ab58 100644 Binary files a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo and b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.mo differ diff --git a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po index 1bf1cf4e..970db6fd 100644 --- a/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po +++ b/ks_includes/locales/zh_CN/LC_MESSAGES/KlipperScreen.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: KlipperScreen\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-31 14:57+0800\n" +"POT-Creation-Date: 2025-01-07 17:11+0800\n" "PO-Revision-Date: 2024-06-03 19:09+0000\n" "Last-Translator: wsj20050623 <2129426599@qq.com>\n" "Language-Team: Chinese (Simplified) \n" "Language-Team: Chinese (Traditional) 0: for s, x in enumerate(filament_sensors): diff --git a/screen.py b/screen.py index 728d9c68..9a558431 100755 --- a/screen.py +++ b/screen.py @@ -876,7 +876,7 @@ class KlipperScreen(Gtk.Window): elif action == "notify_update_response": if 'message' in data and 'Error' in data['message']: logging.error(f"{action}:{data['message']}") - self.show_popup_message(_(data['message'].lstrip()), 3, from_ws=True) + self.show_popup_message(_(cleaned_data) if (cleaned_data := data['message'].strip()) else "", 3, from_ws=True) if "KlipperScreen" in data['message']: self.restart_ks() elif action == "notify_power_changed": @@ -895,9 +895,9 @@ class KlipperScreen(Gtk.Window): return self.prompt.decode(action) elif data.startswith("echo: "): - self.show_popup_message(_(data[6:].lstrip()), 1, from_ws=True) + self.show_popup_message(_(cleaned_data) if (cleaned_data := data[6:].strip()) else "", 1, from_ws=True) elif data.startswith("!! "): - self.show_popup_message(_(data[3:].lstrip()), 3, from_ws=True) + self.show_popup_message(_(cleaned_data) if (cleaned_data := data[3:].strip()) else "", 3, from_ws=True) elif "unknown" in data.lower() and \ not ("TESTZ" in data or "MEASURE_AXES_NOISE" in data or "ACCELEROMETER_QUERY" in data): self.show_popup_message(data, from_ws=True)