From 8ec7e650241f8977ae904afbc97b80eeca07ede1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 22 Dec 2023 03:01:38 -0600 Subject: [PATCH] language support --- Marlin/src/lcd/e3v2/proui/dwin.cpp | 11 +++++------ Marlin/src/lcd/language/language_en.h | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 33793cc85ee2f..497ae705c85a9 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -1604,21 +1604,20 @@ void dwinLevelingDone() { #elif ENABLED(PIDTEMP) case PIDTEMP_START: #endif - title.showCaption(F("Hotend Temp Graph")); + title.showCaption(GET_TEXT_F(MSG_HOTEND_TEMP_GRAPH)); DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, F("Nozzle Temperature")); _maxtemp = thermalManager.hotend_max_target(0); _target = thermalManager.degTargetHotend(0); break; #if ENABLED(PIDTEMPBED) case PIDTEMPBED_START: - title.showCaption(F("Bed Temp Graph")); + title.showCaption(GET_TEXT_F(MSG_BED_TEMP_GRAPH)); DWINUI::drawCenteredString(3, hmiData.colorPopupTxt, 75, F("Bed Temperature")); _maxtemp = BED_MAX_TARGET; _target = thermalManager.degTargetBed(); break; #endif - default: - break; + default: break; } dwinDrawString(false, 2, hmiData.colorPopupTxt, hmiData.colorPopupBg, gfrm.x, gfrm.y - DWINUI::fontHeight() - 4, F("Target: Celsius")); @@ -3085,8 +3084,8 @@ void drawPrepareMenu() { #endif MENU_ITEM(ICON_Cool, MSG_COOLDOWN, onDrawCooldown, doCoolDown); #if ALL(PROUI_TUNING_GRAPH, PROUI_ITEM_PLOT) - MENU_ITEM_F(ICON_PIDNozzle, "Hotend Temp Graph", onDrawMenuItem, drawHPlot); - MENU_ITEM_F(ICON_PIDBed, "Bed Temp Graph", onDrawMenuItem, drawBPlot); + MENU_ITEM(ICON_PIDNozzle, MSG_HOTEND_TEMP_GRAPH, onDrawMenuItem, drawHPlot); + MENU_ITEM(ICON_PIDBed, MSG_BED_TEMP_GRAPH, onDrawMenuItem, drawBPlot); #endif MENU_ITEM(ICON_Language, MSG_UI_LANGUAGE, onDrawLanguage, setLanguage); } diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 8c9dd08d07da1..b5a482535767a 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -448,6 +448,8 @@ namespace LanguageNarrow_en { LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); LSTR MSG_BRIGHTNESS = _UxGT("LCD Brightness"); LSTR MSG_SCREEN_TIMEOUT = _UxGT("LCD Timeout (m)"); + LSTR MSG_HOTEND_TEMP_GRAPH = _UxGT("Hotend Temp Graph"); + LSTR MSG_BED_TEMP_GRAPH = _UxGT("Bed Temp Graph"); LSTR MSG_BRIGHTNESS_OFF = _UxGT("Backlight Off"); LSTR MSG_STORE_EEPROM = _UxGT("Store Settings"); LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings");