Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple choice #4820

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Firmware/messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const char MSG_BED_HEATING[] PROGMEM_I1 = ISTR("Bed Heating"); ////MSG_BED_HEATI
const char MSG_BED_LEVELING_FAILED_POINT_LOW[] PROGMEM_I1 = ISTR("Bed leveling failed. Sensor didn't trigger. Debris on nozzle? Waiting for reset."); ////MSG_BED_LEVELING_FAILED_POINT_LOW c=20 r=6
const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[] PROGMEM_I1 = ISTR("XYZ calibration failed. Please consult the manual."); ////MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED c=20 r=8
const char MSG_BELT_STATUS[] PROGMEM_I1 = ISTR("Belt status");////MSG_BELT_STATUS c=18
const char MSG_EJECT[] PROGMEM_I1 = ISTR("Eject"); ////MSG_EJECT c=8
const char MSG_EJECT[] PROGMEM_I1 = ISTR("Eject"); ////MSG_EJECT c=9
const char MSG_CANCEL[] PROGMEM_I1 = ISTR(">Cancel");////MSG_CANCEL c=10
const char MSG_CALIBRATE_Z_AUTO[] PROGMEM_I1 = ISTR("Calibrating Z"); ////MSG_CALIBRATE_Z_AUTO c=20 r=2
const char MSG_CARD_MENU[] PROGMEM_I1 = ISTR("Print from SD"); ////MSG_CARD_MENU c=18
Expand Down
2 changes: 1 addition & 1 deletion Firmware/mmu2/errors_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static const char MSG_BTN_RETRY[] PROGMEM_I1 = ISTR("Retry"); ////MSG_BTN_RETRY
static const char MSG_BTN_RESET_MMU[] PROGMEM_I1 = ISTR("ResetMMU"); ////MSG_BTN_RESET_MMU c=8
static const char MSG_BTN_UNLOAD[] PROGMEM_I1 = ISTR("Unload"); ////MSG_BTN_UNLOAD c=8
static const char MSG_BTN_LOAD[] PROGMEM_I1 = ISTR("Load"); ////MSG_BTN_LOAD c=8
//static const char MSG_BTN_EJECT[] PROGMEM_I1 = ISTR("Eject"); //Reuse MSG_EJECT c=8
//static const char MSG_BTN_EJECT[] PROGMEM_I1 = ISTR("Eject"); //Reuse MSG_EJECT c=9
//static const char MSG_BTN_TUNE_MMU[] PROGMEM_I1 = ISTR("Tune"); //Reuse MSG_TUNE c=8
static const char MSG_BTN_STOP[] PROGMEM_I1 = ISTR("Stop"); ////MSG_BTN_STOP c=8
static const char MSG_BTN_DISABLE_MMU[] PROGMEM_I1 = ISTR("Disable"); ////MSG_BTN_DISABLE_MMU c=8
Expand Down
18 changes: 16 additions & 2 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2266,11 +2266,25 @@ void show_preheat_nozzle_warning()

void lcd_load_filament_color_check()
{
uint8_t clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), 8);
// The total length of the individual messages MSG_YES c=4, MSG_NO c=4 and MSG_EJECT c=9 with the selectors and spaces between
// exceeds the LCD width.
// 01234567890123456789
// >yyyy >nnnn >eeeeeeee
// As long the translations of MSG_YES, MSG_NO and MSG_EJECT combined length do not exceed 15 chars, we don't have to shorten
// the MSG_EJECT message/translation. We can set the second_col value to the length of the first choice + the selector and space.
// Examples:
// German
// 01234567890123456789
// >Ja >Nein >Auswerfen
// Hungarian
// 01234567890123456789
// >Igen >Nem >Kiadás

uint8_t clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), strlen_P(_T(MSG_YES))+2);
while (clean == LCD_MIDDLE_BUTTON_CHOICE) {
load_filament_final_feed();
st_synchronize();
clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), 8);
clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), strlen_P(_T(MSG_YES))+2);
}
if (clean == LCD_RIGHT_BUTTON_CHOICE) {
unload_filament(FILAMENTCHANGE_FINALRETRACT);
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware.pot
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ msgstr ""
msgid "ERROR:"
msgstr ""

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
msgid "Auto"
msgstr "Auto"

#. MSG_AUTO_HOME c=18

Check notice on line 86 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Translation same as original text
#: ../../Firmware/Marlin_main.cpp:2942 ../../Firmware/messages.cpp:12
#: ../../Firmware/ultralcd.cpp:4533 ../../Firmware/ultralcd.cpp:5500
msgid "Auto home"
Expand Down Expand Up @@ -544,7 +544,7 @@
msgid "F. jam detect"
msgstr "Det. záseku"

#. MSG_FSENSOR_RUNOUT c=13

Check notice on line 547 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Translation same as original text
#: ../../Firmware/messages.cpp:48 ../../Firmware/ultralcd.cpp:4067
#: ../../Firmware/ultralcd.cpp:4074
msgid "F. runout"
Expand All @@ -569,7 +569,7 @@
"Při vyjmutí filamentu se nevypnula FINDA. Zkuste ruční vyjmutí. Ujistěte se,"
" že se filament nezasekl a FINDA funguje."

#. MSG_DESC_FINDA_DIDNT_TRIGGER c=20 r=8

Check notice on line 572 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Differing last punctuation character: (. => ?)
#: ../../Firmware/mmu2/errors_list.h:242 ../../Firmware/mmu2/errors_list.h:298
msgid ""
"FINDA didn't trigger while loading the filament. Ensure the filament can "
Expand Down Expand Up @@ -1170,7 +1170,7 @@
msgid "Mesh"
msgstr "Mesh"

#. MSG_MESH_BED_LEVELING c=18

Check notice on line 1173 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Translation same as original text
#: ../../Firmware/messages.cpp:174 ../../Firmware/ultralcd.cpp:4455
#: ../../Firmware/ultralcd.cpp:4543
msgid "Mesh Bed Leveling"
Expand Down Expand Up @@ -1693,7 +1693,7 @@
msgid "QUEUE FULL"
msgstr "FRONTA PLNA"

#. MSG_RPI_PORT c=13

Check notice on line 1696 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Translation same as original text
#: ../../Firmware/messages.cpp:168 ../../Firmware/ultralcd.cpp:4465
msgid "RPi port"
msgstr "RPi port"
Expand Down Expand Up @@ -1848,7 +1848,7 @@
msgid "Selecting fil. slot"
msgstr "Výběr fil. slot"

#. MSG_SELFTEST_OK c=20

Check notice on line 1851 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Translation same as original text
#: ../../Firmware/messages.cpp:353 ../../Firmware/ultralcd.cpp:6253
msgid "Selftest OK"
msgstr "Selftest OK"
Expand Down Expand Up @@ -2215,7 +2215,7 @@
msgid "Voltages"
msgstr "Napětí"

#. MSG_TITLE_TMC_WARNING_TMC_TOO_HOT c=20

Check notice on line 2218 in lang/po/Firmware_cs.po

View workflow job for this annotation

GitHub Actions / check-lang

Differing last punctuation character: (T => !)
#: ../../Firmware/mmu2/errors_list.h:151 ../../Firmware/mmu2/errors_list.h:205
#: ../../Firmware/mmu2/errors_list.h:206 ../../Firmware/mmu2/errors_list.h:207
msgid "WARNING TMC TOO HOT"
Expand Down Expand Up @@ -2518,7 +2518,7 @@
msgid "Unexpected error occurred."
msgstr "Došlo k neočekávané chybě."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
4 changes: 2 additions & 2 deletions lang/po/Firmware_de.po
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
msgid "FINDA DIDNT TRIGGER"
msgstr "FINDA N. AUSGELÖST"

#. MSG_DESC_FINDA_FILAMENT_STUCK c=20 r=8

Check notice on line 565 in lang/po/Firmware_de.po

View workflow job for this annotation

GitHub Actions / check-lang

Differing last punctuation character: (. => ?)
#: ../../Firmware/mmu2/errors_list.h:243 ../../Firmware/mmu2/errors_list.h:299
msgid ""
"FINDA didn't switch off while unloading filament. Try unloading manually. "
Expand Down Expand Up @@ -699,7 +699,7 @@
msgid "Filament sensor"
msgstr "Filament-Sensor"

#. MSG_DESC_FSENSOR_FILAMENT_STUCK c=20 r=8

Check notice on line 702 in lang/po/Firmware_de.po

View workflow job for this annotation

GitHub Actions / check-lang

Differing last punctuation character: (. => ?)
#: ../../Firmware/mmu2/errors_list.h:245 ../../Firmware/mmu2/errors_list.h:301
msgid ""
"Filament sensor didn't switch off while unloading filament. Ensure filament "
Expand Down Expand Up @@ -1485,7 +1485,7 @@
"Lesen Sie unser Handbuch und beheben Sie das Problem. Fahren Sie dann mit "
"dem Assistenten fort, indem Sie den Drucker neu starten."

#. MSG_CHECK_IR_CONNECTION c=20 r=4

Check notice on line 1488 in lang/po/Firmware_de.po

View workflow job for this annotation

GitHub Actions / check-lang

Differing last punctuation character: (. => ?)
#: ../../Firmware/messages.cpp:349 ../../Firmware/ultralcd.cpp:6002
msgid "Please check the IR sensor connection, unload filament if present."
msgstr "IR Sensor Verbindungen über- prüfen. Ist Filament entladen?"
Expand Down Expand Up @@ -2544,11 +2544,11 @@
msgid "Unexpected error occurred."
msgstr "Ein unerwarteter Fehler ist aufgetreten."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
msgstr "Auswerf."
msgstr "Auswerfen"

#. MSG_TITLE_FILAMENT_CHANGE c=20
#: ../../Firmware/mmu2/errors_list.h:189 ../../Firmware/mmu2/errors_list.h:236
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_es.po
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ msgstr "ERROR DESCONOCIDO"
msgid "Unexpected error occurred."
msgstr "Ocurrió un error inesperado."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2553,7 +2553,7 @@ msgstr "ERREUR INCONNUE"
msgid "Unexpected error occurred."
msgstr "Une erreur inattendue s'est produite."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_hr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ msgstr "NEPOZNATA POGREŠKA"
msgid "Unexpected error occurred."
msgstr "Došlo je do neočekivane pogreške."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ msgstr "ISMERETLEN HIBA"
msgid "Unexpected error occurred."
msgstr "Váratlan hiba történt."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_it.po
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ msgstr "ERRORE SCONOSCIUTO"
msgid "Unexpected error occurred."
msgstr "Si è verificato un errore imprevisto."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
4 changes: 2 additions & 2 deletions lang/po/Firmware_nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -2543,11 +2543,11 @@ msgstr "ONBEKENDE FOUT"
msgid "Unexpected error occurred."
msgstr "Er is een onverwachte fout opgetreden."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
msgstr "Uitwerp."
msgstr "Uitwerpen"

#. MSG_TITLE_FILAMENT_CHANGE c=20
#: ../../Firmware/mmu2/errors_list.h:189 ../../Firmware/mmu2/errors_list.h:236
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_no.po
Original file line number Diff line number Diff line change
Expand Up @@ -2517,7 +2517,7 @@ msgstr "UKJENT FEIL"
msgid "Unexpected error occurred."
msgstr "Det oppstod en uventet feil."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,7 @@ msgstr "NIEZNANY BŁĄD"
msgid "Unexpected error occurred."
msgstr "Pojawił się nieoczekiwany błąd."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_ro.po
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ msgstr "EROARE NECUNOSCUTĂ"
msgid "Unexpected error occurred."
msgstr "A apărut o eroare neașteptată."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_sk.po
Original file line number Diff line number Diff line change
Expand Up @@ -2523,7 +2523,7 @@ msgstr "NEZNÁMA CHYBA"
msgid "Unexpected error occurred."
msgstr "Vyskytla sa neočakávaná chyba."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -2530,7 +2530,7 @@ msgstr "OKÄNT FEL"
msgid "Unexpected error occurred."
msgstr "Ett oväntat fel inträffade."

#. MSG_EJECT c=8
#. MSG_EJECT c=9
#: ../../Firmware/messages.cpp:21 ../../Firmware/mmu2/errors_list.h:371
#: ../../Firmware/ultralcd.cpp:2275 ../../Firmware/ultralcd.cpp:2279
msgid "Eject"
Expand Down
Loading