Skip to content

Commit 0d7680d

Browse files
authored
New PO-based language translation support (prusa3d#3471)
* lang: Add a PO language extractor with FW metadata support Implement a straight-to-po language extractor which supports our custom language requirements: - _i/_I/ISTR for text string definitions - _T for catalog translations (with back-reference support) - //// EOL comments with: - MSG_ catalog entry name identifiers - c=X r=Y annotations for screen dimensioning checks - Crude support for commented lines All source locations are correctly referenced in the PO, with the metadata colleted in the comment for further processing. Several checks are implemented already during extraction: - Correct catalog name assignment (no duplicates) - Metadata checks for each entry Further checks will be implemented by directly checking the translated PO file. Requires "polib" and "regex" python modules. * lang: Adapt lang-check to work directly on PO/POT files * lang: Allow lang-extract to generate stable (pre-sorted) output directly * lang: Further extend lang-extract consistency/error checking - Do not parse inside preprocessor conditionals - Distinguish between references and definitions - Warn about missing references and definitions * lang: lang-extract: warn about incorrect PROGMEM assignments Check that ISTR is used along with PROGMEM_I1 in an attempt to spot useless translated catalogs. * lang: lang-extract: Improved handling of same-line translations Correctly reference metadata on same-line translations. * lang: lang-extract: Handle _O as a cat-ref prusa3d#3434 * lang: lang-extract: Warn about unused catalog definitions * lang: lang-extract: Allow propagating translation comments via // The definition: code //// definition [// comment] will check [definition] as before, but blindly accumulate // comment. The comment is then re-appended back into the PO files for translators with the form: definition comment comment... * lang: Fix incorrect display definitions * lang: lang-extract: Check source encoding/charmap * lang: Translate the degree symbol * lang: Unbreak/cleanup DEBUG_SEC_LANG * lang: Improve meaning of comment * lang: Split charset conversions into an aux lib for future use * lang: Implement lang-map.py to extract the translation symbol map - Extracts the translatable symbol map for further use - Computes a stable "language signature" from the map itself - Optionally patches the binary update the symbols * lang: Check for translation recoding problems * lang: Implement a transliteration map to post-process translations TRANS_CHARS is now used to replace unavailable symbols to the source encoding, only while producing the language catalog. * lang: Handle/check character replacements in lang-check Filter the translation through TRANS_CHARS, so that the preview and length check are performed correctly for expanding replacements such as 'ß' to 'ss'. * lang: Implement lang-build.py to generate the final language catalog * Cleanup .gitignore * lang: Drop txt language files * lang: Remove outdated translation scripts and obsolete docs * lang: Update build scripts for new infrastructure * lang: [no] Integrate accents from po/new/no.po We now support accents natively * lang: Remove redundant directory po/new/ * lang: Fix encoding of LCD characters in PO files * lang: [hr] Fix wrapping in MSG_CRASH_DET_ONLY_IN_NORMAL * lang: Sort and reformat PO files for further massaging * lang: Switch to developer (dot) comments for PO metadata * lang: Allow the IGNORE annotation to skip extraction * lang: Fix missing/broken language metadata in sources * lang: Add update-pot.sh and regenerate po/Firmware.pot * lang: Add update-po.sh and refresh all PO files * lang: Add summary documentation about the new translation workflow * Add more ignored files * CI: Add new required dependencies to travis * lang: lang-build: Improve warning message "referenced" was really meaning that data is being duplicated. * lang: Respect the language order as defined in config.sh This correctly splits normal and community-made entries during language selection. * lang: More typos in the documentation * lang: Check for the maximum size of each language Each table needs to fit within LANG_SIZE_RESERVED * lang: Properly align _SEC_LANG to page boundaries ... instead of relying on _SEC_LANG_TABLE to calculate the offset * lang: Build support for dual-language hex files Detect the printer type by checking the current variant type. On printers with no xflash (MK2*), generate one hex file for each additional language file by patching the built-in secondary language table during the build process * lang: Mention lang-patchsec.py * lang: Use color() instead of tput for clarity * lang: Allow disabling terminal colors with NO_COLOR/TERM=dumb * lang: Consistent use of redirection in config.sh * lang: Stricter variant-type check for xflash support * lang: Output size stats when building double-language hex files * lang: Respect NO_COLOR in lang-check.py * lang: Check for repeated/incorrect annotations Catch errors such as "c=1 c=2" * lang: Correct MSG_SLIGHT_SKEW/MSG_SEVERE_SKEW annotations * lang: [it] Improve MSG_*_SKEW translation * lang: Use INTLHEX instead of OUTHEX_P/S for configuration We already have OUTHEX which is the compiled firmware. Use INTLHEX for the final internationalized firmware, which is less confusing. Also, assume it being a prefix for all generated hex files, which reduces the number of variables set. * lang: Move lang_map to lib.io for further use * lang: lang-check: Accept a firmware map file to suppress unused string warnings * lang: Use the map file to reduce useless warnings during fw-build * lang: lang-check: Also suppress unused empty annotations * lang: Fix MSG_MOVE_CARRIAGE_TO_THE_TOP_Z annotation Refresh pot file * lang: lang-check: Do not warn about same-word translations by default Do not warn when one-word translations such as "No" result in "No" also in other languages, since this is common in latin languages. Allow to re-enable the warning with --warn-same * lang: lang-build: Handle same-source/translation efficiently * lang: [it] Explicitly add On/Off/Reset/Wizard to suppress warnings Instead of displaying a warning, supress the warning and explicitly translate each entry using english (which is the common/acceptable word in these cases). * lang: [it] Suppress more warnings * lang: lang-check: Add intermediate "suggest" warning category Warnings in the "suggest" category as shown as [S] as based on pure speculation from the checking tool, such as the translation being significantly shorter than the original. As a result, they can be suppressed with --no-suggest * lang: Return translation status from lang-check - 0 if the translation only contains suggestions - 1 if the translation contains warnings or errors Check for the exit status in fw-build.sh, but do nothing at the moment except printing a non-fatal error. * lang: Remove "trim_trailing_whitespace=false" for po files PO files got cleaned up/rewritten. We can now ensure they stay consistent. * lang: [sv] Re-integrate changes from 70c73cb * lang: [no] Reintegrate changes from @pkg2000
1 parent 8808536 commit 0d7680d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+32117
-77552
lines changed

.editorconfig

-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ max_line_length = 100
1515

1616
[lang/po/*.po]
1717
end_of_line = crlf
18-
trim_trailing_whitespace = false

.gitignore

+17-72
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,19 @@
1-
.settings
2-
.project
3-
.cproject
4-
Debug
1+
# Temporary configuration
2+
/Firmware/Configuration_prusa.h
3+
4+
# Temporary language files
5+
/lang/po/*.mo
6+
/lang/tmp/
7+
/lang/Firmware-intl.hex
8+
/lang/Firmware-intl-en_*.hex
9+
10+
# Temporary files and directories
11+
*[~#]
12+
*.tmp
13+
*.bak
14+
.DS_Store
515
__pycache__
6-
Firmware/Configuration_prusa.h
7-
Firmware/Doc
8-
/Firmware/.vs/Firmware/v14
9-
/Firmware/__vm
10-
/Firmware/Firmware.sln
11-
/Firmware/Firmware.vcxproj
12-
/Firmware/Firmware.vcxproj.filters
13-
/Firmware/Firmware - Shortcut.lnk
14-
/Firmware/variants/1_75mm_MK3-MMU-EINSy10a-E3Dv6full.h.bak
15-
/Firmware/Marlin_main.cpp~RF12cfae7.TMP
16-
/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h.bak
17-
/html
18-
/latex
19-
/Doxyfile
20-
/Firmware/builds/1_75mm_MK3-EINY04-E3Dv6full
21-
/Firmware/Configuration_prusa.h.bak
22-
/Firmware/Configuration_prusa_backup.h
23-
/Firmware/ultralcd_implementation_hitachi_HD44780.h.bak
24-
/Firmware/ultralcd.cpp.bak
25-
/Firmware/temperature.cpp.bak
26-
/Firmware/pins.h.bak
27-
/Firmware/Marlin_main.cpp.bak
28-
/Firmware/language_pl.h.bak
29-
/Firmware/language_it.h.bak
30-
/Firmware/language_es.h.bak
31-
/Firmware/language_en.h.bak
32-
/Firmware/language_de.h.bak
33-
/Firmware/language_cz.h.bak
34-
/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h
35-
/Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h
36-
/Firmware/variants/1_75mm_MK2-EINY01-E3Dv6full.h.bak
37-
/Firmware/variants/1_75mm_MK1-RAMBo13a-E3Dv6full.h
38-
/Firmware/variants/1_75mm_MK1-RAMBo10a-E3Dv6full.h
39-
/lang/*.bin
40-
/lang/*.hex
41-
/lang/*.dat
42-
/lang/*.tmp
43-
/lang/*.out
44-
/lang/not_tran*.txt
45-
/lang/not_used*.txt
46-
/lang/progmem1.chr
47-
/lang/progmem1.lss
48-
/lang/progmem1.txt
49-
/lang/progmem1.var
50-
/lang/text.sym
51-
/lang/textaddr.txt
16+
17+
# Generated files
5218
/build-env/
53-
/Firmware/Firmware.vcxproj
54-
/Firmware/Configuration_prusa_bckp.h
55-
/Firmware/variants/printers.h
56-
Configuration.tmp
57-
config.tmp
58-
/lang/lang_en.max
59-
/lang/po/new/*_new.po
60-
/lang/po/new/*_filered.po
61-
/lang/po/new/nonascii.txt
62-
/lang/po/new/lang_en*.txt
63-
/lang/po/new/output-*.txt
64-
/lang/po/new/*.mo
65-
.DS_Store
66-
**/.DS_Store
67-
Firmware/.DS_Store
68-
Firmware/variant/.DS_Store
69-
lang/.DS_Store
70-
lang/po/.DS_Store
71-
lang/po/new/.DS_Store
72-
Tests/.DS_Store
73-
tools/.DS_Store
74-
tools/lib/.DS_Store
19+
/Firmware/Doc/

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dist: focal
22
before_install:
3-
- sudo apt-get install -y ninja-build
3+
- sudo apt-get install -y ninja-build python3-polib python3-pyelftools
44
# Arduino IDE adds a lot of noise caused by network traffic, trying to firewall it off
55
- sudo iptables -P INPUT DROP
66
- sudo iptables -P FORWARD DROP

Firmware/Marlin_main.cpp

+7-53
Original file line numberDiff line numberDiff line change
@@ -1168,23 +1168,6 @@ void setup()
11681168
uint32_t src_addr = 0x00000;
11691169
if (lang_get_header(1, &header, &src_addr))
11701170
{
1171-
//this is comparsion of some printing-methods regarding to flash space usage and code size/readability
1172-
#define LT_PRINT_TEST 2
1173-
// flash usage
1174-
// total p.test
1175-
//0 252718 t+c text code
1176-
//1 253142 424 170 254
1177-
//2 253040 322 164 158
1178-
//3 253248 530 135 395
1179-
#if (LT_PRINT_TEST==1) //not optimized printf
1180-
printf_P(_n(" _src_addr = 0x%08lx\n"), src_addr);
1181-
printf_P(_n(" _lt_magic = 0x%08lx %S\n"), header.magic, (header.magic==LANG_MAGIC)?_n("OK"):_n("NA"));
1182-
printf_P(_n(" _lt_size = 0x%04x (%d)\n"), header.size, header.size);
1183-
printf_P(_n(" _lt_count = 0x%04x (%d)\n"), header.count, header.count);
1184-
printf_P(_n(" _lt_chsum = 0x%04x\n"), header.checksum);
1185-
printf_P(_n(" _lt_code = 0x%04x (%c%c)\n"), header.code, header.code >> 8, header.code & 0xff);
1186-
printf_P(_n(" _lt_sign = 0x%08lx\n"), header.signature);
1187-
#elif (LT_PRINT_TEST==2) //optimized printf
11881171
printf_P(
11891172
_n(
11901173
" _src_addr = 0x%08lx\n"
@@ -1203,34 +1186,6 @@ void setup()
12031186
header.code, header.code >> 8, header.code & 0xff,
12041187
header.signature
12051188
);
1206-
#elif (LT_PRINT_TEST==3) //arduino print/println (leading zeros not solved)
1207-
MYSERIAL.print(" _src_addr = 0x");
1208-
MYSERIAL.println(src_addr, 16);
1209-
MYSERIAL.print(" _lt_magic = 0x");
1210-
MYSERIAL.print(header.magic, 16);
1211-
MYSERIAL.println((header.magic==LANG_MAGIC)?" OK":" NA");
1212-
MYSERIAL.print(" _lt_size = 0x");
1213-
MYSERIAL.print(header.size, 16);
1214-
MYSERIAL.print(" (");
1215-
MYSERIAL.print(header.size, 10);
1216-
MYSERIAL.println(")");
1217-
MYSERIAL.print(" _lt_count = 0x");
1218-
MYSERIAL.print(header.count, 16);
1219-
MYSERIAL.print(" (");
1220-
MYSERIAL.print(header.count, 10);
1221-
MYSERIAL.println(")");
1222-
MYSERIAL.print(" _lt_chsum = 0x");
1223-
MYSERIAL.println(header.checksum, 16);
1224-
MYSERIAL.print(" _lt_code = 0x");
1225-
MYSERIAL.print(header.code, 16);
1226-
MYSERIAL.print(" (");
1227-
MYSERIAL.print((char)(header.code >> 8), 0);
1228-
MYSERIAL.print((char)(header.code & 0xff), 0);
1229-
MYSERIAL.println(")");
1230-
MYSERIAL.print(" _lt_resv1 = 0x");
1231-
MYSERIAL.println(header.signature, 16);
1232-
#endif //(LT_PRINT_TEST==)
1233-
#undef LT_PRINT_TEST
12341189

12351190
#if 0
12361191
xflash_rd_data(0x25ba, (uint8_t*)&block_buffer, 1024);
@@ -1249,9 +1204,9 @@ void setup()
12491204
printf_P(_n("_SEC_LANG_TABLE checksum = %04x\n"), sum);
12501205
sum = (sum >> 8) | ((sum & 0xff) << 8); //swap bytes
12511206
if (sum == header.checksum)
1252-
puts_P(_n("Checksum OK"), sum);
1207+
puts_P(_n("Checksum OK"));
12531208
else
1254-
puts_P(_n("Checksum NG"), sum);
1209+
puts_P(_n("Checksum NG"));
12551210
}
12561211
else
12571212
puts_P(_n("lang_get_header failed!"));
@@ -1534,11 +1489,9 @@ void setup()
15341489
lcd_language();
15351490

15361491
#ifdef DEBUG_SEC_LANG
1537-
15381492
uint16_t sec_lang_code = lang_get_code(1);
15391493
uint16_t ui = _SEC_LANG_TABLE; //table pointer
15401494
printf_P(_n("lang_selected=%d\nlang_table=0x%04x\nSEC_LANG_CODE=0x%04x (%c%c)\n"), lang_selected, ui, sec_lang_code, sec_lang_code >> 8, sec_lang_code & 0xff);
1541-
15421495
lang_print_sec_lang(uartout);
15431496
#endif //DEBUG_SEC_LANG
15441497

@@ -3308,7 +3261,7 @@ static void gcode_G80()
33083261
Sound_MakeSound(e_SOUND_TYPE_StandardAlert);
33093262
bool bState;
33103263
do { // repeat until Z-leveling o.k.
3311-
lcd_display_message_fullscreen_P(_i("Some problem encountered, Z-leveling enforced ..."));
3264+
lcd_display_message_fullscreen_P(_i("Some problem encountered, Z-leveling enforced ...")); ////MSG_ZLEVELING_ENFORCED c=20 r=4
33123265
#ifdef TMC2130
33133266
lcd_wait_for_click_delay(MSG_BED_LEVELING_FAILED_TIMEOUT);
33143267
calibrate_z_auto(); // Z-leveling (X-assembly stay up!!!)
@@ -3794,8 +3747,9 @@ static void gcode_M600(bool automatic, float x_position, float y_position, float
37943747
if (!mmu_enabled)
37953748
{
37963749
KEEPALIVE_STATE(PAUSED_FOR_USER);
3797-
lcd_change_fil_state = lcd_show_fullscreen_message_yes_no_and_wait_P(_i("Was filament unload successful?"),
3798-
false, true); ////MSG_UNLOAD_SUCCESSFUL c=20 r=2
3750+
lcd_change_fil_state = lcd_show_fullscreen_message_yes_no_and_wait_P(
3751+
_i("Was filament unload successful?"), ////MSG_UNLOAD_SUCCESSFUL c=20 r=2
3752+
false, true);
37993753
if (lcd_change_fil_state == 0)
38003754
{
38013755
lcd_clear();
@@ -5348,7 +5302,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
53485302
if (calibration_status() >= CALIBRATION_STATUS_XYZ_CALIBRATION) {
53495303
//we need to know accurate position of first calibration point
53505304
//if xyz calibration was not performed yet, interrupt temperature calibration and inform user that xyz cal. is needed
5351-
lcd_show_fullscreen_message_and_wait_P(_i("Please run XYZ calibration first."));
5305+
lcd_show_fullscreen_message_and_wait_P(_i("Please run XYZ calibration first.")); ////MSG_RUN_XYZ c=20 r=4
53525306
break;
53535307
}
53545308

Firmware/cardreader.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,10 @@ void CardReader::presort() {
877877
uint16_t counter = 0;
878878
uint16_t total = 0;
879879
for (uint16_t i = sortCountFiles/2; i > 0; i /= 2) total += sortCountFiles - i; //total runs for progress bar
880-
menu_progressbar_init(total, (runs == 0)?_i("Sorting files"):_i("Sorting folders"));
880+
menu_progressbar_init(
881+
total, (runs == 0)
882+
? _i("Sorting files") ////MSG_SORTING_FILES c=20
883+
: _i("Sorting folders")); ////MSG_SORTING_FOLDERS c=20
881884

882885
for (uint16_t gap = sortCountFiles/2; gap > 0; gap /= 2)
883886
{

Firmware/config.h

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060

6161
#define LANG_SIZE_RESERVED 0x3000 // reserved space for secondary language (12288 bytes). Maximum 32768 bytes
6262

63+
#if (LANG_SIZE_RESERVED % 256)
64+
#error "LANG_SIZE_RESERVED should be a multiple of a page size"
65+
#endif
66+
6367
//Community language support
6468
#define COMMUNITY_LANG_GROUP 1
6569

@@ -81,6 +85,7 @@
8185
#if (COMMUNITY_LANG_GROUP >=1 )
8286
#define COMMUNITY_LANGUAGE_SUPPORT
8387
#endif
88+
8489
// Sanity checks for correct configuration of XFLASH_DUMP options
8590
#if defined(XFLASH_DUMP) && !defined(XFLASH)
8691
#error "XFLASH_DUMP requires XFLASH support"

Firmware/language.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ uint8_t lang_is_selected(void) { return 1; }
2828
#else //(LANG_MODE == 0) //secondary languages in progmem or xflash
2929

3030
//reserved xx kbytes for secondary language table
31-
const char _SEC_LANG[LANG_SIZE_RESERVED] PROGMEM_I2 = "_SEC_LANG";
31+
const char __attribute__((aligned(256))) _SEC_LANG[LANG_SIZE_RESERVED] PROGMEM_I2 = "_SEC_LANG";
3232

3333
//primary language signature
3434
const uint32_t _PRI_LANG_SIGNATURE[1] __attribute__((section(".progmem0"))) = {0xffffffff};
@@ -41,7 +41,7 @@ const char* lang_get_translation(const char* s)
4141
if (lang_selected == 0) return s + 2; //primary language selected, return orig. str.
4242
if (lang_table == 0) return s + 2; //sec. lang table not found, return orig. str.
4343
uint16_t ui = pgm_read_word(((uint16_t*)s)); //read string id
44-
if (ui == 0xffff) return s + 2; //translation not found, return orig. str.
44+
if (ui == 0xffff) return s + 2; //id not assigned, return orig. str.
4545
ui = pgm_read_word(((uint16_t*)(((char*)lang_table + 16 + ui*2)))); //read relative offset
4646
if (pgm_read_byte(((uint8_t*)((char*)lang_table + ui))) == 0) //read first character
4747
return s + 2;//zero length string == not translated, return orig. str.

Firmware/language.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ extern uint8_t lang_selected;
145145
#if (LANG_MODE != 0)
146146
extern const char _SEC_LANG[LANG_SIZE_RESERVED];
147147
extern const char* lang_get_translation(const char* s);
148-
/** @def _SEC_LANG_TABLE
149-
* @brief Align table to start of 256 byte page */
150-
#define _SEC_LANG_TABLE ((((uint16_t)&_SEC_LANG) + 0x00ff) & 0xff00)
148+
#define _SEC_LANG_TABLE ((uint16_t)&_SEC_LANG)
151149
#endif //(LANG_MODE != 0)
152150

153151
/** @brief selects language, eeprom is updated in case of success */

Firmware/messages.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "Configuration_prusa.h"
99

1010
//internationalized messages
11-
const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); ////MSG_AUTO_HOMEc=18
11+
const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); ////MSG_AUTO_HOME c=18
1212
const char MSG_BABYSTEP_Z[] PROGMEM_I1 = ISTR("Live adjust Z"); ////MSG_BABYSTEP_Z c=18
1313
const char MSG_BABYSTEP_Z_NOT_SET[] PROGMEM_I1 = ISTR("Distance between tip of the nozzle and the bed surface has not been set yet. Please follow the manual, chapter First steps, section First layer calibration."); ////MSG_BABYSTEP_Z_NOT_SET c=20 r=12
1414
const char MSG_BED[] PROGMEM_I1 = ISTR("Bed"); ////MSG_BED c=13
@@ -162,16 +162,16 @@ const char MSG_DIM[] PROGMEM_I1 = ISTR("Dim"); ////MSG_DIM c=6
162162
const char MSG_AUTO[] PROGMEM_I1 = ISTR("Auto"); ////MSG_AUTO c=6
163163
#ifdef IR_SENSOR_ANALOG
164164
// Beware - the space at the beginning is necessary since it is reused in LCD menu items which are to be with a space
165-
const char MSG_IR_04_OR_NEWER[] PROGMEM_I1 = ISTR(" 0.4 or newer");////c=18
166-
const char MSG_IR_03_OR_OLDER[] PROGMEM_I1 = ISTR(" 0.3 or older");////c=18
167-
const char MSG_IR_UNKNOWN[] PROGMEM_I1 = ISTR("unknown state");////c=18
165+
const char MSG_IR_04_OR_NEWER[] PROGMEM_I1 = ISTR(" 0.4 or newer");////MSG_IR_04_OR_NEWER c=18
166+
const char MSG_IR_03_OR_OLDER[] PROGMEM_I1 = ISTR(" 0.3 or older");////MSG_IR_03_OR_OLDER c=18
167+
const char MSG_IR_UNKNOWN[] PROGMEM_I1 = ISTR("unknown state");////MSG_IR_UNKNOWN c=18
168168
#endif
169169

170170
//not internationalized messages
171-
const char MSG_AUTO_DEPLETE[] PROGMEM_N1 = ISTR("SpoolJoin"); ////c=13
172-
const char MSG_FIRMWARE[] PROGMEM_N1 = ISTR("Firmware"); ////c=8
173-
const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_N1 = ISTR("FlashAir"); ////c=8
174-
const char MSG_PINDA[] PROGMEM_N1 = ISTR("PINDA");////c=5
171+
const char MSG_AUTO_DEPLETE[] PROGMEM_N1 = ISTR("SpoolJoin"); ////MSG_AUTO_DEPLETE c=13
172+
const char MSG_FIRMWARE[] PROGMEM_N1 = ISTR("Firmware"); ////MSG_FIRMWARE c=8
173+
const char MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY[] PROGMEM_N1 = ISTR("FlashAir"); ////MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY c=8
174+
const char MSG_PINDA[] PROGMEM_N1 = ISTR("PINDA");////MSG_PINDA c=5
175175
const char WELCOME_MSG[] PROGMEM_N1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20
176176
const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; ////
177177
const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; ////

Firmware/mmu.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -755,14 +755,14 @@ void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move)
755755
lcd_clear();
756756
setTargetHotend(hotend_temp_bckp, active_extruder);
757757
if (((degTargetHotend(active_extruder) - degHotend(active_extruder)) > 5)) {
758-
lcd_display_message_fullscreen_P(_i("MMU OK. Resuming temperature..."));
758+
lcd_display_message_fullscreen_P(_i("MMU OK. Resuming temperature...")); ////MSG_MMU_OK_RESUMING_TEMPERATURE c=20 r=4
759759
delay_keep_alive(3000);
760760
}
761761
mmu_wait_for_heater_blocking();
762762
}
763763
if (move_axes) {
764764
lcd_clear();
765-
lcd_display_message_fullscreen_P(_i("MMU OK. Resuming position..."));
765+
lcd_display_message_fullscreen_P(_i("MMU OK. Resuming position...")); ////MSG_MMU_OK_RESUMING_POSITION c=20 r=4
766766
current_position[X_AXIS] = x_position_bckp;
767767
current_position[Y_AXIS] = y_position_bckp;
768768
plan_buffer_line_curposXYZE(50);
@@ -773,7 +773,7 @@ void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move)
773773
}
774774
else {
775775
lcd_clear();
776-
lcd_display_message_fullscreen_P(_i("MMU OK. Resuming..."));
776+
lcd_display_message_fullscreen_P(_i("MMU OK. Resuming...")); ////MSG_MMU_OK_RESUMING c=20 r=4
777777
delay_keep_alive(1000); //delay just for showing MMU OK message for a while in case that there are no xyz movements
778778
}
779779
}
@@ -1338,7 +1338,7 @@ bool mmu_check_version()
13381338
void mmu_show_warning()
13391339
{
13401340
printf_P(PSTR("MMU2 firmware version invalid. Required version: build number %d or higher."), MMU_REQUIRED_FW_BUILDNR);
1341-
kill(_i("Please update firmware in your MMU2. Waiting for reset."));
1341+
kill(_i("Please update firmware in your MMU2. Waiting for reset.")); ////MSG_UPDATE_MMU2_FW c=20 r=4
13421342
}
13431343

13441344
void lcd_mmu_load_to_nozzle(uint8_t filament_nr)
@@ -1412,13 +1412,13 @@ bFilamentAction=false; // NOT in "mmu_fil_eject_menu(
14121412
{
14131413
LcdUpdateDisabler disableLcdUpdate;
14141414
lcd_clear();
1415-
lcd_puts_at_P(0, 1, _i("Ejecting filament"));
1415+
lcd_puts_at_P(0, 1, _i("Ejecting filament")); ////MSG_EJECTING_FILAMENT c=20
14161416
mmu_filament_ramming();
14171417
mmu_command(MmuCmd::E0 + filament);
14181418
manage_response(false, false, MMU_UNLOAD_MOVE);
14191419
if (recover)
14201420
{
1421-
lcd_show_fullscreen_message_and_wait_P(_i("Please remove filament and then press the knob."));
1421+
lcd_show_fullscreen_message_and_wait_P(_i("Please remove filament and then press the knob.")); ////MSG_EJECT_REMOVE c=20 r=4
14221422
mmu_command(MmuCmd::R0);
14231423
manage_response(false, false);
14241424
}

0 commit comments

Comments
 (0)