From 420d37e99ee304da5170c28c99ac1df8c4708a27 Mon Sep 17 00:00:00 2001 From: Carsten Schmiemann Date: Sun, 20 Nov 2022 00:55:10 +0100 Subject: [PATCH] Add translation for graph header --- src/display.cpp | 3 ++- src/lang.cpp | 2 ++ src/lang.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/display.cpp b/src/display.cpp index 3773366..33ff4d4 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -39,6 +39,7 @@ U8G2_ST7920_128X64_F_HW_SPI display(U8G2_R2, LCD_CS, U8X8_PIN_NONE); char* title_pv; char* title_battery; char* title_grid; +char* title_graph; bool pv_charging = false; bool show_temp_outside; @@ -249,7 +250,7 @@ void display_screen_graph(float values[100], char* key, int buffersize) logPrintD("Display graph..."); display.firstPage(); do { - display_header((char*)"Graph"); + display_header(title_graph); display.drawLine(7, 60, 9, 60); //X mark display.drawLine(9, 8, 9, 62); //Y boarder display.drawStr(1,17, "1"); diff --git a/src/lang.cpp b/src/lang.cpp index 41463c2..5b87215 100644 --- a/src/lang.cpp +++ b/src/lang.cpp @@ -32,11 +32,13 @@ void set_display_language(char lang[2]) title_pv = (char*)"PV Module"; title_battery = (char*)"Batterie"; title_grid = (char*)"Netz"; + title_graph = (char*)"Verlauf"; } else { title_pv = (char*)"PV modules"; title_battery = (char*)"Battery"; title_grid = (char*)"Grid"; + title_graph = (char*)"Graph"; } } \ No newline at end of file diff --git a/src/lang.h b/src/lang.h index 7dcccc9..6bd89ff 100644 --- a/src/lang.h +++ b/src/lang.h @@ -25,5 +25,6 @@ extern char* title_pv; extern char* title_battery; extern char* title_grid; +extern char* title_graph; void set_display_language(char lang[2]); \ No newline at end of file