浏览代码

Translatable Strings for ubl_G29 (#6990)

Tannoo 8 年前
父节点
当前提交
731c8e6372
共有 2 个文件被更改,包括 44 次插入11 次删除
  1. 33
    0
      Marlin/language_en.h
  2. 11
    11
      Marlin/ubl_G29.cpp

+ 33
- 0
Marlin/language_en.h 查看文件

156
 #ifndef MSG_LEVEL_BED
156
 #ifndef MSG_LEVEL_BED
157
   #define MSG_LEVEL_BED                       _UxGT("Level bed")
157
   #define MSG_LEVEL_BED                       _UxGT("Level bed")
158
 #endif
158
 #endif
159
+#ifndef MSG_EDITING_STOPPED
160
+  #define MSG_EDITING_STOPPED                 _UxGT("Mesh Editing Stopped")
161
+#endif
159
 #ifndef MSG_USER_MENU
162
 #ifndef MSG_USER_MENU
160
   #define MSG_USER_MENU                       _UxGT("Custom Commands")
163
   #define MSG_USER_MENU                       _UxGT("Custom Commands")
161
 #endif
164
 #endif
162
 
165
 
163
 #if ENABLED(AUTO_BED_LEVELING_UBL)
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
   #ifndef MSG_UBL_UNHOMED
170
   #ifndef MSG_UBL_UNHOMED
165
     #define MSG_UBL_UNHOMED                   _UxGT("Home XYZ first")
171
     #define MSG_UBL_UNHOMED                   _UxGT("Home XYZ first")
166
   #endif
172
   #endif
173
   #ifndef MSG_UBL_MANUAL_MESH
179
   #ifndef MSG_UBL_MANUAL_MESH
174
     #define MSG_UBL_MANUAL_MESH               _UxGT("Manually Build Mesh")
180
     #define MSG_UBL_MANUAL_MESH               _UxGT("Manually Build Mesh")
175
   #endif
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
   #ifndef MSG_UBL_ACTIVATE_MESH
194
   #ifndef MSG_UBL_ACTIVATE_MESH
177
     #define MSG_UBL_ACTIVATE_MESH             _UxGT("Activate UBL")
195
     #define MSG_UBL_ACTIVATE_MESH             _UxGT("Activate UBL")
178
   #endif
196
   #endif
194
   #ifndef MSG_UBL_EDIT_CUSTOM_MESH
212
   #ifndef MSG_UBL_EDIT_CUSTOM_MESH
195
     #define MSG_UBL_EDIT_CUSTOM_MESH          _UxGT("Edit Custom Mesh")
213
     #define MSG_UBL_EDIT_CUSTOM_MESH          _UxGT("Edit Custom Mesh")
196
   #endif
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
   #ifndef MSG_UBL_BUILD_CUSTOM_MESH
221
   #ifndef MSG_UBL_BUILD_CUSTOM_MESH
198
     #define MSG_UBL_BUILD_CUSTOM_MESH         _UxGT("Build Custom Mesh")
222
     #define MSG_UBL_BUILD_CUSTOM_MESH         _UxGT("Build Custom Mesh")
199
   #endif
223
   #endif
299
   #ifndef MSG_UBL_SAVE_MESH
323
   #ifndef MSG_UBL_SAVE_MESH
300
     #define MSG_UBL_SAVE_MESH                 _UxGT("Save Bed Mesh")
324
     #define MSG_UBL_SAVE_MESH                 _UxGT("Save Bed Mesh")
301
   #endif
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
 #endif  // AUTO_BED_LEVELING_UBL
335
 #endif  // AUTO_BED_LEVELING_UBL
303
 
336
 
304
 #ifndef MSG_MOVING
337
 #ifndef MSG_MOVING

+ 11
- 11
Marlin/ubl_G29.cpp 查看文件

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

正在加载...
取消
保存