From 6248c93f373bb1590b9c5c04ac43e02684e5eb17 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Thu, 9 Apr 2015 01:26:48 +0200 Subject: [PATCH 1/4] Introduction of Bulgarian - language_bgr.h Thank you @Nprod! --- Documentation/LCDLanguageFont.md | 1 + Marlin/Configuration.h | 2 +- Marlin/language.h | 1 + Marlin/language_bgr.h | 138 +++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 Marlin/language_bgr.h diff --git a/Documentation/LCDLanguageFont.md b/Documentation/LCDLanguageFont.md index a1acfb63f..bd7775c62 100644 --- a/Documentation/LCDLanguageFont.md +++ b/Documentation/LCDLanguageFont.md @@ -38,6 +38,7 @@ We have two different technologies for the displays: * de German * es Spanish * ru Russian + * bgr Bulgarian * it Italian * pt Portuguese * pt-br Portuguese (Brazil) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index b0d97f15e..9f0443c23 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -640,7 +640,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // @section lcd // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/language.h b/Marlin/language.h index 3fe7afd2e..99a5ff368 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -20,6 +20,7 @@ // de German // es Spanish // ru Russian +// bgr Bulgarian // it Italian // pt Portuguese // pt-br Portuguese (Brazil) diff --git a/Marlin/language_bgr.h b/Marlin/language_bgr.h new file mode 100644 index 000000000..3acc17481 --- /dev/null +++ b/Marlin/language_bgr.h @@ -0,0 +1,138 @@ +/** + * Bulgarian + * + * LCD Menu Messages + * See also documentation/LCDLanguageFont.md + * + */ +#ifndef LANGUAGE_BG_H +#define LANGUAGE_BG_H + +#define MAPPER_D0D1 // For Cyrillic +// Define SIMULATE_ROMFONT to see what is seen on the character based display defined in Configuration.h +//#define SIMULATE_ROMFONT +#define DISPLAY_CHARSET_ISO10646_5 + +#define WELCOME_MSG MACHINE_NAME " Готов." +#define MSG_SD_INSERTED "Картата е поставена" +#define MSG_SD_REMOVED "Картата е извадена" +#define MSG_MAIN "Меню" +#define MSG_AUTOSTART "Автостарт" +#define MSG_DISABLE_STEPPERS "Изкл. двигатели" +#define MSG_AUTO_HOME "Паркиране" +#define MSG_SET_HOME_OFFSETS "Задай Начало" +#define MSG_SET_ORIGIN "Изходна точка" +#define MSG_PREHEAT_PLA "Подгряване PLA" +#define MSG_PREHEAT_PLA_N "Подгряване PLA" +#define MSG_PREHEAT_PLA_ALL "Подгр. PLA Всички" +#define MSG_PREHEAT_PLA_BEDONLY "Подгр. PLA Легло" +#define MSG_PREHEAT_PLA_SETTINGS "Настройки PLA" +#define MSG_PREHEAT_ABS "Подгряване ABS" +#define MSG_PREHEAT_ABS_N "Подгряване ABS" +#define MSG_PREHEAT_ABS_ALL "Подгр. ABS Всички" +#define MSG_PREHEAT_ABS_BEDONLY "Подгр. ABS Легло" +#define MSG_PREHEAT_ABS_SETTINGS "Настройки ABS" +#define MSG_COOLDOWN "Охлаждане" +#define MSG_SWITCH_PS_ON "Вкл. захранване" +#define MSG_SWITCH_PS_OFF "Изкл. захранване" +#define MSG_EXTRUDE "Екструзия" +#define MSG_RETRACT "Откат" +#define MSG_MOVE_AXIS "Движение по ос" +#define MSG_MOVE_X "Движение по X" +#define MSG_MOVE_Y "Движение по Y" +#define MSG_MOVE_Z "Движение по Z" +#define MSG_MOVE_E "Екструдер" +#define MSG_MOVE_01MM "Премести с 0.1mm" +#define MSG_MOVE_1MM "Премести с 1mm" +#define MSG_MOVE_10MM "Премести с 10mm" +#define MSG_LEVEL_BED "Нивелиране" +#define MSG_SPEED "Скорост" +#define MSG_NOZZLE LCD_STR_THERMOMETER " Дюза" +#define MSG_BED LCD_STR_THERMOMETER " Легло" +#define MSG_FAN_SPEED "Вентилатор" +#define MSG_FLOW "Поток" +#define MSG_CONTROL "Управление" +#define MSG_MIN LCD_STR_THERMOMETER " Минимум" +#define MSG_MAX LCD_STR_THERMOMETER " Максимум" +#define MSG_FACTOR LCD_STR_THERMOMETER " Фактор" +#define MSG_AUTOTEMP "Авто-темп." +#define MSG_ON "Вкл. " +#define MSG_OFF "Изкл. " +#define MSG_PID_P "PID-P" +#define MSG_PID_I "PID-I" +#define MSG_PID_D "PID-D" +#define MSG_PID_C "PID-C" +#define MSG_ACC "Acc" +#define MSG_VXY_JERK "Vxy-jerk" +#define MSG_VZ_JERK "Vz-jerk" +#define MSG_VE_JERK "Ve-jerk" +#define MSG_VMAX "Vmax " +#define MSG_X "x" +#define MSG_Y "y" +#define MSG_Z "z" +#define MSG_E "e" +#define MSG_VMIN "Vmin" +#define MSG_VTRAV_MIN "VTrav min" +#define MSG_AMAX "Amax " +#define MSG_A_RETRACT "A-откат" +#define MSG_XSTEPS "X стъпки/mm" +#define MSG_YSTEPS "Y стъпки/mm" +#define MSG_ZSTEPS "Z стъпки/mm" +#define MSG_ESTEPS "E стъпки/mm" +#define MSG_TEMPERATURE "Температура" +#define MSG_MOTION "Движение" +#define MSG_VOLUMETRIC "Нишка" +#define MSG_VOLUMETRIC_ENABLED "E in mm3" +#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Диам. нишка 1" +#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Диам. нишка 2" +#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Диам. нишка 3" +#define MSG_CONTRAST "LCD контраст" +#define MSG_STORE_EPROM "Запази в EPROM" +#define MSG_LOAD_EPROM "Зареди от EPROM" +#define MSG_RESTORE_FAILSAFE "Фабрични настройки" +#define MSG_REFRESH LCD_STR_REFRESH "Обнови" +#define MSG_WATCH "Преглед" +#define MSG_PREPARE "Действия" +#define MSG_TUNE "Настройка" +#define MSG_PAUSE_PRINT "Пауза" +#define MSG_RESUME_PRINT "Възобнови печата" +#define MSG_STOP_PRINT "Спри печата" +#define MSG_CARD_MENU "Меню карта" +#define MSG_NO_CARD "Няма карта" +#define MSG_DWELL "Почивка..." +#define MSG_USERWAIT "Изчакване" +#define MSG_RESUMING "Продълж. печата" +#define MSG_PRINT_ABORTED "Печатът е прекъснат" +#define MSG_NO_MOVE "Няма движение" +#define MSG_KILLED "УБИТО." +#define MSG_STOPPED "СПРЯНО." +#define MSG_CONTROL_RETRACT "Откат mm" +#define MSG_CONTROL_RETRACT_SWAP "Смяна Откат mm" +#define MSG_CONTROL_RETRACTF "Откат V" +#define MSG_CONTROL_RETRACT_ZLIFT "Скок mm" +#define MSG_CONTROL_RETRACT_RECOVER "Възврат +mm" +#define MSG_CONTROL_RETRACT_RECOVER_SWAP "Смяна Възврат +mm" +#define MSG_CONTROL_RETRACT_RECOVERF "Възврат V" +#define MSG_AUTORETRACT "Автоoткат" +#define MSG_FILAMENTCHANGE "Смяна нишка" +#define MSG_INIT_SDCARD "Иниц. SD-Карта" +#define MSG_CNG_SDCARD "Смяна SD-Карта" +#define MSG_ZPROBE_OUT "Z-сондата е извадена" +#define MSG_POSITION_UNKNOWN "Задайте X/Y преди Z" +#define MSG_ZPROBE_ZOFFSET "Z Отстояние" +#define MSG_BABYSTEP_X "Министъпка X" +#define MSG_BABYSTEP_Y "Министъпка Y" +#define MSG_BABYSTEP_Z "Министъпка Z" +#define MSG_ENDSTOP_ABORT "Стоп Кр.Изключватели" +#define MSG_END_HOUR "часа" +#define MSG_END_MINUTE "минути" + +#ifdef DELTA_CALIBRATION_MENU + #define MSG_DELTA_CALIBRATE "Делта Калибровка" + #define MSG_DELTA_CALIBRATE_X "Калибровка X" + #define MSG_DELTA_CALIBRATE_Y "Калибровка Y" + #define MSG_DELTA_CALIBRATE_Z "Калибровка Z" + #define MSG_DELTA_CALIBRATE_CENTER "Калибровка Център" +#endif // DELTA_CALIBRATION_MENU + +#endif // LANGUAGE_BG_H From c5961892e3438758a3bad538711f0dcce70acfb6 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Thu, 9 Apr 2015 01:52:13 +0200 Subject: [PATCH 2/4] Bulgarian for all the Configuration.h's --- Marlin/configurator/config/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration_DUAL.h | 2 +- Marlin/example_configurations/Hephestos/Configuration.h | 2 +- Marlin/example_configurations/K8200/Configuration.h | 2 +- Marlin/example_configurations/SCARA/Configuration.h | 2 +- Marlin/example_configurations/WITBOX/Configuration.h | 2 +- Marlin/example_configurations/delta/generic/Configuration.h | 2 +- Marlin/example_configurations/delta/kossel_mini/Configuration.h | 2 +- Marlin/example_configurations/makibox/Configuration.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 3fad14527..4b1246be3 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -639,7 +639,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // @section lcd // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index c30547a52..9ae387639 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -572,7 +572,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index fe544ad16..61dcad0c2 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -568,7 +568,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 812bfe1fc..f29d5ce82 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -594,7 +594,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index b3346bdda..167e689db 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -600,7 +600,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index ca9a756eb..c3b46feb0 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -623,7 +623,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 9ec5f506d..2d7755e20 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -593,7 +593,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 544492a0b..46006b4f1 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -640,7 +640,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 9b292ebde..af6628f32 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -644,7 +644,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 5596faef3..884241a21 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -591,7 +591,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 618243ff3..3c191bb30 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -597,7 +597,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) From 56fc3a48356da8189d83602546ba0cdf4b90aad0 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Thu, 9 Apr 2015 13:09:18 +0200 Subject: [PATCH 3/4] bgr -> bg + update in documentation --- Documentation/LCDLanguageFont.md | 4 ++-- Marlin/Configuration.h | 2 +- Marlin/configurator/config/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration.h | 2 +- Marlin/example_configurations/Felix/Configuration_DUAL.h | 2 +- Marlin/example_configurations/Hephestos/Configuration.h | 2 +- Marlin/example_configurations/K8200/Configuration.h | 2 +- Marlin/example_configurations/SCARA/Configuration.h | 2 +- Marlin/example_configurations/WITBOX/Configuration.h | 2 +- Marlin/example_configurations/delta/generic/Configuration.h | 2 +- .../example_configurations/delta/kossel_mini/Configuration.h | 2 +- Marlin/example_configurations/makibox/Configuration.h | 2 +- Marlin/example_configurations/tvrrug/Round2/Configuration.h | 2 +- Marlin/language.h | 2 +- Marlin/{language_bgr.h => language_bg.h} | 0 15 files changed, 15 insertions(+), 15 deletions(-) rename Marlin/{language_bgr.h => language_bg.h} (100%) diff --git a/Documentation/LCDLanguageFont.md b/Documentation/LCDLanguageFont.md index bd7775c62..235cc1f3b 100644 --- a/Documentation/LCDLanguageFont.md +++ b/Documentation/LCDLanguageFont.md @@ -38,7 +38,7 @@ We have two different technologies for the displays: * de German * es Spanish * ru Russian - * bgr Bulgarian + * bg Bulgarian * it Italian * pt Portuguese * pt-br Portuguese (Brazil) @@ -117,7 +117,7 @@ We have two different technologies for the displays: * MAPPER_NON is the fastest and least memory consuming variant. * Mappers together with a ISO10646_font are the second best choice regarding speed and memory consumption. Only a few more decisions are mad per character. * Mappers together with the HD44780_fonts use about additional 128 bytes for the mapping_table. - * e.) Creating a new language file is not a big thing. Just make a new file with the format 'language_xx.h' or maybe 'language.xx.utf8.h', define a mapper and a font in there and translate some of the strings defined in language_en.h. You can drop the surrounding #ifndef #endif. You don't have to translate all the stings - the missing one will be added by language_en.h - in English - of cause. + * e.) Creating a new language file is not a big thing. Just make a new file with the format 'language_xx.h' or maybe 'language.xx.utf8.h', define a mapper and a font in there and translate some of the strings defined in language_en.h. You can drop the surrounding #ifndef #endif. You don't have to translate all the stings - the missing one will be added by language_en.h - in English - of cause. If possible 'xx' should be the 2 letter code from ISO 639-1 for your language. * f.) If you cant find a matching mapper things will be a bit more complex. With the Hitachi based displays you will not have big chance to make something useful unless you have one with a matching charset. For a full graphic display - lets explain with - let's say Greece. Find a matching charset. (http://en.wikipedia.org/wiki/Greek_and_Coptic) Provide a font containing the symbols in the right size. Normal ASCII in the lower 127 places, the upper with your selection. diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9f0443c23..63ce9aee8 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -640,7 +640,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // @section lcd // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 4b1246be3..a3f378e4d 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -639,7 +639,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // @section lcd // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 9ae387639..f5d839a3e 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -572,7 +572,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 61dcad0c2..93eb47985 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -568,7 +568,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index f29d5ce82..e4df70ba2 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -594,7 +594,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 167e689db..860f04da2 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -600,7 +600,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index c3b46feb0..a4812f648 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -623,7 +623,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 2d7755e20..fe1988524 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -593,7 +593,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 46006b4f1..d7162c151 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -640,7 +640,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index af6628f32..657a653ce 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -644,7 +644,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 884241a21..857731fa2 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -591,7 +591,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 3c191bb30..0ef31bc8e 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -597,7 +597,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //==============================LCD and SD support============================= // Define your display language below. Replace (en) with your language code and uncomment. -// en, pl, fr, de, es, ru, bgr, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test +// en, pl, fr, de, es, ru, bg, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test // See also language.h //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en) diff --git a/Marlin/language.h b/Marlin/language.h index 99a5ff368..f352e4bb7 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -20,7 +20,7 @@ // de German // es Spanish // ru Russian -// bgr Bulgarian +// bg Bulgarian // it Italian // pt Portuguese // pt-br Portuguese (Brazil) diff --git a/Marlin/language_bgr.h b/Marlin/language_bg.h similarity index 100% rename from Marlin/language_bgr.h rename to Marlin/language_bg.h From 775ea401c8838d7cdb5e9b7815adefbb5b484483 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Mon, 18 May 2015 23:56:26 +0200 Subject: [PATCH 4/4] Delete Documentation/LCDLanguageFont.mf to avoid conflicts with Development --- Documentation/LCDLanguageFont.md | 147 ------------------------------- 1 file changed, 147 deletions(-) delete mode 100644 Documentation/LCDLanguageFont.md diff --git a/Documentation/LCDLanguageFont.md b/Documentation/LCDLanguageFont.md deleted file mode 100644 index befc526db..000000000 --- a/Documentation/LCDLanguageFont.md +++ /dev/null @@ -1,147 +0,0 @@ -# LCD Language Font System - -We deal with a variety of different displays. -And we try to display a lot of different languages in different scripts on them. -This system is ought to solve some of the related problems. - -## The Displays -We have two different technologies for the displays: - -* Character based displays: - Have a fixed set of symbols (charset - font) in their ROM. - All of them have a similar but not identical symbol set at the positions 0 to 127 similar to US-ASCII. - On the other hand symbols at places higher than 127 have mayor differences. - Until now we know of (and support): - * 1.) HD44780 and similar with Kana charset A00 https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page 17 - These are very common, but sadly not very useful when writing in European languages. - * 2.) HD44780 and similar with Western charset A02 https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page 18 - These are rare, but fairly useful for European languages. Also a limited number of Cyrillic symbols is available. - * 3.) HD44780 and similar with Cyrillic charset http://store.comet.bg/download-file.php?id=466 Page 14 - Some of our Russian friends use them. - - At all of them you can define 8 different symbols by yourself. In Marlin they are used for the Feedrate-, Thermometer-, ... symbols - -* Full graphic displays: - Where we have the full freedom to display whatever we want, when we can make a program for it. - Currently we deal with 128x64 Pixel Displays and divide this area in about 5 Lines with about 22 columns. - Therefore we need fonts with a bounding box of about 6x10. - Until now we used a - * 1.) Marlin-font similar to ISO10646-1 but with special Symbols at the end, what made 'ü' and 'ä' inaccessible, in the size 6x10. - * 2.) Because these letters where to big for some locations on the info-screen we use a full ISO10646-1 font in the size of 6x9.(3200 byte) - * 3.) When we define USE_BIG_EDIT_FONT we use an additional ISO10646-1 font with 9x18, eating up another 3120 bytes of progmem - but readable without glasses. - -## The Languages - For the moment Marlin wants to support a lot of languages: - * en English - * pl Polish - * fr French - * de German - * es Spanish - * ru Russian - * bg Bulgarian - * it Italian - * pt Portuguese - * pt-br Portuguese (Brazil) - * fi Finnish - * an Aragonese - * nl Dutch - * ca Catalan - * eu Basque-Euskera - * cn Chinese - * jp Japanese (Katakana) - - -## The Problem - All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII. - Even the English translation uses some Symbols not in US-ASCII. ( '\002' for Thermometer, STR_h3 for '³') - And worse, in the code itself symbols are used, not taking in account, on what display they are written. [(This is true only for Displays with Japanese charset](https://github.com/MarlinFirmware/Marlin/blob/Development/Marlin/ultralcd_implementation_hitachi_HD44780.h#L218) on Western displays you'll see a '~' and on Cyrillic an 'arrow coming from top - pointing to left', what is quite the opposite of what the programmer wanted.) - The Germans want to use "ÄäÖöÜüß" the Finnish at least "äö". Other European languages want to see their accents on their letters. - For other scripts like Cyrillic, Japanese, Greek, Hebrew, ... you have to find totally different symbol sets. - - Until now the problems where ignored widely. - The German translation used utf8 'ä' and 'ö' and did not care about showing garbage on ALL displays. - The Russian translators new that their system only works on the Cyrillic character displays and relied on special LCD routines (LiquidCrystalRus.cpp) to handle UTF8 but missed to implement a proper strlen(). - The Japanese translator dealed with to scripts. He introduced a very special font for the full graphic displays and made use of the Japanese version of the character displays. Therefore he ended up with two pretty unreadable language.h files full of '\xxx' definitions. - Other languages ether tried to avoid wording with their special symbols or ignored the problem at all and used the basic symbols without the accents, dots, ... whatever. - -## The (partial) Solution - On a 'perfect' system like Windows or Linux we'd dig out unifont.ttf and some code from the libraries and they'd do what we want. But we are on a embedded system with very limited resources. So we had to find ways to limit the used space (Alone unifont.ttf is about 12MB) and have to make some compromise. - -### Aims: - * 1.) Make the input for translators as convenient as possible. (Unicode UTF8) - * 2.) Make the displays show the scripts as good as they can. (fonts, mapping tables) - * 3.) Don't destroy the existing language files. - * 3.) Don't loose to much speed - * 4.) Don't loose to much memory. - -### Actions: - * a.) Declare the display hardware we use. (Configuration.h) - * b.) Declare the language ore script we use. (Configuration.h) - * c.) Declare the kind of input we use. Ether direct pointers to the font (\xxx) or UTF8 and the font to use on graphic displays. (language_xx.h) - * d.) Declare the needed translations. (language_xx.h) - * e.) Make strlen() work with UTF8. (ultralcd.cpp) - * f.) Seperate the Marlin Symbols to their own font. (dogm_font_data_Marlin_symbols.h) - * g.) Make the fontswitch function remember the last used font. (dogm_lcd_implementation.h) - * h.) Make output functions that count the number of written chars and switch the font to Marlin symbols and back when needed. (dogm_lcd_implementation.h) (ultralcd_implementation_hitachi_HD44780.h) - * i.) Make three fonts to simulate the HD44780 charsets on dogm-displays. With this fonts the translator can check how his translation will look on the character based displays. - * j.) Make ISO fonts for Cyrillic and Katakana because they do not need a mapping table and are faster to deal with and have a better charset (less compromises) than the HD44780 fonts. - * k.) Make mapping functions and tables to convert from UTF8 to the fonts and integrate in the new output functions. (utf_mapper.h) - * l.) Delete the not needed any more 'LiquidCrystalRus.xxx' files and their calls in 'ultralcd_implementation_hitachi_HD44780.h'. - * m.) Split 'dogm_font_data_Marlin.h' into separate fonts and delete. (+dogm_font_data_6x9_marlin.h , +dogm_font_data_Marlin_symbols.h, -dogm_font_data_Marlin.h) - * n.) Do a bit of preprocessor magic to match displays - fonts and mappers in 'utf_mapper.h'. - -## Translators handbook - * a.) Check is there already is a language_xx.h file for your language (-> b.) or not (-> e.) - * b.) Ether their is declared MAPPER_NON (-> c.) or an other mapper (-> d.) - * c.) Symbols outside the normal ASCII-range (32-128) are written as "\xxx" and point directly into the font of the hardware you declared in 'Configuration.h' - This is one of the three fonts of the character based Hitachi displays (DISPLAY_CHARSET_HD44780_JAPAN, DISPLAY_CHARSET_HD44780_WEST, DISPLAY_CHARSET_HD44780_CYRILIC). - Even on the full graphic displays one of these will be used when SIMULATE_ROMFONT is defined. - If you don't make use of the extended character set your file will look like 'language_en.h' and your language file will work on all the displays. - If you make intensive use, your file will look like 'language_kana.h' and your language file will only work on one of displays. (in this case DISPLAY_CHARSET_HD44780_JAPAN) - Be careful with the characters 0x5c = '\', and 0x7b - 0x7f. "{|}"These are not the same on all variants. - MAPPER_NON is the fastest an least memory consuming variant. - If you want to make use of more than a view symbols outside standard ASCII or want to improve the portability to more different types of displays use UTF8 input. That means define an other mapper. - * d.) With a mapper different to MAPPER_NON UTF8 input is used. Instead of "\xe1" (on a display with Japanese font) or STR_ae simply use "ä". When the string is read byte by byte , the "ä" will expand to "\0xc3\0xa4" or "Я" will expand to "0xd0\0xaf" or "ホ" will expand to "\0xe3\0x83\0x9b" - To limit the used memory we can't use all the possibilities UTF8 gives at the same time. We define a subset matching to the language or script we use. - * MAPPER_C2C3 correspondents good with west European languages the possible symbols are listed at (http://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)) - * MAPPER_D0D1 correspondents well with the Cyrillic languages. See (http://en.wikipedia.org/wiki/Cyrillic_(Unicode_block)) - * MAPPER_E382E383 works with the Japanese Katakana script. See (http://en.wikipedia.org/wiki/Katakana_(Unicode_block)) - - The mapper functions will only catch the 'lead in' described in the mappers name. If the input they get does not match they'll put out a '?' or garbage. - The last byte in the sequence ether points directly into a matching ISO10646 font or via a mapper_table into one of the HD44780 fonts. - The mapper_tables do their best to find a similar symbol in the HD44780_fonts. For example replacing small letters with the matching capital letters. But they may fail to find something matching and will output a '?'. There are combinations of language and display what simply have no corresponding symbols - like Cyrillic on a Japanese display or visa versa - than the compiler will throw an error. - In short: Chose a Mapper working with the symbols you want to use. Use only symbols matching the mapper. On FULL graphic displays all will be fine, but check for daring replacements or question-marks in the output of character based displays by defining SIMULATE_ROMFONT and trying the different variants. - If you get a lot of question-marks on the Hitachi based displays with your new translation, maybe creating an additional language file with the format 'language_xx_utf8.h' is the way to go. - * MAPPER_NON is the fastest and least memory consuming variant. - * Mappers together with a ISO10646_font are the second best choice regarding speed and memory consumption. Only a few more decisions are mad per character. - * Mappers together with the HD44780_fonts use about additional 128 bytes for the mapping_table. - * e.) Creating a new language file is not a big thing. Just make a new file with the format 'language_xx.h' or maybe 'language.xx.utf8.h', define a mapper and a font in there and translate some of the strings defined in language_en.h. You can drop the surrounding #ifndef #endif. You don't have to translate all the stings - the missing one will be added by language_en.h - in English - of cause. If possible 'xx' should be the 2 letter code from ISO 639-1 for your language. - * f.) If you cant find a matching mapper things will be a bit more complex. With the Hitachi based displays you will not have big chance to make something useful unless you have one with a matching charset. For a full graphic display - lets explain with - let's say Greece. - Find a matching charset. (http://en.wikipedia.org/wiki/Greek_and_Coptic) - Provide a font containing the symbols in the right size. Normal ASCII in the lower 127 places, the upper with your selection. - Write a mapper catching, in this case, 0xcd to 0xcf and add it to 'utf_mapper.h'. - In case of a ISO10646 font we have a MAPPER_ONE_TO_ONE and don't have to make a table. - * g.) If you discover enough useful symbols in one of the HD44780 fonts you can provide a mapping table. For example HD44780_WEST contains 'alpha', 'beta', 'pi', 'Sigma', 'omega' 'My' - what is not enough to make USEFUL table - I think. - * h.) If you want to integrate an entirely new variant of a Hitachi based display. - Add it in 'Configuration.h'. Define mapper tables in 'utf_mapper.h'. Maybe you need a new mapper function. - - The length of the strings is limited. '17 chars' was crude rule of thumb. Obviously 17 is to long for the 16x2 displays. A more exact rule would be max_strlen = Displaywidth - 2 - strlen(value to display behind). This is a bit complicated. So try and count is my rule of thumb. - - On the 16x2 displays the strings are cut at the end to fit on the display. So it's a good idea to make them differ early. ('Somverylongoptionname x' -> 'x Somverylongoptionname') - - You'll find all translatable strings in 'language_en.h'. Please don't translate any strings from 'language.h', this may break the serial protocol. - - For information about fonts see: Marlin\fonts\README.fonts - - -## User Instructions - Define your hardware and the wanted language in 'Configuration.h'. - To find out what charset your hardware is, define language 'test' and compile. In the menu you will see two lines from the upper half of the charset. - * DISPLAY_CHARSET_HD44780_JAPAN locks like "バパヒビピフブプヘベペホボポマミ" - * DISPLAY_CHARSET_HD44780_WESTERN locks like "ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß" - * DISPLAY_CHARSET_HD44780_CYRILIC locks like "РСТУФХЦЧШЩЪЫЬЭЮЯ" - - If you get an error about missing mappers during compilation - lie about your displays hardware font to see at lest some garbage, or select an other language. - - English works on all hardware. -