Explorar el Código

Translatable Strings for ubl_G29 (#6990)

Tannoo hace 7 años
padre
commit
731c8e6372
Se han modificado 2 ficheros con 44 adiciones y 11 borrados
  1. 33
    0
      Marlin/language_en.h
  2. 11
    11
      Marlin/ubl_G29.cpp

+ 33
- 0
Marlin/language_en.h Ver fichero

@@ -156,11 +156,17 @@
156 156
 #ifndef MSG_LEVEL_BED
157 157
   #define MSG_LEVEL_BED                       _UxGT("Level bed")
158 158
 #endif
159
+#ifndef MSG_EDITING_STOPPED
160
+  #define MSG_EDITING_STOPPED                 _UxGT("Mesh Editing Stopped")
161
+#endif
159 162
 #ifndef MSG_USER_MENU
160 163
   #define MSG_USER_MENU                       _UxGT("Custom Commands")
161 164
 #endif
162 165
 
163 166
 #if ENABLED(AUTO_BED_LEVELING_UBL)
167
+  #ifndef MSG_UBL_DOING_G29
168
+    #define MSG_UBL_DOING_G29                 _UxGT("Doing G29 UBL!")
169
+  #endif
164 170
   #ifndef MSG_UBL_UNHOMED
165 171
     #define MSG_UBL_UNHOMED                   _UxGT("Home XYZ first")
166 172
   #endif
@@ -173,6 +179,18 @@
173 179
   #ifndef MSG_UBL_MANUAL_MESH
174 180
     #define MSG_UBL_MANUAL_MESH               _UxGT("Manually Build Mesh")
175 181
   #endif
182
+  #ifndef MSG_UBL_BC_INSERT
183
+    #define MSG_UBL_BC_INSERT                 _UxGT("Place shim & measure")
184
+  #endif
185
+  #ifndef MSG_UBL_BC_INSERT2
186
+    #define MSG_UBL_BC_INSERT2                _UxGT("Measure")
187
+  #endif 
188
+  #ifndef MSG_UBL_BC_REMOVE
189
+    #define MSG_UBL_BC_REMOVE                 _UxGT("Remove & measure bed")
190
+  #endif
191
+  #ifndef MSG_UBL_MOVING_TO_NEXT
192
+    #define MSG_UBL_MOVING_TO_NEXT            _UxGT("Moving to next")
193
+  #endif
176 194
   #ifndef MSG_UBL_ACTIVATE_MESH
177 195
     #define MSG_UBL_ACTIVATE_MESH             _UxGT("Activate UBL")
178 196
   #endif
@@ -194,6 +212,12 @@
194 212
   #ifndef MSG_UBL_EDIT_CUSTOM_MESH
195 213
     #define MSG_UBL_EDIT_CUSTOM_MESH          _UxGT("Edit Custom Mesh")
196 214
   #endif
215
+  #ifndef MSG_UBL_FINE_TUNE_MESH
216
+    #define MSG_UBL_FINE_TUNE_MESH            _UxGT("Fine Tuning Mesh")
217
+  #endif
218
+  #ifndef MSG_UBL_DONE_EDITING_MESH
219
+    #define MSG_UBL_DONE_EDITING_MESH         _UxGT("Done Editing Mesh")
220
+  #endif
197 221
   #ifndef MSG_UBL_BUILD_CUSTOM_MESH
198 222
     #define MSG_UBL_BUILD_CUSTOM_MESH         _UxGT("Build Custom Mesh")
199 223
   #endif
@@ -299,6 +323,15 @@
299 323
   #ifndef MSG_UBL_SAVE_MESH
300 324
     #define MSG_UBL_SAVE_MESH                 _UxGT("Save Bed Mesh")
301 325
   #endif
326
+  #ifndef MSG_UBL_SAVE_ERROR
327
+    #define MSG_UBL_SAVE_ERROR                _UxGT("save_UBL_active() error")
328
+  #endif
329
+  #ifndef MSG_UBL_RESTORE_ERROR
330
+    #define MSG_UBL_RESTORE_ERROR             _UxGT("restore_UBL_active() error")
331
+  #endif
332
+  #ifndef MSG_UBL_Z_OFFSET_STOPPED
333
+    #define MSG_UBL_Z_OFFSET_STOPPED          _UxGT("Z-Offset Stopped")
334
+  #endif
302 335
 #endif  // AUTO_BED_LEVELING_UBL
303 336
 
304 337
 #ifndef MSG_MOVING

+ 11
- 11
Marlin/ubl_G29.cpp Ver fichero

@@ -713,7 +713,7 @@
713 713
           if (ELAPSED(millis(), nxt)) {
714 714
             SERIAL_PROTOCOLLNPGM("\nZ-Offset Adjustment Stopped.");
715 715
             do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
716
-            LCD_MESSAGEPGM("Z-Offset Stopped"); // TODO: Make translatable string
716
+            LCD_MESSAGEPGM(MSG_UBL_Z_OFFSET_STOPPED);
717 717
             restore_ubl_active_state_and_leave();
718 718
             goto LEAVE;
719 719
           }
@@ -971,7 +971,7 @@
971 971
       stepper.synchronize();
972 972
 
973 973
       SERIAL_PROTOCOLPGM("Place shim under nozzle");
974
-      LCD_MESSAGEPGM("Place shim & measure"); // TODO: Make translatable string
974
+      LCD_MESSAGEPGM(MSG_UBL_BC_INSERT);
975 975
       lcd_return_to_status();
976 976
       echo_and_take_a_measurement();
977 977
 
@@ -980,7 +980,7 @@
980 980
       stepper.synchronize();
981 981
 
982 982
       SERIAL_PROTOCOLPGM("Remove shim");
983
-      LCD_MESSAGEPGM("Remove & measure bed"); // TODO: Make translatable string
983
+      LCD_MESSAGEPGM(MSG_UBL_BC_REMOVE);
984 984
       echo_and_take_a_measurement();
985 985
 
986 986
       const float z2 = measure_point_with_encoder();
@@ -1029,7 +1029,7 @@
1029 1029
 
1030 1030
         do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
1031 1031
 
1032
-        LCD_MESSAGEPGM("Moving to next"); // TODO: Make translatable string
1032
+        LCD_MESSAGEPGM(MSG_UBL_MOVING_TO_NEXT);
1033 1033
 
1034 1034
         do_blocking_move_to_xy(xProbe, yProbe);
1035 1035
         do_blocking_move_to_z(z_clearance);
@@ -1039,7 +1039,7 @@
1039 1039
 
1040 1040
         if (do_ubl_mesh_map) display_map(g29_map_type);  // show user where we're probing
1041 1041
 
1042
-        serialprintPGM(parser.seen('B') ? PSTR("Place shim & measure") : PSTR("Measure")); // TODO: Make translatable strings
1042
+        serialprintPGM(parser.seen('B') ? PSTR(MSG_UBL_BC_INSERT) : PSTR(MSG_UBL_BC_INSERT2));
1043 1043
 
1044 1044
         const float z_step = 0.01;                                        // existing behavior: 0.01mm per click, occasionally step
1045 1045
         //const float z_step = 1.0 / planner.axis_steps_per_mm[Z_AXIS];   // approx one step each click
@@ -1097,7 +1097,7 @@
1097 1097
     bool err_flag = false;
1098 1098
 
1099 1099
     #if ENABLED(NEWPANEL)
1100
-      LCD_MESSAGEPGM("Doing G29 UBL!"); // TODO: Make translatable string
1100
+      LCD_MESSAGEPGM(MSG_UBL_DOING_G29);
1101 1101
       lcd_quick_feedback();
1102 1102
     #endif
1103 1103
 
@@ -1207,7 +1207,7 @@
1207 1207
       SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row.");
1208 1208
 
1209 1209
       #if ENABLED(NEWPANEL)
1210
-        LCD_MESSAGEPGM("save_UBL_active() error"); // TODO: Make translatable string
1210
+        LCD_MESSAGEPGM(MSG_UBL_SAVE_ERROR);
1211 1211
         lcd_quick_feedback();
1212 1212
       #endif
1213 1213
 
@@ -1222,7 +1222,7 @@
1222 1222
       SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times.");
1223 1223
 
1224 1224
       #if ENABLED(NEWPANEL)
1225
-        LCD_MESSAGEPGM("restore_UBL_active() error"); // TODO: Make translatable string
1225
+        LCD_MESSAGEPGM(MSG_UBL_RESTORE_ERROR);
1226 1226
         lcd_quick_feedback();
1227 1227
       #endif
1228 1228
 
@@ -1476,7 +1476,7 @@
1476 1476
 
1477 1477
       memset(not_done, 0xFF, sizeof(not_done));
1478 1478
 
1479
-      LCD_MESSAGEPGM("Fine Tuning Mesh"); // TODO: Make translatable string
1479
+      LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH);
1480 1480
 
1481 1481
       do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
1482 1482
       do_blocking_move_to_xy(lx, ly);
@@ -1538,7 +1538,7 @@
1538 1538
             lcd_return_to_status();
1539 1539
             //SERIAL_PROTOCOLLNPGM("\nFine Tuning of Mesh Stopped.");
1540 1540
             do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
1541
-            LCD_MESSAGEPGM("Mesh Editing Stopped"); // TODO: Make translatable string
1541
+            LCD_MESSAGEPGM(MSG_EDITING_STOPPED);
1542 1542
 
1543 1543
             while (ubl_lcd_clicked()) idle();
1544 1544
 
@@ -1565,7 +1565,7 @@
1565 1565
 
1566 1566
       do_blocking_move_to_xy(lx, ly);
1567 1567
 
1568
-      LCD_MESSAGEPGM("Done Editing Mesh"); // TODO: Make translatable string
1568
+      LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH);
1569 1569
       SERIAL_ECHOLNPGM("Done Editing Mesh");
1570 1570
     }
1571 1571
   #endif

Loading…
Cancelar
Guardar