Browse Source

More translatable LCD strings (#15190)

Ludy 4 years ago
parent
commit
068c303742

+ 1
- 1
Marlin/src/feature/tmc_util.cpp View File

@@ -1118,7 +1118,7 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
1118 1118
     #endif
1119 1119
   }
1120 1120
 
1121
-  if (axis_connection) ui.set_status_P(PSTR("TMC CONNECTION ERROR"));
1121
+  if (axis_connection) ui.set_status_P(PSTR(MSG_ERROR_TMC));
1122 1122
 }
1123 1123
 
1124 1124
 #endif // HAS_TRINAMIC

+ 7
- 7
Marlin/src/gcode/bedlevel/G26.cpp View File

@@ -168,7 +168,7 @@ int8_t g26_prime_flag;
168 168
    */
169 169
   bool user_canceled() {
170 170
     if (!ui.button_pressed()) return false; // Return if the button isn't pressed
171
-    ui.set_status_P(PSTR("Mesh Validation Stopped."), 99);
171
+    ui.set_status_P(PSTR(MSG_G26_CANCELED), 99);
172 172
     #if HAS_LCD_MENU
173 173
       ui.quick_feedback();
174 174
     #endif
@@ -386,7 +386,7 @@ inline bool turn_on_heaters() {
386 386
 
387 387
     if (g26_bed_temp > 25) {
388 388
       #if HAS_SPI_LCD
389
-        ui.set_status_P(PSTR("G26 Heating Bed."), 99);
389
+        ui.set_status_P(PSTR(MSG_G26_HEATING_BED), 99);
390 390
         ui.quick_feedback();
391 391
         #if HAS_LCD_MENU
392 392
           ui.capture();
@@ -407,7 +407,7 @@ inline bool turn_on_heaters() {
407 407
 
408 408
   // Start heating the active nozzle
409 409
   #if HAS_SPI_LCD
410
-    ui.set_status_P(PSTR("G26 Heating Nozzle."), 99);
410
+    ui.set_status_P(PSTR(MSG_G26_HEATING_NOZZLE), 99);
411 411
     ui.quick_feedback();
412 412
   #endif
413 413
   thermalManager.setTargetHotend(g26_hotend_temp, active_extruder);
@@ -441,7 +441,7 @@ inline bool prime_nozzle() {
441 441
     if (g26_prime_flag == -1) {  // The user wants to control how much filament gets purged
442 442
 
443 443
       ui.capture();
444
-      ui.set_status_P(PSTR("User-Controlled Prime"), 99);
444
+      ui.set_status_P(PSTR(MSG_G26_MANUAL_PRIME), 99);
445 445
       ui.chirp();
446 446
 
447 447
       set_destination_from_current();
@@ -465,7 +465,7 @@ inline bool prime_nozzle() {
465 465
 
466 466
       ui.wait_for_release();
467 467
 
468
-      ui.set_status_P(PSTR("Done Priming"), 99);
468
+      ui.set_status_P(PSTR(MSG_G26_PRIME_DONE), 99);
469 469
       ui.quick_feedback();
470 470
       ui.release();
471 471
     }
@@ -473,7 +473,7 @@ inline bool prime_nozzle() {
473 473
   #endif
474 474
   {
475 475
     #if HAS_SPI_LCD
476
-      ui.set_status_P(PSTR("Fixed Length Prime."), 99);
476
+      ui.set_status_P(PSTR(MSG_G26_FIXED_LENGTH), 99);
477 477
       ui.quick_feedback();
478 478
     #endif
479 479
     set_destination_from_current();
@@ -852,7 +852,7 @@ void GcodeSuite::G26() {
852 852
   } while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0);
853 853
 
854 854
   LEAVE:
855
-  ui.set_status_P(PSTR("Leaving G26"), -1);
855
+  ui.set_status_P(PSTR(MSG_G26_LEAVING), -1);
856 856
 
857 857
   retract_filament(destination);
858 858
   destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;

+ 2
- 2
Marlin/src/lcd/extensible_ui/lib/dgus/DGUSDisplay.cpp View File

@@ -289,11 +289,11 @@ void DGUSScreenVariableHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable
289 289
 
290 290
     // Don't let the user in the dark why there is no reaction.
291 291
     if (!ExtUI::isMediaInserted()) {
292
-       setstatusmessagePGM(PSTR("No SD Card"));
292
+       setstatusmessagePGM(PSTR(MSG_NO_MEDIA));
293 293
        return;
294 294
     }
295 295
     if (card.flag.abort_sd_printing) {
296
-       setstatusmessagePGM(PSTR("Aborting..."));
296
+       setstatusmessagePGM(PSTR(MSG_MEDIA_ABORTING));
297 297
        return;
298 298
     }
299 299
   }

+ 18
- 4
Marlin/src/lcd/language/language_de.h View File

@@ -37,9 +37,14 @@
37 37
 #define MSG_YES                             _UxGT("JA")
38 38
 #define MSG_NO                              _UxGT("NEIN")
39 39
 #define MSG_BACK                            _UxGT("Zurück")
40
+#define MSG_MEDIA_ABORTING                  _UxGT("Abbruch...")
40 41
 #define MSG_MEDIA_INSERTED                  _UxGT("Medium erkannt")
41 42
 #define MSG_MEDIA_REMOVED                   _UxGT("Medium entfernt")
42
-#define MSG_MEDIA_RELEASED                  _UxGT("Medium freigeg.")
43
+#define MSG_MEDIA_RELEASED                  _UxGT("Medium freigegeben")
44
+#define MSG_MEDIA_WAITING                   _UxGT("Warten auf Medium")
45
+#define MSG_MEDIA_READ_ERROR                _UxGT("Medium Lesefehler")
46
+#define MSG_MEDIA_USB_REMOVED               _UxGT("USB Gerät entfernt")
47
+#define MSG_MEDIA_USB_FAILED                _UxGT("USB Start fehlge.")
43 48
 #define MSG_LCD_ENDSTOPS                    _UxGT("Endstopp") // Max length 8 characters
44 49
 #define MSG_LCD_SOFT_ENDSTOPS               _UxGT("Software-Endstopp")
45 50
 #define MSG_MAIN                            _UxGT("Hauptmenü")
@@ -94,6 +99,7 @@
94 99
 #define MSG_LEVEL_BED                       _UxGT("Bett nivellieren")
95 100
 #define MSG_LEVEL_CORNERS                   _UxGT("Ecken nivellieren")
96 101
 #define MSG_NEXT_CORNER                     _UxGT("Nächste Ecke")
102
+#define MSG_MESH_EDITOR                     _UxGT("Netz Editor")
97 103
 #define MSG_EDIT_MESH                       _UxGT("Netz bearbeiten")
98 104
 #define MSG_EDITING_STOPPED                 _UxGT("Netzbearb. angeh.")
99 105
 #define MSG_PROBING_MESH                    _UxGT("Messpunkt")
@@ -144,6 +150,12 @@
144 150
 #define MSG_UBL_VALIDATE_MESH_M1            _UxGT(PREHEAT_1_LABEL " Netz validieren")
145 151
 #define MSG_UBL_VALIDATE_MESH_M2            _UxGT(PREHEAT_2_LABEL " Netz validieren")
146 152
 #define MSG_UBL_VALIDATE_CUSTOM_MESH        _UxGT("Eig. Netz validieren")
153
+#define MSG_G26_HEATING_NOZZLE              _UxGT("G26 Heating Nozzle")
154
+#define MSG_G26_HEATING_BED                 _UxGT("G26 heizt Bett")
155
+#define MSG_G26_FIXED_LENGTH                _UxGT("Feste Länge Prime")
156
+#define MSG_G26_PRIME_DONE                  _UxGT("Priming fertig")
157
+#define MSG_G26_CANCELED                    _UxGT("G26 abgebrochen")
158
+#define MSG_G26_LEAVING                     _UxGT("G26 verlassen")
147 159
 #define MSG_UBL_CONTINUE_MESH               _UxGT("Netzerst. forts.")
148 160
 #define MSG_UBL_MESH_LEVELING               _UxGT("Netz-Nivellierung")
149 161
 #define MSG_UBL_3POINT_MESH_LEVELING        _UxGT("3-Punkt-Nivell.")
@@ -173,6 +185,7 @@
173 185
 #define MSG_UBL_NO_STORAGE                  _UxGT("Kein Speicher")
174 186
 #define MSG_UBL_SAVE_ERROR                  _UxGT("Err:UBL speichern")
175 187
 #define MSG_UBL_RESTORE_ERROR               _UxGT("Err:UBL wiederherst.")
188
+#define MSG_UBL_Z_OFFSET                    _UxGT("Z-Versatz: ")
176 189
 #define MSG_UBL_Z_OFFSET_STOPPED            _UxGT("Z-Versatz angehalten")
177 190
 #define MSG_UBL_STEP_BY_STEP_MENU           _UxGT("Schrittweises UBL")
178 191
 
@@ -296,7 +309,7 @@
296 309
 #define MSG_STOP_PRINT                      _UxGT("SD-Druck abbrechen")
297 310
 #define MSG_OUTAGE_RECOVERY                 _UxGT("Wiederh. n. Stroma.")
298 311
 #define MSG_MEDIA_MENU                      _UxGT("Druck vom Medium")
299
-#define MSG_NO_MEDIA                        _UxGT("Keine Medium")
312
+#define MSG_NO_MEDIA                        _UxGT("Kein Medium")
300 313
 #define MSG_DWELL                           _UxGT("Warten...")
301 314
 #define MSG_USERWAIT                        _UxGT("Klick zum Fortsetzen")
302 315
 #define MSG_PRINT_PAUSED                    _UxGT("Druck pausiert...")
@@ -377,8 +390,8 @@
377 390
 #define MSG_SHORT_DAY                       _UxGT("t") // One character only
378 391
 #define MSG_SHORT_HOUR                      _UxGT("h") // One character only
379 392
 #define MSG_SHORT_MINUTE                    _UxGT("m") // One character only
380
-#define MSG_HEATING                         _UxGT("Extr. heizt...")
381
-#define MSG_COOLING                         _UxGT("Extr. kühlt...")
393
+#define MSG_HEATING                         _UxGT("heizt...")
394
+#define MSG_COOLING                         _UxGT("kühlt...")
382 395
 #define MSG_BED_HEATING                     _UxGT("Bett heizt...")
383 396
 #define MSG_BED_COOLING                     _UxGT("Bett kühlt...")
384 397
 #define MSG_CHAMBER_HEATING                 _UxGT("Gehäuse heizt...")
@@ -432,6 +445,7 @@
432 445
 #define MSG_INFO_PSU                        _UxGT("Netzteil")
433 446
 #define MSG_DRIVE_STRENGTH                  _UxGT("Motorleistung")
434 447
 #define MSG_DAC_PERCENT                     _UxGT("Treiber %")
448
+#define MSG_ERROR_TMC                       _UxGT("TMC Verbindungsfehler")
435 449
 #define MSG_DAC_EEPROM_WRITE                _UxGT("Werte speichern")
436 450
 #define MSG_FILAMENT_CHANGE_HEADER_PAUSE    _UxGT("DRUCK PAUSIERT")
437 451
 #define MSG_FILAMENT_CHANGE_HEADER_LOAD     _UxGT("FILAMENT LADEN")

+ 45
- 0
Marlin/src/lcd/language/language_en.h View File

@@ -61,6 +61,9 @@
61 61
 #ifndef MSG_BACK
62 62
   #define MSG_BACK                            _UxGT("Back")
63 63
 #endif
64
+#ifndef MSG_MEDIA_ABORTING
65
+  #define MSG_MEDIA_ABORTING                  _UxGT("Aborting...")
66
+#endif
64 67
 #ifndef MSG_MEDIA_INSERTED
65 68
   #define MSG_MEDIA_INSERTED                  _UxGT("Media Inserted")
66 69
 #endif
@@ -70,6 +73,18 @@
70 73
 #ifndef MSG_MEDIA_RELEASED
71 74
   #define MSG_MEDIA_RELEASED                  _UxGT("Media Released")
72 75
 #endif
76
+#ifndef MSG_MEDIA_WAITING
77
+  #define MSG_MEDIA_WAITING                   _UxGT("Waiting for media")
78
+#endif
79
+#ifndef MSG_MEDIA_READ_ERROR
80
+  #define MSG_MEDIA_READ_ERROR                _UxGT("Media read error")
81
+#endif
82
+#ifndef MSG_MEDIA_USB_REMOVED
83
+  #define MSG_MEDIA_USB_REMOVED               _UxGT("USB device removed")
84
+#endif
85
+#ifndef MSG_MEDIA_USB_FAILED
86
+  #define MSG_MEDIA_USB_FAILED                _UxGT("USB start failed")
87
+#endif
73 88
 #ifndef MSG_LCD_ENDSTOPS
74 89
   #define MSG_LCD_ENDSTOPS                    _UxGT("Endstops") // Max length 8 characters
75 90
 #endif
@@ -232,6 +247,9 @@
232 247
 #ifndef MSG_NEXT_CORNER
233 248
   #define MSG_NEXT_CORNER                     _UxGT("Next Corner")
234 249
 #endif
250
+#ifndef MSG_MESH_EDITOR
251
+  #define MSG_MESH_EDITOR                     _UxGT("Mesh Editor")
252
+#endif
235 253
 #ifndef MSG_EDIT_MESH
236 254
   #define MSG_EDIT_MESH                       _UxGT("Edit Mesh")
237 255
 #endif
@@ -382,6 +400,27 @@
382 400
 #ifndef MSG_UBL_VALIDATE_CUSTOM_MESH
383 401
   #define MSG_UBL_VALIDATE_CUSTOM_MESH        _UxGT("Validate Custom Mesh")
384 402
 #endif
403
+#ifndef MSG_G26_HEATING_BED
404
+  #define MSG_G26_HEATING_BED                 _UxGT("G26 Heating Bed")
405
+#endif
406
+#ifndef MSG_G26_HEATING_NOZZLE
407
+  #define MSG_G26_HEATING_NOZZLE              _UxGT("G26 Heating Nozzle")
408
+#endif
409
+#ifndef MSG_G26_MANUAL_PRIME
410
+  #define MSG_G26_MANUAL_PRIME                _UxGT("Manual priming...")
411
+#endif
412
+#ifndef MSG_G26_FIXED_LENGTH
413
+  #define MSG_G26_FIXED_LENGTH                _UxGT("Fixed Length Prime")
414
+#endif
415
+#ifndef MSG_G26_PRIME_DONE
416
+  #define MSG_G26_PRIME_DONE                  _UxGT("Done Priming")
417
+#endif
418
+#ifndef MSG_G26_CANCELED
419
+  #define MSG_G26_CANCELED                    _UxGT("G26 Canceled")
420
+#endif
421
+#ifndef MSG_G26_LEAVING
422
+  #define MSG_G26_LEAVING                     _UxGT("Leaving G26")
423
+#endif
385 424
 #ifndef MSG_UBL_CONTINUE_MESH
386 425
   #define MSG_UBL_CONTINUE_MESH               _UxGT("Continue Bed Mesh")
387 426
 #endif
@@ -469,6 +508,9 @@
469 508
 #ifndef MSG_UBL_RESTORE_ERROR
470 509
   #define MSG_UBL_RESTORE_ERROR               _UxGT("Err: UBL Restore")
471 510
 #endif
511
+#ifndef MSG_UBL_Z_OFFSET
512
+  #define MSG_UBL_Z_OFFSET                    _UxGT("Z-Offset: ")
513
+#endif
472 514
 #ifndef MSG_UBL_Z_OFFSET_STOPPED
473 515
   #define MSG_UBL_Z_OFFSET_STOPPED            _UxGT("Z-Offset Stopped")
474 516
 #endif
@@ -1217,6 +1259,9 @@
1217 1259
 #ifndef MSG_DAC_PERCENT
1218 1260
   #define MSG_DAC_PERCENT                     _UxGT("Driver %")
1219 1261
 #endif
1262
+#ifndef MSG_ERROR_TMC
1263
+  #define MSG_ERROR_TMC                       _UxGT("TMC CONNECTION ERROR")
1264
+#endif
1220 1265
 #ifndef MSG_DAC_EEPROM_WRITE
1221 1266
   #define MSG_DAC_EEPROM_WRITE                _UxGT("DAC EEPROM Write")
1222 1267
 #endif

+ 2
- 2
Marlin/src/lcd/menu/menu_ubl.cpp View File

@@ -79,7 +79,7 @@ void _lcd_mesh_edit_NOP() {
79 79
 float lcd_mesh_edit() {
80 80
   ui.goto_screen(_lcd_mesh_edit_NOP);
81 81
   ui.refresh(LCDVIEW_CALL_REDRAW_NEXT);
82
-  _lcd_mesh_fine_tune(PSTR("Mesh Editor"));
82
+  _lcd_mesh_fine_tune(PSTR(MSG_MESH_EDITOR));
83 83
   return mesh_edit_value;
84 84
 }
85 85
 
@@ -89,7 +89,7 @@ void lcd_mesh_edit_setup(const float &initial) {
89 89
 }
90 90
 
91 91
 void _lcd_z_offset_edit() {
92
-  _lcd_mesh_fine_tune(PSTR("Z-Offset: "));
92
+  _lcd_mesh_fine_tune(PSTR(MSG_UBL_Z_OFFSET));
93 93
 }
94 94
 
95 95
 float lcd_z_offset_edit() {

+ 5
- 5
Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp View File

@@ -117,7 +117,7 @@ bool Sd2Card::usbStartup() {
117 117
     if (!UHS_START) {
118 118
       SERIAL_ECHOLNPGM(" failed.");
119 119
       #if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
120
-        LCD_MESSAGEPGM("USB start failed");
120
+        LCD_MESSAGEPGM(MSG_MEDIA_USB_FAILED);
121 121
       #endif
122 122
       return false;
123 123
     }
@@ -214,7 +214,7 @@ void Sd2Card::idle() {
214 214
             SERIAL_ECHOLNPGM("Waiting for media");
215 215
           #endif
216 216
           #if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
217
-            LCD_MESSAGEPGM("Waiting for media");
217
+            LCD_MESSAGEPGM(MSG_MEDIA_WAITING);
218 218
           #endif
219 219
           GOTO_STATE_AFTER_DELAY(state, 2000);
220 220
         }
@@ -231,7 +231,7 @@ void Sd2Card::idle() {
231 231
       #endif
232 232
       #if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
233 233
         if (state != MEDIA_READY)
234
-          LCD_MESSAGEPGM("USB device removed");
234
+          LCD_MESSAGEPGM(MSG_MEDIA_USB_REMOVED);
235 235
       #endif
236 236
       GOTO_STATE_AFTER_DELAY( WAIT_FOR_DEVICE, 0 );
237 237
     }
@@ -242,14 +242,14 @@ void Sd2Card::idle() {
242 242
         SERIAL_ECHOLNPGM("Media removed");
243 243
       #endif
244 244
       #if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
245
-        LCD_MESSAGEPGM("Media removed");
245
+        LCD_MESSAGEPGM(MSG_MEDIA_REMOVED);
246 246
       #endif
247 247
       GOTO_STATE_AFTER_DELAY( WAIT_FOR_DEVICE, 0 );
248 248
     }
249 249
 
250 250
     else if (task_state == UHS_STATE(ERROR)) {
251 251
         #if EITHER(ULTRA_LCD, EXTENSIBLE_UI)
252
-          LCD_MESSAGEPGM("Media read error");
252
+          LCD_MESSAGEPGM(MSG_MEDIA_READ_ERROR);
253 253
         #endif
254 254
         GOTO_STATE_AFTER_DELAY( MEDIA_ERROR, 0 );
255 255
     }

Loading…
Cancel
Save