diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9ecfad283c2508b72912e53ce6cb0f779a3f2e1f..e433314830ee85e8f8637eba8283a4b4ed2be613 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -771,7 +771,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 9f918781ea558cbf1ff948bd3c1ae71ac74b9348..70553f6f557aeb5f3da2b073d4211171cc06fbf5 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -506,6 +506,8 @@ #error DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead. #elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP) #error Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2 +#elif defined(LANGUAGE_INCLUDE) + #error LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration. #endif #endif //SANITYCHECK_H diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 7c23be9b8eaf57dbc61767b3ddc6ec5fdc688a8a..ca3bf1f8c54a704d54c1d42bec2ea3e6c84da9c0 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -753,7 +753,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 3da920c12559932f318bcccdcad82281085bcd67..0cd247491a23773ac79a7a51c0652aa738a904fc 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -750,7 +750,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index cd666eb5010906f49f1f5292707100217924d2b4..80adf1d2fca58a86f8fcf05f2e68ff9427e86cdb 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -762,7 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 04901089406aca6f6d79df12551fc68f379d6418..85d47b07e5bed7ce73d1c96a522525466585a501 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -764,7 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index f27691925436543fe6e73f0c9d1f329a65a22ca0..e0959afff8e61b7115ccca1f1197abfc34b84024 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -787,7 +787,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index b86d79efa7bb53c4bfe9d5062c36b1cae499dc2d..c41b4af61cd407fcc4974d78db40ed1c5b9b8bdd 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -770,7 +770,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 7e561115744056b05fcd750c20c5cc3d5550f79a..2198dd5784020f8c60e8d5fcbc5afe2f696d35ea 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -765,7 +765,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index e74071d79c02378657840c5bb240307c6748bd3c..f65c2d32dabb185647fa8ff3af10263662f521aa 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -778,7 +778,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 8b91f4581555fb98ef13390d4aa1e46d2b45cf7a..997170a590ab60d4b0ded32f9ee4530c24b8bf87 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -791,7 +791,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 7e64c3848380656ac1177b9546d782326b31ed60..2eeb2a3c2adac93bb191bf65e0b695933cbff754 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -762,7 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 90a70269623c89345f6ecef9e6da7698dd3d2ca9..f284f729006b80a600220ad45cc1b50374873671 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -770,7 +770,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/biv2.5/Configuration.h b/Marlin/example_configurations/delta/biv2.5/Configuration.h index fd1d0ca7f9540270232296a8aa9284ca3eb71c45..80c3f9d3d83a13881a3ba260fa9ffa6e45171c1a 100644 --- a/Marlin/example_configurations/delta/biv2.5/Configuration.h +++ b/Marlin/example_configurations/delta/biv2.5/Configuration.h @@ -899,7 +899,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index de116a9477b314a15643d19d4fd27e9d4893c379..6303c4412c34061402a40778deb5ffc9b698f798 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -899,7 +899,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index bb9cce1bbc99858ebea83b5d23414a40b5221c65..dc525e73df91f1e1349be39679f218d1b00f2d8a 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -903,7 +903,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 4df6821927e83f0565fd5de7baeeb80f2ccf5625..fc6ad03585af1fe86373c0a358258a83ceabf0cf 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -896,7 +896,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index 276a194d729bd86fb541740905511c528ff28e4b..44b835987cfd61f5bd02c2613acb8b02e9a51903 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -904,7 +904,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index de0dc03a722ec41d2ba1c11040cb3422d677024a..d75cc382bb48b64bf32cb823f09c7304bf3910a8 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -773,7 +773,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index d9cd68d7bc1e19147fcc03d25aea1bae2d30a447..b68021ca923ab218920271d90eff8eafbcad14f4 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -764,7 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo // en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8, // fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test // -//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) +//#define LCD_LANGUAGE en /** * LCD Character Set diff --git a/Marlin/language.h b/Marlin/language.h index a88aacace9ae159d6e3d8d179c9b5b14055b11fc..179b1f710952e639ffab5cf770f2b43954375d13 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -25,7 +25,10 @@ #include "Configuration.h" -#define GENERATE_LANGUAGE_INCLUDE(M) STRINGIFY_(language_##M.h) +// Fallback if no language is set. DON'T CHANGE +#ifndef LCD_LANGUAGE + #define LCD_LANGUAGE en +#endif // For character-based LCD controllers (DISPLAY_CHARSET_HD44780) #define JAPANESE 1 @@ -62,11 +65,6 @@ // cn Chinese // cz Czech -// fallback if no language is set, don't change -#ifndef LANGUAGE_INCLUDE - #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) -#endif - #if ENABLED(USE_AUTOMATIC_VERSIONING) #include "_Version.h" #else @@ -236,7 +234,11 @@ // LCD Menu Messages -#include LANGUAGE_INCLUDE +#define LANGUAGE_INCL_(M) STRINGIFY_(language_##M.h) +#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M) +#define INCLUDE_LANGUAGE LANGUAGE_INCL(LCD_LANGUAGE) + +#include INCLUDE_LANGUAGE #include "language_en.h" #endif //__LANGUAGE_H