Multi-language support (#15453)

This commit is contained in:
Marcio Teixeira
2019-10-09 18:46:10 -06:00
committed by Scott Lahteine
parent dc14d4a13c
commit 6a865a6146
105 changed files with 11537 additions and 11196 deletions

View File

@@ -87,14 +87,14 @@ void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb
#if HAS_TEMP_HOTEND || HAS_HEATED_BED
#define _PREHEAT_ITEMS(M,N) do{ \
ACTION_ITEM(MSG_PREHEAT_##M##_N LCD_STR_N##N, [](){ _preheat_both(M-1, N); }); \
ACTION_ITEM(MSG_PREHEAT_##M##_END " " LCD_STR_E##N, [](){ _preheat_end(M-1, N); }); \
ACTION_ITEM(MSG_PREHEAT_##M##_H##N, [](){ _preheat_both(M-1, N); }); \
ACTION_ITEM(MSG_PREHEAT_##M##_END_E##N, [](){ _preheat_end(M-1, N); }); \
}while(0)
#if HAS_HEATED_BED
#define PREHEAT_ITEMS(M,N) _PREHEAT_ITEMS(M,N)
#else
#define PREHEAT_ITEMS(M,N) \
ACTION_ITEM(MSG_PREHEAT_##M##_N LCD_STR_N##N, [](){ _preheat_end(M-1, N); })
ACTION_ITEM(MSG_PREHEAT_##M##_H##N, [](){ _preheat_end(M-1, N); })
#endif
void menu_preheat_m1() {
@@ -196,7 +196,7 @@ void menu_temperature() {
#if HOTENDS == 1
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, [](){ thermalManager.start_watching_hotend(0); });
#elif HOTENDS > 1
#define EDIT_TARGET(N) EDIT_ITEM_FAST(int3, MSG_NOZZLE LCD_STR_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, [](){ thermalManager.start_watching_hotend(N); })
#define EDIT_TARGET(N) EDIT_ITEM_FAST(int3, MSG_NOZZLE_##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, [](){ thermalManager.start_watching_hotend(N); })
EDIT_TARGET(0);
EDIT_TARGET(1);
#if HOTENDS > 2
@@ -237,23 +237,23 @@ void menu_temperature() {
#if FAN_COUNT > 0
#if HAS_FAN0
editable.uint8 = thermalManager.fan_speed[0];
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &editable.uint8, 0, 255, [](){ thermalManager.set_fan_speed(0, editable.uint8); });
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED_1, &editable.uint8, 0, 255, [](){ thermalManager.set_fan_speed(0, editable.uint8); });
#if ENABLED(EXTRA_FAN_SPEED)
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255);
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED_1, &thermalManager.new_fan_speed[0], 3, 255);
#endif
#endif
#if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1)
editable.uint8 = thermalManager.fan_speed[1];
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED " 2", &editable.uint8, 0, 255, [](){ thermalManager.set_fan_speed(1, editable.uint8); });
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED_2, &editable.uint8, 0, 255, [](){ thermalManager.set_fan_speed(1, editable.uint8); });
#if ENABLED(EXTRA_FAN_SPEED)
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255);
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED_2, &thermalManager.new_fan_speed[1], 3, 255);
#endif
#endif
#if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2)
editable.uint8 = thermalManager.fan_speed[2];
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED " 3", &editable.uint8, 0, 255, [](){ thermalManager.set_fan_speed(2, editable.uint8); });
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED_3, &editable.uint8, 0, 255, [](){ thermalManager.set_fan_speed(2, editable.uint8); });
#if ENABLED(EXTRA_FAN_SPEED)
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255);
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED_3, &thermalManager.new_fan_speed[2], 3, 255);
#endif
#endif
#endif // FAN_COUNT > 0