Skip to content

Commit 2400692

Browse files
committed
1.21 release
Removed Czech language option from 4.3" builds due to incorrect font Fixed Czech keyboard display in 5" and 7" builds Minor text changes
1 parent 2b1a960 commit 2400692

File tree

3 files changed

+133
-121
lines changed

3 files changed

+133
-121
lines changed

src/Strings.hpp

Lines changed: 125 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
#define Newline "\n"
1818
#define DegreeSymbol "\u00B0"
1919

20-
constexpr unsigned int numLanguages = 5;
20+
// The font characters from 0x0100 to 0x180 are ot correct in the font for the 4.3" panel, so only include Czech on the larger panels
21+
constexpr unsigned int NumLanguages =
22+
#if DISPLAY_X == 800
23+
5
24+
#else
25+
4
26+
#endif
27+
;
2128

2229
struct StringTable
2330
{
@@ -106,7 +113,7 @@ struct StringTable
106113
CSTRING displayDimmingNames[(unsigned int)DisplayDimmerType::NumTypes];
107114
};
108115

109-
const StringTable LanguageTables[numLanguages] =
116+
const StringTable LanguageTables[NumLanguages] =
110117
{
111118
// English
112119
{
@@ -204,15 +211,15 @@ const StringTable LanguageTables[numLanguages] =
204211

205212
// Theme names
206213
{
207-
"Light",
208-
"Dark"
214+
"Light theme",
215+
"Dark theme"
209216
},
210217

211218
// Display dimming types
212219
{
213-
"Never Dim",
214-
"Idle Dim",
215-
"Always Dim"
220+
"Never dim",
221+
"Dim if idle",
222+
"Always dim"
216223
}
217224
},
218225

@@ -432,114 +439,6 @@ const StringTable LanguageTables[numLanguages] =
432439
}
433440
},
434441

435-
// Czech
436-
{
437-
// Language name
438-
"Čeština",
439-
440-
// Main page strings
441-
"Ovládání",
442-
"Tisk",
443-
"Konzole",
444-
"Nastavení",
445-
"Aktuální" THIN_SPACE DEGREE_SYMBOL "C",
446-
"Aktivní" THIN_SPACE DEGREE_SYMBOL "C",
447-
"Nečinná" THIN_SPACE DEGREE_SYMBOL "C",
448-
"Pohyb",
449-
"Extruder",
450-
"Makra",
451-
"STOP",
452-
453-
// Print page
454-
"Extruder" THIN_SPACE "%",
455-
"Rychl. ", // note space at end
456-
"Vent. ", // note space at end
457-
"Čas do konce: ",
458-
"soubor ", // note space at end
459-
", materiál ", // note space at end
460-
", vrstva ", // note space at end
461-
"n/a",
462-
"Pozastavit",
463-
"Baby step",
464-
"Pokračovat",
465-
"Zrušit",
466-
"OK",
467-
468-
// Setup page
469-
"Hlasitost ", // note space at end
470-
"Kalibrace dotyku",
471-
"Zrcadlit displej",
472-
"Obrátit displej",
473-
"Motiv",
474-
"Podsvícení -",
475-
"Podsvícení +",
476-
"Uložit nastavení",
477-
"Smazat nastavení",
478-
"Uložit a Restart",
479-
480-
// Misc
481-
"Skutečně obnovit tovární nastavení?",
482-
"Skutečně smazat?",
483-
"Určitě?",
484-
"Dotkněte se bodu",
485-
"Posun hlavy",
486-
"Množství (mm)",
487-
"Rychlost (mm/s)",
488-
"Vytlačit (extr.)",
489-
"Zatlačit (retr.)",
490-
"Baby stepping",
491-
"Aktuální Z offset: ",
492-
"Zpráva",
493-
"Zprávy",
494-
"Verze firmware Panel Due ", // note space at end
495-
496-
// File popup
497-
"Soubory na kartě ", // note the space on the end
498-
"Makra",
499-
"Chyba ", // note the space at the end
500-
" přístupu ke kartě", // note the space at the start
501-
"Název: ",
502-
"Velikost: ",
503-
"Výška vrstvy: ",
504-
"Výška objektu: ",
505-
"Spotřeba (mat.): ",
506-
"Slicer: ",
507-
"Last modified: ",
508-
"Estimated print time: ",
509-
"Simulated print time: ",
510-
"Simulace",
511-
512-
// Printer status strings
513-
{
514-
"Připojování",
515-
"Nečinný",
516-
"Tiskne",
517-
"Zastaven",
518-
"Startuje",
519-
"Pozastaven",
520-
"Zaneprázdněný",
521-
"Pozastavuje se",
522-
"Pokračuje",
523-
"Nahrává firmware",
524-
"Výměna nástroje",
525-
"Simulace",
526-
"Pohotovostní"
527-
},
528-
529-
// Theme names
530-
{
531-
"Světlý",
532-
"Tmavý"
533-
},
534-
535-
// Display dimming types
536-
{
537-
"Nikdy nezměníme",
538-
"Idle Dim",
539-
"Vždy Dim"
540-
}
541-
},
542-
543442
// Spanish
544443
{
545444
// Language name
@@ -646,7 +545,118 @@ const StringTable LanguageTables[numLanguages] =
646545
"Atenuar en espera",
647546
"Siempre Atenuar",
648547
},
548+
},
549+
550+
#if DISPLAY_X == 800
551+
// Czech
552+
{
553+
// Language name
554+
"Čeština",
555+
556+
// Main page strings
557+
"Ovládání",
558+
"Tisk",
559+
"Konzole",
560+
"Nastavení",
561+
"Aktuální" THIN_SPACE DEGREE_SYMBOL "C",
562+
"Aktivní" THIN_SPACE DEGREE_SYMBOL "C",
563+
"Nečinná" THIN_SPACE DEGREE_SYMBOL "C",
564+
"Pohyb",
565+
"Extruder",
566+
"Makra",
567+
"STOP",
568+
569+
// Print page
570+
"Extruder" THIN_SPACE "%",
571+
"Rychl. ", // note space at end
572+
"Vent. ", // note space at end
573+
"Čas do konce: ",
574+
"soubor ", // note space at end
575+
", materiál ", // note space at end
576+
", vrstva ", // note space at end
577+
"n/a",
578+
"Pozastavit",
579+
"Baby step",
580+
"Pokračovat",
581+
"Zrušit",
582+
"OK",
583+
584+
// Setup page
585+
"Hlasitost ", // note space at end
586+
"Kalibrace dotyku",
587+
"Zrcadlit displej",
588+
"Obrátit displej",
589+
"Motiv",
590+
"Podsvícení -",
591+
"Podsvícení +",
592+
"Uložit nastavení",
593+
"Smazat nastavení",
594+
"Uložit a Restart",
595+
596+
// Misc
597+
"Skutečně obnovit tovární nastavení?",
598+
"Skutečně smazat?",
599+
"Určitě?",
600+
"Dotkněte se bodu",
601+
"Posun hlavy",
602+
"Množství (mm)",
603+
"Rychlost (mm/s)",
604+
"Vytlačit (extr.)",
605+
"Zatlačit (retr.)",
606+
"Baby stepping",
607+
"Aktuální Z offset: ",
608+
"Zpráva",
609+
"Zprávy",
610+
"Verze firmware Panel Due ", // note space at end
611+
612+
// File popup
613+
"Soubory na kartě ", // note the space on the end
614+
"Makra",
615+
"Chyba ", // note the space at the end
616+
" přístupu ke kartě", // note the space at the start
617+
"Název: ",
618+
"Velikost: ",
619+
"Výška vrstvy: ",
620+
"Výška objektu: ",
621+
"Spotřeba (mat.): ",
622+
"Slicer: ",
623+
"Last modified: ",
624+
"Estimated print time: ",
625+
"Simulated print time: ",
626+
"Simulace",
627+
628+
// Printer status strings
629+
{
630+
"Připojování",
631+
"Nečinný",
632+
"Tiskne",
633+
"Zastaven",
634+
"Startuje",
635+
"Pozastaven",
636+
"Zaneprázdněný",
637+
"Pozastavuje se",
638+
"Pokračuje",
639+
"Nahrává firmware",
640+
"Výměna nástroje",
641+
"Simulace",
642+
"Pohotovostní"
643+
},
644+
645+
// Theme names
646+
{
647+
"Světlý",
648+
"Tmavý"
649+
},
650+
651+
// Display dimming types
652+
{
653+
"Nikdy nezměníme",
654+
"Idle Dim",
655+
"Vždy Dim"
656+
}
649657
}
658+
#endif
659+
650660
};
651661

652662
#endif /* SRC_STRINGS_HPP_ */

src/UserInterface.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ void CreateLanguagePopup(const ColourScheme& colours)
583583
{
584584
languagePopup = new PopupWindow(popupBarHeight, fullPopupWidth, colours.popupBackColour, colours.popupBorderColour);
585585
DisplayField::SetDefaultColours(colours.popupButtonTextColour, colours.popupButtonBackColour);
586-
PixelNumber step = (fullPopupWidth - 2 * popupSideMargin + popupFieldSpacing)/numLanguages;
587-
for (unsigned int i = 0; i < numLanguages; ++i)
586+
PixelNumber step = (fullPopupWidth - 2 * popupSideMargin + popupFieldSpacing)/NumLanguages;
587+
for (unsigned int i = 0; i < NumLanguages; ++i)
588588
{
589589
languagePopup->AddField(new TextButton(popupSideMargin, popupSideMargin + i * step, step - popupFieldSpacing, LanguageTables[i].languageName, evAdjustLanguage, i));
590590
}
@@ -596,7 +596,9 @@ void CreateKeyboardPopup(uint32_t language, ColourScheme colours)
596596
static const char* array const keysEN[8] = { "1234567890-+", "QWERTYUIOP[]", "ASDFGHJKL:@", "ZXCVBNM,./", "!\"#$%^&*()_=", "qwertyuiop{}", "asdfghjkl;'", "zxcvbnm<>?" };
597597
static const char* array const keysDE[8] = { "1234567890-+", "QWERTZUIOP[]", "ASDFGHJKL:@", "YXCVBNM,./", "!\"#$%^&*()_=", "qwertzuiop{}", "asdfghjkl;'", "yxcvbnm<>?" };
598598
static const char* array const keysFR[8] = { "1234567890-+", "AZERTWUIOP[]", "QSDFGHJKLM@", "YXCVBN.,:/", "!\"#$%^&*()_=", "azertwuiop{}", "qsdfghjklm'", "yxcvbn<>;?" };
599-
static const char* array const * const keyboards[numLanguages] = { keysEN, keysDE, keysFR, keysEN /*, keysEN */ }; // Spain and Czech keyboard layout is same as English
599+
static const char* array const * const keyboards[] = { keysEN, keysDE, keysFR, keysEN, keysEN }; // Spain and Czech keyboard layout is same as English
600+
601+
static_assert(ARRAY_SIZE(keyboards) >= NumLanguages, "Wrong number of keyboard entries");
600602

601603
keyboardPopup = new StandardPopupWindow(keyboardPopupHeight, keyboardPopupWidth, colours.popupBackColour, colours.popupBorderColour, colours.popupInfoTextColour, colours.buttonImageBackColour, nullptr, keyboardTopMargin);
602604

@@ -606,7 +608,7 @@ void CreateKeyboardPopup(uint32_t language, ColourScheme colours)
606608
userCommandField->SetLabel(userCommandBuffers[currentUserCommandBuffer].c_str()); // set up to display the current user command
607609
keyboardPopup->AddField(userCommandField);
608610

609-
if (language >= numLanguages)
611+
if (language >= NumLanguages)
610612
{
611613
language = 0;
612614
}
@@ -990,7 +992,7 @@ namespace UI
990992
// Return the number of supported languages
991993
extern unsigned int GetNumLanguages()
992994
{
993-
return numLanguages;
995+
return NumLanguages;
994996
}
995997

996998
// Create all the fields we ever display

src/Version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
#ifndef SRC_VERSION_HPP_
99
#define SRC_VERSION_HPP_
1010

11-
#define VERSION_TEXT "1.21(07b2)"
11+
#define VERSION_TEXT "1.21(08b2)"
1212

1313
#endif /* SRC_VERSION_HPP_ */

0 commit comments

Comments
 (0)