Prusa MINI Firmware overview
language.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 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 <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 #include "../inc/MarlinConfig.h"
25 
26 #define _UxGT(a) a
27 
28 // Fallback if no language is set. DON'T CHANGE
29 #ifndef LCD_LANGUAGE
30  #define LCD_LANGUAGE en
31 #endif
32 
33 // For character-based LCD controllers (DISPLAY_CHARSET_HD44780)
34 #define JAPANESE 1
35 #define WESTERN 2
36 #define CYRILLIC 3
37 
38 // NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
39 //
40 // ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRA_LCD" / "SDSUPPORT" #define IN "Configuration.h"
41 // ==> ALSO TRY ALL AVAILABLE LANGUAGE OPTIONS
42 // See also http://marlinfw.org/docs/development/lcd_language.html
43 
44 // Languages
45 // an Aragonese
46 // bg Bulgarian
47 // ca Catalan
48 // cz Czech
49 // da Danish
50 // de German
51 // el Greek
52 // el_gr Greek (Greece)
53 // en English
54 // es Spanish
55 // eu Basque-Euskera
56 // fi Finnish
57 // fr French
58 // gl Galician
59 // hr Croatian
60 // it Italian
61 // jp_kana Japanese
62 // ko_KR Korean (South Korea)
63 // nl Dutch
64 // pl Polish
65 // pt Portuguese
66 // pt_br Portuguese (Brazilian)
67 // ru Russian
68 // sk Slovak
69 // tr Turkish
70 // uk Ukrainian
71 // vi Vietnamese
72 // zh_CN Chinese (Simplified)
73 // zh_TW Chinese (Traditional)
74 
75 #ifdef DEFAULT_SOURCE_CODE_URL
76  #undef SOURCE_CODE_URL
77  #define SOURCE_CODE_URL DEFAULT_SOURCE_CODE_URL
78 #endif
79 
80 #ifdef CUSTOM_MACHINE_NAME
81  #undef MACHINE_NAME
82  #define MACHINE_NAME CUSTOM_MACHINE_NAME
83 #else
84  #ifdef DEFAULT_MACHINE_NAME
85  #undef MACHINE_NAME
86  #define MACHINE_NAME DEFAULT_MACHINE_NAME
87  #endif
88 #endif
89 
90 #ifndef MACHINE_UUID
91  #define MACHINE_UUID DEFAULT_MACHINE_UUID
92 #endif
93 
94 #define MARLIN_WEBSITE_URL "http://marlinfw.org"
95 
96 //#if !defined(STRING_SPLASH_LINE3) && defined(WEBSITE_URL)
97 // #define STRING_SPLASH_LINE3 WEBSITE_URL
98 //#endif
99 
100 #if HAS_CHARACTER_LCD
101 
102  // Custom characters defined in the first 8 characters of the LCD
103  #define LCD_STR_BEDTEMP "\x00" // Print only as a char. This will have 'unexpected' results when used in a string!
104  #define LCD_STR_DEGREE "\x01"
105  #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
106  #define LCD_STR_UPLEVEL "\x03"
107  #define LCD_STR_REFRESH "\x04"
108  #define LCD_STR_FOLDER "\x05"
109  #define LCD_STR_FEEDRATE "\x06"
110  #define LCD_STR_CLOCK "\x07"
111  #define LCD_STR_ARROW_RIGHT ">" /* from the default character set */
112 
113 #else
114  //
115  // Custom characters from Marlin_symbols.fon which was merged into ISO10646-0-3.bdf
116  // \x00 intentionally skipped to avoid problems in strings
117  //
118  #define LCD_STR_REFRESH "\x01"
119  #define LCD_STR_FOLDER "\x02"
120  #define LCD_STR_ARROW_RIGHT "\x03"
121  #define LCD_STR_UPLEVEL "\x04"
122  #define LCD_STR_CLOCK "\x05"
123  #define LCD_STR_FEEDRATE "\x06"
124  #define LCD_STR_BEDTEMP "\x07"
125  #define LCD_STR_THERMOMETER "\x08"
126  #define LCD_STR_DEGREE "\x09"
127 
128  #define LCD_STR_SPECIAL_MAX '\x09'
129  // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
130  // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
131 
132  // Symbol characters
133  #define LCD_STR_FILAM_DIA "\xF8"
134  #define LCD_STR_FILAM_MUL "\xA4"
135 
136 #endif
137 
138 // Common LCD messages
139 
140  /* nothing here yet */
141 
142 // Common serial messages
143 #define MSG_MARLIN "Marlin"
144 
145 // Serial Console Messages (do not translate those!)
146 
147 #define MSG_ENQUEUEING "enqueueing \""
148 #define MSG_POWERUP "PowerUp"
149 #define MSG_EXTERNAL_RESET " External Reset"
150 #define MSG_BROWNOUT_RESET " Brown out Reset"
151 #define MSG_WATCHDOG_RESET " Watchdog Reset"
152 #define MSG_SOFTWARE_RESET " Software Reset"
153 #define MSG_AUTHOR " | Author: "
154 #define MSG_CONFIGURATION_VER " Last Updated: "
155 #define MSG_FREE_MEMORY " Free Memory: "
156 #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
157 #define MSG_OK "ok"
158 #define MSG_WAIT "wait"
159 #define MSG_STATS "Stats: "
160 #define MSG_FILE_SAVED "Done saving file."
161 #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line: "
162 #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line: "
163 #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line: "
164 #define MSG_FILE_PRINTED "Done printing file"
165 #define MSG_BEGIN_FILE_LIST "Begin file list"
166 #define MSG_END_FILE_LIST "End file list"
167 #define MSG_INVALID_EXTRUDER "Invalid extruder"
168 #define MSG_INVALID_E_STEPPER "Invalid E stepper"
169 #define MSG_E_STEPPER_NOT_SPECIFIED "E stepper not specified"
170 #define MSG_INVALID_SOLENOID "Invalid solenoid"
171 #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
172 #define MSG_COUNT_X " Count X:"
173 #define MSG_COUNT_A " Count A:"
174 #define MSG_WATCHDOG_FIRED "Watchdog timeout. Reset required."
175 #define MSG_ERR_KILLED "Printer halted. kill() called!"
176 #define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
177 #define MSG_BUSY_PROCESSING "busy: processing"
178 #define MSG_BUSY_PAUSED_FOR_USER "busy: paused for user"
179 #define MSG_BUSY_PAUSED_FOR_INPUT "busy: paused for input"
180 #define MSG_Z_MOVE_COMP "Z_move_comp"
181 #define MSG_RESEND "Resend: "
182 #define MSG_UNKNOWN_COMMAND "Unknown command: \""
183 #define MSG_ACTIVE_EXTRUDER "Active Extruder: "
184 #define MSG_X_MIN "x_min"
185 #define MSG_X_MAX "x_max"
186 #define MSG_X2_MIN "x2_min"
187 #define MSG_X2_MAX "x2_max"
188 #define MSG_Y_MIN "y_min"
189 #define MSG_Y_MAX "y_max"
190 #define MSG_Y2_MIN "y2_min"
191 #define MSG_Y2_MAX "y2_max"
192 #define MSG_Z_MIN "z_min"
193 #define MSG_Z_MAX "z_max"
194 #define MSG_Z2_MIN "z2_min"
195 #define MSG_Z2_MAX "z2_max"
196 #define MSG_Z3_MIN "z3_min"
197 #define MSG_Z3_MAX "z3_max"
198 #define MSG_Z_PROBE "z_probe"
199 #define MSG_FILAMENT_RUNOUT_SENSOR "filament"
200 #define MSG_PROBE_OFFSET "Probe Offset"
201 #define MSG_SKEW_MIN "min_skew_factor: "
202 #define MSG_SKEW_MAX "max_skew_factor: "
203 #define MSG_ERR_MATERIAL_INDEX "M145 S<index> out of range (0-1)"
204 #define MSG_ERR_M421_PARAMETERS "M421 incorrect parameter usage"
205 #define MSG_ERR_BAD_PLANE_MODE "G5 requires XY plane mode"
206 #define MSG_ERR_MESH_XY "Mesh point cannot be resolved"
207 #define MSG_ERR_ARC_ARGS "G2/G3 bad parameters"
208 #define MSG_ERR_PROTECTED_PIN "Protected Pin"
209 #define MSG_ERR_M420_FAILED "Failed to enable Bed Leveling"
210 #define MSG_ERR_M428_TOO_FAR "Too far from reference point"
211 #define MSG_ERR_M303_DISABLED "PIDTEMP disabled"
212 #define MSG_M119_REPORT "Reporting endstop status"
213 #define MSG_ON "ON"
214 #define MSG_OFF "OFF"
215 #define MSG_ENDSTOP_HIT "TRIGGERED"
216 #define MSG_ENDSTOP_OPEN "open"
217 #define MSG_HOTEND_OFFSET "Hotend offsets:"
218 #define MSG_DUPLICATION_MODE "Duplication mode: "
219 #define MSG_SOFT_ENDSTOPS "Soft endstops: "
220 #define MSG_SOFT_MIN " Min: "
221 #define MSG_SOFT_MAX " Max: "
222 
223 #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir "
224 #define MSG_SD_INIT_FAIL "SD init fail"
225 #define MSG_SD_VOL_INIT_FAIL "volume.init failed"
226 #define MSG_SD_OPENROOT_FAIL "openRoot failed"
227 #define MSG_SD_CARD_OK "SD card ok"
228 #define MSG_SD_WORKDIR_FAIL "workDir open failed"
229 #define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
230 #define MSG_SD_FILE_OPENED "File opened: "
231 #define MSG_SD_SIZE " Size: "
232 #define MSG_SD_FILE_SELECTED "File selected"
233 #define MSG_SD_WRITE_TO_FILE "Writing to file: "
234 #define MSG_SD_PRINTING_BYTE "SD printing byte "
235 #define MSG_SD_NOT_PRINTING "Not SD printing"
236 #define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
237 #define MSG_SD_ERR_READ "SD read error"
238 #define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir: "
239 
240 #define MSG_STEPPER_TOO_HIGH "Steprate too high: "
241 #define MSG_ENDSTOPS_HIT "endstops hit: "
242 #define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
243 #define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
244 #define MSG_ERR_HOTEND_TOO_COLD "Hotend too cold"
245 #define MSG_ERR_Z_HOMING_SER "Home XY first"
246 #define MSG_ERR_EEPROM_WRITE "Error writing to EEPROM!"
247 
248 #define MSG_FILAMENT_CHANGE_HEAT_LCD "Press button to heat nozzle"
249 #define MSG_FILAMENT_CHANGE_INSERT_LCD "Insert filament and press button"
250 #define MSG_FILAMENT_CHANGE_WAIT_LCD "Press button to resume"
251 #define MSG_FILAMENT_CHANGE_HEAT_M108 "Send M108 to heat nozzle"
252 #define MSG_FILAMENT_CHANGE_INSERT_M108 "Insert filament and send M108"
253 #define MSG_FILAMENT_CHANGE_WAIT_M108 "Send M108 to resume"
254 
255 #define MSG_STOP_BLTOUCH "STOP called because of BLTouch error - restart with M999"
256 #define MSG_STOP_UNHOMED "STOP called because of unhomed error - restart with M999"
257 #define MSG_KILL_INACTIVE_TIME "KILL caused by too much inactive time - current command: "
258 #define MSG_KILL_BUTTON "KILL caused by KILL button/pin"
259 
260 // temperature.cpp strings
261 #define MSG_PID_AUTOTUNE "PID Autotune"
262 #define MSG_PID_AUTOTUNE_START MSG_PID_AUTOTUNE " start"
263 #define MSG_PID_AUTOTUNE_FAILED MSG_PID_AUTOTUNE " failed!"
264 #define MSG_PID_BAD_EXTRUDER_NUM MSG_PID_AUTOTUNE_FAILED " Bad extruder number"
265 #define MSG_PID_TEMP_TOO_HIGH MSG_PID_AUTOTUNE_FAILED " Temperature too high"
266 #define MSG_PID_TIMEOUT MSG_PID_AUTOTUNE_FAILED " timeout"
267 #define MSG_BIAS " bias: "
268 #define MSG_D " d: "
269 #define MSG_T_MIN " min: "
270 #define MSG_T_MAX " max: "
271 #define MSG_KU " Ku: "
272 #define MSG_TU " Tu: "
273 #define MSG_CLASSIC_PID " Classic PID "
274 #define MSG_KP " Kp: "
275 #define MSG_KI " Ki: "
276 #define MSG_KD " Kd: "
277 #define MSG_AT " @:"
278 #define MSG_PID_AUTOTUNE_FINISHED MSG_PID_AUTOTUNE " finished! Put the last Kp, Ki and Kd constants from below into Configuration.h"
279 #define MSG_PID_DEBUG " PID_DEBUG "
280 #define MSG_PID_DEBUG_INPUT ": Input "
281 #define MSG_PID_DEBUG_OUTPUT " Output "
282 #define MSG_PID_DEBUG_PTERM " pTerm "
283 #define MSG_PID_DEBUG_ITERM " iTerm "
284 #define MSG_PID_DEBUG_DTERM " dTerm "
285 #define MSG_PID_DEBUG_CTERM " cTerm "
286 #define MSG_INVALID_EXTRUDER_NUM " - Invalid extruder number !"
287 
288 #define MSG_HEATER_BED "bed"
289 #define MSG_HEATER_CHAMBER "chamber"
290 
291 #define MSG_STOPPED_HEATER ", system stopped! Heater_ID: "
292 #define MSG_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !"
293 #define MSG_T_HEATING_FAILED "Heating failed"
294 #define MSG_T_THERMAL_RUNAWAY "Thermal Runaway"
295 #define MSG_T_MAXTEMP "MAXTEMP triggered"
296 #define MSG_T_MINTEMP "MINTEMP triggered"
297 #define MSG_ERR_PROBING_FAILED "Probing Failed"
298 #define MSG_ZPROBE_OUT_SER "Z Probe Past Bed"
299 
300 // Debug
301 #define MSG_DEBUG_PREFIX "DEBUG:"
302 #define MSG_DEBUG_OFF "off"
303 #define MSG_DEBUG_ECHO "ECHO"
304 #define MSG_DEBUG_INFO "INFO"
305 #define MSG_DEBUG_ERRORS "ERRORS"
306 #define MSG_DEBUG_DRYRUN "DRYRUN"
307 #define MSG_DEBUG_COMMUNICATION "COMMUNICATION"
308 #define MSG_DEBUG_LEVELING "LEVELING"
309 
310 // LCD Menu Messages
311 
312 #define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h)
313 #define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M)
314 
315 #define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h)
316 #define LANGUAGE_INCL(M) LANGUAGE_INCL_(M)
317 
318 // Never translate these strings
319 #define MSG_X "X"
320 #define MSG_Y "Y"
321 #define MSG_Z "Z"
322 #define MSG_E "E"
323 #if IS_KINEMATIC
324  #define MSG_A "A"
325  #define MSG_B "B"
326  #define MSG_C "C"
327 #else
328  #define MSG_A "X"
329  #define MSG_B "Y"
330  #define MSG_C "Z"
331 #endif
332 #define MSG_X2 "X2"
333 #define MSG_Y2 "Y2"
334 #define MSG_Z2 "Z2"
335 #define MSG_Z3 "Z3"
336 
337 #define LCD_STR_A MSG_A
338 #define LCD_STR_B MSG_B
339 #define LCD_STR_C MSG_C
340 #define LCD_STR_E MSG_E
341 
342 /**
343  * Tool indexes for LCD display only
344  *
345  * By convention the LCD shows "E1" for the first extruder.
346  * However, internal to Marlin E0/T0 is the first tool, and
347  * most board silkscreens say "E0." Zero-based labels will
348  * make these indexes consistent but this defies expectation.
349  *
350  */
351 #if ENABLED(NUMBER_TOOLS_FROM_0)
352  #define LCD_STR_N0 "0"
353  #define LCD_STR_N1 "1"
354  #define LCD_STR_N2 "2"
355  #define LCD_STR_N3 "3"
356  #define LCD_STR_N4 "4"
357  #define LCD_STR_N5 "5"
358 #else
359  #define LCD_STR_N0 "1"
360  #define LCD_STR_N1 "2"
361  #define LCD_STR_N2 "3"
362  #define LCD_STR_N3 "4"
363  #define LCD_STR_N4 "5"
364  #define LCD_STR_N5 "6"
365 #endif
366 
367 #define LCD_STR_E0 "E" LCD_STR_N0
368 #define LCD_STR_E1 "E" LCD_STR_N1
369 #define LCD_STR_E2 "E" LCD_STR_N2
370 #define LCD_STR_E3 "E" LCD_STR_N3
371 #define LCD_STR_E4 "E" LCD_STR_N4
372 #define LCD_STR_E5 "E" LCD_STR_N5
373 
374 #include "multi_language.h" // Allow multiple languages
375 
376 #include "../lcd/language/language_en.h"
377 #include LANGUAGE_INCL(LCD_LANGUAGE)
378 #include LANGUAGE_INCL(LCD_LANGUAGE_2)
379 #include LANGUAGE_INCL(LCD_LANGUAGE_3)
380 #include LANGUAGE_INCL(LCD_LANGUAGE_4)
381 #include LANGUAGE_INCL(LCD_LANGUAGE_5)
382 
383 #if NONE(DISPLAY_CHARSET_ISO10646_1, \
384  DISPLAY_CHARSET_ISO10646_5, \
385  DISPLAY_CHARSET_ISO10646_KANA, \
386  DISPLAY_CHARSET_ISO10646_GREEK, \
387  DISPLAY_CHARSET_ISO10646_CN, \
388  DISPLAY_CHARSET_ISO10646_TR, \
389  DISPLAY_CHARSET_ISO10646_PL, \
390  DISPLAY_CHARSET_ISO10646_CZ, \
391  DISPLAY_CHARSET_ISO10646_SK)
392  #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
393 #endif
multi_language.h