From 126448d9b5c82e3414ba9daab088bc37894aea89 Mon Sep 17 00:00:00 2001 From: DanielNowak98 Date: Thu, 2 May 2024 14:07:44 +0200 Subject: [PATCH 1/6] changed Language linkings on main.cpp --- src/languages.hpp | 31 ++++++++++++++++++++----------- src/main.cpp | 6 +++--- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/languages.hpp b/src/languages.hpp index 777e9b8a..a9f81fd9 100644 --- a/src/languages.hpp +++ b/src/languages.hpp @@ -43,6 +43,7 @@ enum class Key { Continue, Continue_del, Devices_found, + Device_List, Usr_curnt_wave, Wv_from_file, WvForms_warning, @@ -75,8 +76,10 @@ enum class Key { Enter_mileage, Battery_measure, Attitude, - German, - Ready + x_axis_label, + y_axis_label, + Record_Data, + German }; inline const std::map englishLan{ @@ -117,7 +120,8 @@ inline const std::map englishLan{ {Key::Stop, "Stop"}, {Key::Continue, "Continue"}, {Key::Continue_del, "Continue Deletion?"}, - {Key::Devices_found, "Devices found:"}, + {Key::Devices_found, "Devices found"}, + {Key::Device_List, "Devicelist"}, {Key::Usr_curnt_wave, "User Current Waveform"}, {Key::Wv_from_file, "Waveform From File"}, {Key::WvForms_warning, "Waveforms Warning! "}, @@ -150,10 +154,13 @@ inline const std::map englishLan{ {Key::Enter_mileage, "Enter Mileage"}, {Key::Battery_measure, "Battery measurement"}, {Key::Attitude, "Attitude"}, - {Key::German, "German"}, - {Key::Ready, "Ready"}}; + {Key::x_axis_label, "x [Seconds]"}, + {Key::y_axis_label, "y [Volts]"}, + {Key::Record_Data, "Recording the data"}, + {Key::German, "German"}}; inline const std::map germanLan{ + {Key::Device_List, "Geräteliste"}, {Key::Known_Car, "Fahrzeugauswahl"}, {Key::New_Car, "Neues Fahrzeug"}, {Key::Additional_Information, "Weiterführende Information"}, @@ -191,10 +198,10 @@ inline const std::map germanLan{ {Key::Stop, "Stoppen"}, {Key::Continue, "Weiter"}, {Key::Continue_del, "Mit dem Löschen fortfahren?"}, - {Key::Devices_found, "Geräte gefunden:"}, - {Key::Usr_curnt_wave, "Aktuelle Wellenform des Benutzers"}, - {Key::Wv_from_file, "Wellenform aus Datei"}, - {Key::WvForms_warning, "Warnung!"}, + {Key::Devices_found, "Geräte"}, + {Key::Usr_curnt_wave, "Aktuelle Wellenform Des Benutzers"}, + {Key::Wv_from_file, "Wellenform Aus Datei"}, + {Key::WvForms_warning, "Warnung vor Wellenformen!"}, {Key::No_wave_made, "Es wurden keine Wellenformen erstellt!"}, {Key::Wrong_file_warning, "Warnung vor falscher Datei!"}, {Key::Wrong_file_type, "Falscher Dateityp! Versuchen Sie es erneut!"}, @@ -224,8 +231,10 @@ inline const std::map germanLan{ {Key::Enter_mileage, "Geben Sie den Kilometerstand ein"}, {Key::Battery_measure, "Batteriemessung"}, {Key::Attitude, "Einstellung"}, - {Key::German, "Deutsch"}, - {Key::Ready, "Bereit"}}; + {Key::x_axis_label, "x [Sekunden]"}, + {Key::y_axis_label, "y [Volt]"}, + {Key::Record_Data, "Datenaufnahme"}, + {Key::German, "Deutsch"}}; inline auto appLanguage = englishLan; #endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index a3a97b8c..94d95fab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -176,15 +176,15 @@ int main() { ImGui::BeginChild("Record Data", {0.f, windowSize.y * 0.62f}, ImGuiChildFlags_Border); - addPlots("Recording the data", flagPaused, [&xmax_paused](double x_max) { + addPlots(appLanguage[Key::Record_Data], flagPaused, [&xmax_paused](double x_max) { if (!flagPaused) { - ImPlot::SetupAxes("x [Data points]", "y [ADC Value]", + ImPlot::SetupAxes(appLanguage[Key::x_axis_label], appLanguage[Key::y_axis_label], ImPlotAxisFlags_AutoFit, ImPlotAxisFlags_AutoFit); ImPlot::SetupAxisLimits(ImAxis_X1, x_max - 7500, x_max + 7500, ImGuiCond_Always); } else { xmax_paused = x_max; - ImPlot::SetupAxes("x [Seconds]", "y [Volts]"); + ImPlot::SetupAxes(appLanguage[Key::x_axis_label], appLanguage[Key::y_axis_label]); ImPlot::SetupAxesLimits(0, 10, -10, 200); ImPlot::SetupAxisTicks(ImAxis_Y1, -10, 200, 22, nullptr, true); ImPlot::SetupLegend(ImPlotLocation_NorthEast); From eb3b969f79369c86bcf5298de7497880ced0d103 Mon Sep 17 00:00:00 2001 From: DanielNowak98 Date: Thu, 2 May 2024 14:14:35 +0200 Subject: [PATCH 2/6] added some languages changes on main.cpp and languages.hpp. Rebase branch from master. --- src/languages.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/languages.hpp b/src/languages.hpp index a9f81fd9..07589e84 100644 --- a/src/languages.hpp +++ b/src/languages.hpp @@ -79,6 +79,7 @@ enum class Key { x_axis_label, y_axis_label, Record_Data, + Ready, German }; @@ -157,6 +158,7 @@ inline const std::map englishLan{ {Key::x_axis_label, "x [Seconds]"}, {Key::y_axis_label, "y [Volts]"}, {Key::Record_Data, "Recording the data"}, + {Key::Ready, "Ready"}, {Key::German, "German"}}; inline const std::map germanLan{ @@ -234,7 +236,8 @@ inline const std::map germanLan{ {Key::x_axis_label, "x [Sekunden]"}, {Key::y_axis_label, "y [Volt]"}, {Key::Record_Data, "Datenaufnahme"}, - {Key::German, "Deutsch"}}; + {Key::Ready, "Ready"}, + {Key::German, "Bereit"}}; inline auto appLanguage = englishLan; #endif \ No newline at end of file From e58f6000d5a61ace3b90f666fd368bb3bfdae18c Mon Sep 17 00:00:00 2001 From: DanielNowak98 Date: Wed, 29 May 2024 09:38:07 +0200 Subject: [PATCH 3/6] added language changes in languages.hpp --- src/languages.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/languages.hpp b/src/languages.hpp index 07589e84..3316a77d 100644 --- a/src/languages.hpp +++ b/src/languages.hpp @@ -122,7 +122,7 @@ inline const std::map englishLan{ {Key::Continue, "Continue"}, {Key::Continue_del, "Continue Deletion?"}, {Key::Devices_found, "Devices found"}, - {Key::Device_List, "Devicelist"}, + {Key::Device_List, "Devices List"}, {Key::Usr_curnt_wave, "User Current Waveform"}, {Key::Wv_from_file, "Waveform From File"}, {Key::WvForms_warning, "Waveforms Warning! "}, @@ -236,8 +236,7 @@ inline const std::map germanLan{ {Key::x_axis_label, "x [Sekunden]"}, {Key::y_axis_label, "y [Volt]"}, {Key::Record_Data, "Datenaufnahme"}, - {Key::Ready, "Ready"}, - {Key::German, "Bereit"}}; + {Key::Ready, "bereit"}}; inline auto appLanguage = englishLan; #endif \ No newline at end of file From 57c9a2eb17b2199903417f235b2695e530d80da2 Mon Sep 17 00:00:00 2001 From: DanielNowak98 Date: Wed, 29 May 2024 10:03:30 +0200 Subject: [PATCH 4/6] merged and fetched7 --- src/languages.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages.hpp b/src/languages.hpp index 3316a77d..1ae216c1 100644 --- a/src/languages.hpp +++ b/src/languages.hpp @@ -239,4 +239,4 @@ inline const std::map germanLan{ {Key::Ready, "bereit"}}; inline auto appLanguage = englishLan; -#endif \ No newline at end of file +#endif From 98c916493d96c21c09489c95e1e1fe2fdbd03ffa Mon Sep 17 00:00:00 2001 From: DanielNowak98 Date: Thu, 13 Jun 2024 11:02:05 +0200 Subject: [PATCH 5/6] added changes --- src/languages.hpp | 6 ++++++ src/settingspopup.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/languages.hpp b/src/languages.hpp index e48750ae..dc30a866 100644 --- a/src/languages.hpp +++ b/src/languages.hpp @@ -6,6 +6,7 @@ #include enum class Key { + Saving, Known_Car, New_Car, Additional_Information, @@ -80,10 +81,13 @@ enum class Key { y_axis_label, Record_Data, Ready, + FontSize, German }; inline const std::map englishLan{ + {Key::Saving, "saving"}, + {Key::FontSize, "Font Size"}, {Key::Known_Car, "Known Cars"}, {Key::New_Car, "New_Car"}, {Key::Additional_Information, "Additional_Information"}, @@ -162,6 +166,8 @@ inline const std::map englishLan{ {Key::German, "German"}}; inline const std::map germanLan{ + {Key::Saving, "speichert"}, + {Key::FontSize, "Schriftgröße"}, {Key::Device_List, "Geräteliste"}, {Key::Known_Car, "Fahrzeugauswahl"}, {Key::New_Car, "Neues Fahrzeug"}, diff --git a/src/settingspopup.hpp b/src/settingspopup.hpp index 026a656e..850901fd 100644 --- a/src/settingspopup.hpp +++ b/src/settingspopup.hpp @@ -17,7 +17,7 @@ static void popup_settings(nlohmann::json &config, ImGuiIO &io = ImGui::GetIO(); - ImGui::Text(appLanguage[Key::SettingsText]); + ImGui::Text(appLanguage[Key::Set_id_in_setting]); ImGui::Text(" "); if (tempfontscale < load_json(config, "text", "minscale")) { From 00de75b04a9dc22eede51dc5da028aec4163b961 Mon Sep 17 00:00:00 2001 From: DanielNowak98 Date: Thu, 13 Jun 2024 12:02:55 +0200 Subject: [PATCH 6/6] added language linkings --- src/languages.hpp | 3 +++ src/main.cpp | 9 --------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/languages.hpp b/src/languages.hpp index 157cb9d0..19f99844 100644 --- a/src/languages.hpp +++ b/src/languages.hpp @@ -6,6 +6,7 @@ #include enum class Key { + Load_file_Data, Saving, Known_Car, New_Car, @@ -86,6 +87,7 @@ enum class Key { }; inline const std::map englishLan{ + {Key::Load_file_Data, "Load File"}, {Key::Saving, "saving"}, {Key::FontSize, "Font Size"}, {Key::Known_Car, "Known Cars"}, @@ -166,6 +168,7 @@ inline const std::map englishLan{ {Key::German, "German"}}; inline const std::map germanLan{ + {Key::Load_file_Data, "Laden alter Daten"}, {Key::Saving, "speichert"}, {Key::FontSize, "Schriftgröße"}, {Key::Device_List, "Geräteliste"}, diff --git a/src/main.cpp b/src/main.cpp index 089f3d56..4ae07463 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -96,23 +96,14 @@ int main() { ImGui::BeginChild("Record Data", {0.f, windowSize.y * 0.62f}, ImGuiChildFlags_Border); -<<<<<<< HEAD - addPlots(appLanguage[Key::Record_Data], flagPaused, [&xmax_paused](double x_max) { -======= addPlots("Recording the data", [](double x_max) { ->>>>>>> master if (!flagPaused) { ImPlot::SetupAxes(appLanguage[Key::x_axis_label], appLanguage[Key::y_axis_label], ImPlotAxisFlags_AutoFit, ImPlotAxisFlags_AutoFit); ImPlot::SetupAxisLimits(ImAxis_X1, x_max - 7500, x_max + 7500, ImGuiCond_Always); } else { -<<<<<<< HEAD - xmax_paused = x_max; - ImPlot::SetupAxes(appLanguage[Key::x_axis_label], appLanguage[Key::y_axis_label]); -======= ImPlot::SetupAxes("x [Seconds]", "y [Volts]"); ->>>>>>> master ImPlot::SetupAxesLimits(0, 10, -10, 200); ImPlot::SetupAxisTicks(ImAxis_Y1, -10, 200, 22, nullptr, true); ImPlot::SetupLegend(ImPlotLocation_NorthEast);