Browse Source

Replace LANGUAGE_INCLUDE with LCD_LANGUAGE

Scott Lahteine 8 years ago
parent
commit
0c11566f42

+ 1
- 1
Marlin/Configuration.h View File

@@ -771,7 +771,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
771 771
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
772 772
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
773 773
 //
774
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
774
+#define LCD_LANGUAGE en
775 775
 
776 776
 /**
777 777
  * LCD Character Set

+ 2
- 0
Marlin/SanityCheck.h View File

@@ -506,6 +506,8 @@
506 506
   #error DISABLE_MAX_ENDSTOPS and DISABLE_MIN_ENDSTOPS deprecated. Use individual USE_*_PLUG options instead.
507 507
 #elif ENABLED(Z_DUAL_ENDSTOPS) && !defined(Z2_USE_ENDSTOP)
508 508
   #error Z_DUAL_ENDSTOPS settings are simplified. Just set Z2_USE_ENDSTOP to the endstop you want to repurpose for Z2
509
+#elif defined(LANGUAGE_INCLUDE)
510
+  #error LANGUAGE_INCLUDE has been replaced by LCD_LANGUAGE. Please update your configuration.
509 511
 #endif
510 512
 
511 513
 #endif //SANITYCHECK_H

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h View File

@@ -753,7 +753,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
753 753
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
754 754
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
755 755
 //
756
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
756
+//#define LCD_LANGUAGE en
757 757
 
758 758
 /**
759 759
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -750,7 +750,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
750 750
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
751 751
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
752 752
 //
753
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
753
+//#define LCD_LANGUAGE en
754 754
 
755 755
 /**
756 756
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -762,7 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
762 762
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
763 763
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
764 764
 //
765
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
765
+//#define LCD_LANGUAGE en
766 766
 
767 767
 /**
768 768
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -764,7 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
764 764
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
765 765
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
766 766
 //
767
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
767
+#define LCD_LANGUAGE en
768 768
 
769 769
 /**
770 770
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h View File

@@ -787,7 +787,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
787 787
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
788 788
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
789 789
 //
790
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
790
+#define LCD_LANGUAGE en
791 791
 
792 792
 /**
793 793
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -770,7 +770,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
770 770
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
771 771
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
772 772
 //
773
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
773
+#define LCD_LANGUAGE en
774 774
 
775 775
 /**
776 776
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -765,7 +765,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
765 765
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
766 766
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
767 767
 //
768
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
768
+#define LCD_LANGUAGE en
769 769
 
770 770
 /**
771 771
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -778,7 +778,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
778 778
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
779 779
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
780 780
 //
781
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
781
+//#define LCD_LANGUAGE en
782 782
 
783 783
 /**
784 784
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -791,7 +791,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
791 791
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
792 792
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
793 793
 //
794
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
794
+#define LCD_LANGUAGE en
795 795
 
796 796
 /**
797 797
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -762,7 +762,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
762 762
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
763 763
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
764 764
 //
765
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
765
+//#define LCD_LANGUAGE en
766 766
 
767 767
 /**
768 768
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -770,7 +770,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
770 770
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
771 771
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
772 772
 //
773
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
773
+#define LCD_LANGUAGE en
774 774
 
775 775
 /**
776 776
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/delta/biv2.5/Configuration.h View File

@@ -899,7 +899,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
899 899
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
900 900
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
901 901
 //
902
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
902
+#define LCD_LANGUAGE en
903 903
 
904 904
 /**
905 905
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -899,7 +899,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
899 899
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
900 900
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
901 901
 //
902
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
902
+#define LCD_LANGUAGE en
903 903
 
904 904
 /**
905 905
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -903,7 +903,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
903 903
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
904 904
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
905 905
 //
906
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
906
+#define LCD_LANGUAGE en
907 907
 
908 908
 /**
909 909
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -896,7 +896,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
896 896
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
897 897
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
898 898
 //
899
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
899
+#define LCD_LANGUAGE en
900 900
 
901 901
 /**
902 902
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -904,7 +904,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
904 904
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
905 905
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
906 906
 //
907
-#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
907
+#define LCD_LANGUAGE en
908 908
 
909 909
 /**
910 910
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h View File

@@ -773,7 +773,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
773 773
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
774 774
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
775 775
 //
776
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
776
+//#define LCD_LANGUAGE en
777 777
 
778 778
 /**
779 779
  * LCD Character Set

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -764,7 +764,7 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
764 764
 //    en, pl, fr, de, es, ru, bg, it, pt, pt_utf8, pt-br, pt-br_utf8,
765 765
 //    fi, an, nl, ca, eu, kana, kana_utf8, cn, cz, test
766 766
 //
767
-//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
767
+//#define LCD_LANGUAGE en
768 768
 
769 769
 /**
770 770
  * LCD Character Set

+ 9
- 7
Marlin/language.h View File

@@ -25,7 +25,10 @@
25 25
 
26 26
 #include "Configuration.h"
27 27
 
28
-#define GENERATE_LANGUAGE_INCLUDE(M)  STRINGIFY_(language_##M.h)
28
+// Fallback if no language is set. DON'T CHANGE
29
+#ifndef LCD_LANGUAGE
30
+  #define LCD_LANGUAGE en
31
+#endif
29 32
 
30 33
 // For character-based LCD controllers (DISPLAY_CHARSET_HD44780)
31 34
 #define JAPANESE 1
@@ -62,11 +65,6 @@
62 65
 // cn         Chinese
63 66
 // cz         Czech
64 67
 
65
-// fallback if no language is set, don't change
66
-#ifndef LANGUAGE_INCLUDE
67
-  #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
68
-#endif
69
-
70 68
 #if ENABLED(USE_AUTOMATIC_VERSIONING)
71 69
   #include "_Version.h"
72 70
 #else
@@ -236,7 +234,11 @@
236 234
 
237 235
 // LCD Menu Messages
238 236
 
239
-#include LANGUAGE_INCLUDE
237
+#define LANGUAGE_INCL_(M) STRINGIFY_(language_##M.h)
238
+#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
239
+#define INCLUDE_LANGUAGE LANGUAGE_INCL(LCD_LANGUAGE)
240
+
241
+#include INCLUDE_LANGUAGE
240 242
 #include "language_en.h"
241 243
 
242 244
 #endif //__LANGUAGE_H

Loading…
Cancel
Save