My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

language_test.h 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * TEST
  25. *
  26. * LCD Menu Messages
  27. * See also https://marlinfw.org/docs/development/lcd_language.html
  28. */
  29. // Select ONE of the following Mappers.
  30. // They decide what to do with a symbol in the area of [0x80:0xFF]. They take a symbol of this language file and make them point
  31. // into an array with 128 cells, where they'll find the place of the symbol of the font in use.
  32. //
  33. // a.)For ASCII coded Language_xx.h files like (en) there are no occurrences of symbols above 0x7F so no mapper is needed.
  34. // If such a symbol appears it is mapped directly into the font. This is the case for the language files we used until now, with all the STR_XX or
  35. // "\xxx" symbols. All Symbols are only one byte long.
  36. // b.) For Unicoded Language_xx.h files (currently ru, de and kana_utf8 ) the non ASCII [0x00-0x7F] symbols are represented by more than one byte.
  37. // In the case of two bytes the first is pointing to a 'codepage' and the second to a place in the codepage. These codepages contain 64 symbols.
  38. // So two of them can be mapped. For most of the European languages the necessary symbols are contained in the pages C2 and C3. Cyrillic uses D0
  39. // and D1.
  40. // c.) For katakana (one of the Japanese symbol sets) Unicode uses 3 bytes. Here the second byte also points to a codepage and byte 3 to the symbol.
  41. // I hope the pages E282 and E283 are sufficient to write katakana.
  42. // Kanji (an other Japanese symbol set) uses far more than two codepages. So currently I don't see a chance to map the Unicodes. Its not
  43. // impossible to have a close to direct mapping but will need giant conversion tables and fonts (we don't want to have in a embedded system).
  44. // Select the better font for full graphic displays.
  45. //#define DISPLAY_CHARSET_ISO10646_1
  46. //#define DISPLAY_CHARSET_ISO10646_5
  47. //#define DISPLAY_CHARSET_ISO10646_GREEK
  48. //#define DISPLAY_CHARSET_ISO10646_KANA
  49. // next 5 lines select variants in this file only
  50. #define DISPLAYTEST
  51. //#define WEST
  52. //#define CYRIL
  53. //#define KANA
  54. // TESTSTRINGS
  55. #define STRG_ASCII_2 _UxGT(" !\"#$%&'()*+,-./")
  56. #define STRG_ASCII_3 _UxGT("0123456789:;<=>?")
  57. #define STRG_ASCII_4 _UxGT("@ABCDEFGHIJKLMNO")
  58. #define STRG_ASCII_5 _UxGT("PQRSTUVWXYZ[\\]^_")
  59. #define STRG_ASCII_6 _UxGT("`abcdefghijklmno")
  60. #define STRG_ASCII_7 _UxGT("pqrstuvwxyz{|}~")
  61. #define STRG_C2_8 _UxGT("")
  62. #define STRG_C2_9 _UxGT("")
  63. #define STRG_C2_a _UxGT(" ¡¢£¤¥¦§¨©ª«¬­®¯")
  64. #define STRG_C2_b _UxGT("°±²³´µ¶·¸¹º»¼½¾¿")
  65. #define STRG_C3_8 _UxGT("ÈÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ")
  66. #define STRG_C3_9 _UxGT("ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß")
  67. #define STRG_C3_a _UxGT("àáâãäåæçèéêëìíîï")
  68. #define STRG_C3_b _UxGT("ðñòóôõö÷øùúûüýþÿ")
  69. #define STRG_D0_8 _UxGT("ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏ")
  70. #define STRG_D0_9 _UxGT("АБВГДЕЖЗИЙКЛМНОП")
  71. #define STRG_D0_a _UxGT("РСТУФХЦЧШЩЪЫЬЭЮЯ")
  72. #define STRG_D0_b _UxGT("абвгдежзийклмноп")
  73. #define STRG_D1_8 _UxGT("рстуфхцчшщъыьэюя")
  74. #define STRG_D1_9 _UxGT("ѐёђѓєѕіїјљњћќѝўџ")
  75. #define STRG_D1_a _UxGT("ѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯ")
  76. #define STRG_D1_b _UxGT("ѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾѿ")
  77. #define STRG_E382_8 _UxGT("よめもゃやゅゆょよらりるれろゎわ")
  78. #define STRG_E382_9 _UxGT("ゐゑをんゔゕゖ゗゘゙゚゛ ゜ゝゞゟ")
  79. #define STRG_E382_a _UxGT("゠ァアィイゥウェエォオカガキギク")
  80. #define STRG_E382_b _UxGT("グケゲコゴサザシジスズセゼソゾタ")
  81. #define STRG_E383_8 _UxGT("トチヂッツヅテデトドナニヌネノハ")
  82. #define STRG_E383_9 _UxGT("バパヒビピフブプヘベペホボポマミ")
  83. #define STRG_E383_a _UxGT("ムメモャヤュユョヨラリルレロヮワ")
  84. #define STRG_E383_b _UxGT("ヰヱヲンヴヵヶヷヸヹヺ・ーヽヾヿ")
  85. #define STRG_OKTAL_0 "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"
  86. #define STRG_OKTAL_1 "\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
  87. #define STRG_OKTAL_2 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057"
  88. #define STRG_OKTAL_3 "\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077"
  89. #define STRG_OKTAL_4 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117"
  90. #define STRG_OKTAL_5 "\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137"
  91. #define STRG_OKTAL_6 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157"
  92. #define STRG_OKTAL_7 "\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177"
  93. #define STRG_OKTAL_8 "\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217"
  94. #define STRG_OKTAL_9 "\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237"
  95. #define STRG_OKTAL_a "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257"
  96. #define STRG_OKTAL_b "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277"
  97. #define STRG_OKTAL_c "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317"
  98. #define STRG_OKTAL_d "\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337"
  99. #define STRG_OKTAL_e "\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357"
  100. #define STRG_OKTAL_f "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
  101. namespace Language_test {
  102. using namespace Language_en; // Inherit undefined strings from English
  103. constexpr uint8_t CHARSIZE = 1;
  104. #if ENABLED(DISPLAYTEST)
  105. LSTR WELCOME_MSG = _UxGT("Language TEST");
  106. LSTR MSG_INFO_SCREEN = _UxGT("Display test");
  107. LSTR MSG_PREPARE = STRG_OKTAL_b;
  108. LSTR MSG_CONTROL = STRG_OKTAL_c;
  109. #endif
  110. #if ENABLED(WEST)
  111. LSTR WELCOME_MSG = _UxGT("Language TEST");
  112. LSTR MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011");
  113. LSTR MSG_PREPARE = _UxGT("UTF8");
  114. LSTR MSG_CONTROL = _UxGT("ASCII");
  115. LSTR MSG_MAIN = _UxGT("..");
  116. LSTR MSG_DISABLE_STEPPERS = STRG_C2_8;
  117. LSTR MSG_AUTO_HOME = STRG_C2_9;
  118. LSTR MSG_SET_HOME_OFFSETS = STRG_C2_a;
  119. LSTR MSG_PREHEAT_1 = STRG_C2_b;
  120. LSTR MSG_PREHEAT_2 = STRG_C3_8;
  121. LSTR MSG_COOLDOWN = STRG_C3_9;
  122. LSTR MSG_SWITCH_PS_OFF = STRG_C3_a;
  123. LSTR MSG_MOVE_AXIS = STRG_C3_b;
  124. LSTR MSG_MAIN = STRG_OKTAL_2;
  125. LSTR MSG_TEMPERATURE = STRG_OKTAL_3;
  126. LSTR MSG_MOTION = STRG_OKTAL_4;
  127. LSTR MSG_FILAMENT = STRG_OKTAL_5;
  128. LSTR MSG_CONTRAST = STRG_OKTAL_6;
  129. LSTR MSG_RESTORE_DEFAULTS = STRG_OKTAL_7;
  130. LSTR MSG_NOZZLE = STRG_OKTAL_8;
  131. LSTR MSG_NOZZLE_N = STRG_OKTAL_8 " ~";
  132. LSTR MSG_FAN_SPEED = STRG_OKTAL_9;
  133. LSTR MSG_FAN_SPEED_N = STRG_OKTAL_9;
  134. LSTR MSG_AUTOTEMP = STRG_OKTAL_a;
  135. LSTR MSG_MIN = STRG_OKTAL_b;
  136. LSTR MSG_MAX = STRG_OKTAL_c;
  137. LSTR MSG_FACTOR = STRG_OKTAL_d;
  138. LSTR MSG_PID_P = STRG_OKTAL_e;
  139. LSTR MSG_PID_I = STRG_OKTAL_f;
  140. #endif
  141. #if ENABLED(CYRIL)
  142. LSTR WELCOME_MSG = _UxGT("Language TEST");
  143. LSTR MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011");
  144. LSTR MSG_PREPARE = _UxGT("UTF8");
  145. LSTR MSG_CONTROL = _UxGT("ASCII");
  146. LSTR MSG_MAIN = _UxGT("..");
  147. LSTR MSG_DISABLE_STEPPERS = STRG_D0_8;
  148. LSTR MSG_AUTO_HOME = STRG_D0_9;
  149. LSTR MSG_SET_HOME_OFFSETS = STRG_D0_a;
  150. LSTR MSG_PREHEAT_1 = STRG_D0_b;
  151. LSTR MSG_PREHEAT_2 = STRG_D1_8;
  152. LSTR MSG_COOLDOWN = STRG_D1_9;
  153. LSTR MSG_SWITCH_PS_OFF = STRG_D1_a;
  154. LSTR MSG_MOVE_AXIS = STRG_D1_b;
  155. LSTR MSG_MAIN = STRG_OKTAL_2;
  156. LSTR MSG_TEMPERATURE = STRG_OKTAL_3;
  157. LSTR MSG_MOTION = STRG_OKTAL_4;
  158. LSTR MSG_FILAMENT = STRG_OKTAL_5;
  159. LSTR MSG_CONTRAST = STRG_OKTAL_6;
  160. LSTR MSG_RESTORE_DEFAULTS = STRG_OKTAL_7;
  161. LSTR MSG_NOZZLE = STRG_OKTAL_8;
  162. LSTR MSG_NOZZLE_N = STRG_OKTAL_8 " ~";
  163. LSTR MSG_FAN_SPEED_N = STRG_OKTAL_9;
  164. LSTR MSG_AUTOTEMP = STRG_OKTAL_a;
  165. LSTR MSG_MIN = STRG_OKTAL_b;
  166. LSTR MSG_MAX = STRG_OKTAL_c;
  167. LSTR MSG_FACTOR = STRG_OKTAL_d;
  168. LSTR MSG_PID_P = STRG_OKTAL_e;
  169. LSTR MSG_PID_I = STRG_OKTAL_f;
  170. #endif
  171. #if ENABLED(KANA)
  172. LSTR WELCOME_MSG = _UxGT("Language TEST");
  173. LSTR MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011");
  174. LSTR MSG_PREPARE = _UxGT("UTF8");
  175. LSTR MSG_CONTROL = _UxGT("ASCII");
  176. LSTR MSG_MAIN = _UxGT("..");
  177. LSTR MSG_DISABLE_STEPPERS = STRG_E382_8;
  178. LSTR MSG_AUTO_HOME = STRG_E382_9;
  179. LSTR MSG_SET_HOME_OFFSETS = STRG_E382_a;
  180. LSTR MSG_PREHEAT_1 = STRG_E382_b;
  181. LSTR MSG_PREHEAT_2 = STRG_E383_8;
  182. LSTR MSG_COOLDOWN = STRG_E383_9;
  183. LSTR MSG_SWITCH_PS_OFF = STRG_E383_a;
  184. LSTR MSG_MOVE_AXIS = STRG_E383_b;
  185. LSTR MSG_MAIN = STRG_OKTAL_2;
  186. LSTR MSG_TEMPERATURE = STRG_OKTAL_3;
  187. LSTR MSG_MOTION = STRG_OKTAL_4;
  188. LSTR MSG_FILAMENT = STRG_OKTAL_5;
  189. LSTR MSG_CONTRAST = STRG_OKTAL_6;
  190. LSTR MSG_RESTORE_DEFAULTS = STRG_OKTAL_7;
  191. LSTR MSG_NOZZLE = STRG_OKTAL_8;
  192. LSTR MSG_NOZZLE_N = STRG_OKTAL_8 " ~";
  193. LSTR MSG_FAN_SPEED_N = STRG_OKTAL_9;
  194. LSTR MSG_AUTOTEMP = STRG_OKTAL_a;
  195. LSTR MSG_MIN = STRG_OKTAL_b;
  196. LSTR MSG_MAX = STRG_OKTAL_c;
  197. LSTR MSG_FACTOR = STRG_OKTAL_d;
  198. LSTR MSG_PID_P = STRG_OKTAL_e;
  199. LSTR MSG_PID_I = STRG_OKTAL_f;
  200. #endif
  201. }