-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Update Japanese translation (work in progress) #4185
Conversation
Would it help to make a grammatically correct, and shorter, message if you would translate |
Perhaps we should include in the language files… #define MSG_HOME_XYZ_FIRST MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST Then in German you can just shuffle the parts… #define MSG_HOME_XYZ_FIRST MSG_FIRST " " MSG_X MSG_Y MSG_Z " " MSG_HOME |
Well, I did it already.
It's impossible probably. @thinkyhead #define MSG_HOME_XY_FIRST MSG_FIRST " " MSG_X MSG_Y " " MSG_HOME is necessary for Cartesian, too...? |
Maybe. Although I think we now require homing X, Y, and Z on Cartesian, too, before leveling. (But don't take my word on that.) |
If combined before or not - the length on the screen is constant. |
I assume you mean that using multiple print statements with smaller segments (perhaps used elsewhere) saves memory over a |
Are the errors on the char displays status screen static? Or do the errors depend on the previous content of the screen? Likely the miss centred strings are caused by using the wrong strlen() function. There is a special one for UTF. Probably that is not used. |
It isn't static. I believe that those are debris of previous content of the screen. |
For the char display - do you use kana or kana_utf? The use of strlen seems to be ok. Likely the utf_strlen needs a tweak. |
If using kana.h you could try: int lcd_strlen(const char* s) {
int i = 0, j = 0;
while (s[i]) {
+ #ifndef MAPPER_NON
- if ((s[i] & 0xc0) != 0x80) j++;
+ if ((s[i] & 0xc0) != 0x80) j++;
+ #else
+ j++
+ #endif
i++;
}
return j;
}
int lcd_strlen_P(const char* s) {
int j = 0;
while (pgm_read_byte(s)) {
+ #ifndef MAPPER_NON
- if ((pgm_read_byte(s) & 0xc0) != 0x80) j++;
+ if ((pgm_read_byte(s) & 0xc0) != 0x80) j++;
+ #else
+ j++;
+ #endif
s++;
}
return j;
} |
Strange. There is a call to |
Is this resolved by #4281? (I'm guessing no.) |
PR #4281 (Don't use UTF-strlen() if the text is not UTF) solved the problem of text position absolutely. |
The refresh on info (static) screens should be minimal. Maybe the draw flag is being set too often… The PR below might help… |
I've confirmed that PR #4309 (Fix skipping of static items) solved problem of refresh rate. |
Rebase or redo? |
I rebased. Ah, and I remember another displaying problem that it's only occured on ASCII LCD with |
I'm sure the problem is that the message length is being incorrectly padded out. The problem is either with the way string-length is being decided here: void set_utf_strlen(char* s, uint8_t n) {
uint8_t i = 0, j = 0;
while (s[i] && (j < n)) {
if ((s[i] & 0xC0u) != 0x80u) j++;
i++;
}
while (j++ < n) s[i++] = ' ';
s[i] = '\0';
}
void lcd_setstatus(const char* message, bool persist) {
if (lcd_status_message_level > 0) return;
strncpy(lcd_status_message, message, 3 * (LCD_WIDTH));
set_utf_strlen(lcd_status_message, LCD_WIDTH); // pad with spaces to this width
lcd_finishstatus(persist);
}
void lcd_setstatuspgm(const char* message, uint8_t level) {
if (level < lcd_status_message_level) return;
lcd_status_message_level = level;
strncpy_P(lcd_status_message, message, 3 * (LCD_WIDTH));
set_utf_strlen(lcd_status_message, LCD_WIDTH);
lcd_finishstatus(level > 0);
} …or it is something to do with the character mapper |
Update Japanese translation (work in progress)
・Add new translation
non-utf8:
MSG_SELECT
MSG_HOME
サキニ
MSG_FIRST
ヲフッキサセテクダサイ
MSG_FIRST
ヲフッキサセヨ
MSG_HALTED
プリンターハテイシシマシタ
MSG_PLEASE_RESET
リセットシテクダサイ
MSG_PRINT_TIME
プリントジカン
MSG_INFO_MENU
コノプリンターニツイテ
MSG_INFO_PRINTER_MENU
プリンタージョウホウ
MSG_INFO_STATS_MENU
プリントジョウキョウ
MSG_INFO_BOARD_MENU
セイギョケイジョウホウ
MSG_INFO_THERMISTOR_MENU
サーミスター
MSG_INFO_EXTRUDERS
エクストルーダースウ
MSG_INFO_BAUDRATE
ボーレート
MSG_INFO_PROTOCOL
プロトコル
MSG_INFO_PRINT_COUNT
プリントスウ
MSG_INFO_PRINT_COUNT
プリントスウ
MSG_INFO_COMPLETED_PRINTS
カンリョウスウ
MSG_INFO_COMPLETED_PRINTS
カンリョウスウ
MSG_INFO_PRINT_TIME
ゴウケイジカン
MSG_INFO_PRINT_TIME
ケイカジカン
MSG_INFO_MIN_TEMP
セッテイサイテイオン
MSG_INFO_MAX_TEMP
セッテイサイコウオン
MSG_INFO_PSU
デンゲンシュベツ
MSG_INFO_PSU
デンゲン
MSG_FILAMENT_CHANGE_HEADER
フィラメントコウカン
MSG_FILAMENT_CHANGE_OPTION_HEADER
ドウサヲセンタクシテクダサイ
MSG_FILAMENT_CHANGE_OPTION_EXTRUDE
サラニオシダス
MSG_FILAMENT_CHANGE_OPTION_RESUME
プリントサイカイ
MSG_FILAMENT_CHANGE_INIT_1
コウカンヲカイシシマス
MSG_FILAMENT_CHANGE_INIT_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_INIT_3
MSG_FILAMENT_CHANGE_UNLOAD_1
フィラメントヌキダシチュウ
MSG_FILAMENT_CHANGE_UNLOAD_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_INSERT_1
フィラメントヲソウニュウシ,
MSG_FILAMENT_CHANGE_INSERT_2
クリックスルトゾッコウシマス
MSG_FILAMENT_CHANGE_INSERT_3
MSG_FILAMENT_CHANGE_LOAD_1
フィラメントソウテンチュウ
MSG_FILAMENT_CHANGE_LOAD_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_EXTRUDE_1
フィラメントオシダシチュウ
MSG_FILAMENT_CHANGE_EXTRUDE_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_RESUME_1
プリントヲサイカイシマス
MSG_FILAMENT_CHANGE_RESUME_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_INIT_1
コウカンヲカイシシマス
MSG_FILAMENT_CHANGE_UNLOAD_1
フィラメントヌキダシチュウ
MSG_FILAMENT_CHANGE_INSERT_1
ソウニュウシ,クリックシテクダサイ
MSG_FILAMENT_CHANGE_INSERT_1
ソウニュウシ,クリックセヨ
MSG_FILAMENT_CHANGE_LOAD_1
フィラメントソウテンチュウ
MSG_FILAMENT_CHANGE_EXTRUDE_1
フィラメントオシダシチュウ
MSG_FILAMENT_CHANGE_RESUME_1
プリントヲサイカイシマス
utf8:
MSG_SELECT
MSG_HOME
サキニ
MSG_FIRST
ヲフッキサセテクダサイ
MSG_HALTED
プリンターハテイシシマシタ
MSG_PLEASE_RESET
リセットシテクダサイ
MSG_PRINT_TIME
プリントジカン
MSG_INFO_MENU
コノプリンターニツイテ
MSG_INFO_PRINTER_MENU
プリンタージョウホウ
MSG_INFO_STATS_MENU
プリントジョウキョウ
MSG_INFO_BOARD_MENU
セイギョケイジョウホウ
MSG_INFO_THERMISTOR_MENU
サーミスター
MSG_INFO_EXTRUDERS
エクストルーダースウ
MSG_INFO_BAUDRATE
ボーレート
MSG_INFO_PROTOCOL
プロトコル
MSG_INFO_PRINT_COUNT
プリントスウ
MSG_INFO_COMPLETED_PRINTS
カンリョウスウ
MSG_INFO_PRINT_TIME
ゴウケイジカン
MSG_INFO_MIN_TEMP
セッテイサイテイオン
MSG_INFO_MAX_TEMP
セッテイサイコウオン
MSG_INFO_PSU
デンゲンシュベツ
MSG_FILAMENT_CHANGE_HEADER
フィラメントコウカン
MSG_FILAMENT_CHANGE_OPTION_HEADER
ドウサヲセンタクシテクダサイ
MSG_FILAMENT_CHANGE_OPTION_EXTRUDE
サラニオシダス
MSG_FILAMENT_CHANGE_OPTION_RESUME
プリントサイカイ
MSG_FILAMENT_CHANGE_INIT_1
コウカンヲカイシシマス
MSG_FILAMENT_CHANGE_INIT_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_INIT_3
MSG_FILAMENT_CHANGE_UNLOAD_1
フィラメントヌキダシチュウ
MSG_FILAMENT_CHANGE_UNLOAD_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_INSERT_1
フィラメントヲソウニュウシ,
MSG_FILAMENT_CHANGE_INSERT_2
クリックスルトゾッコウシマス
MSG_FILAMENT_CHANGE_INSERT_3
MSG_FILAMENT_CHANGE_LOAD_1
フィラメントソウテンチュウ
MSG_FILAMENT_CHANGE_LOAD_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_EXTRUDE_1
フィラメントオシダシチュウ
MSG_FILAMENT_CHANGE_EXTRUDE_2
シバラクオマチクダサイ
MSG_FILAMENT_CHANGE_RESUME_1
プリントヲサイカイシマス
MSG_FILAMENT_CHANGE_RESUME_2
シバラクオマチクダサイ
・Change translation
non-utf8:
MSG_PREHEAT_1_ALL
MSG_PREHEAT_1 " スベテ"
MSG_PREHEAT_1_BEDONLY
MSG_PREHEAT_1 " ベッド"
MSG_PREHEAT_1_SETTINGS
MSG_PREHEAT_1 " セッテイ"
MSG_PREHEAT_1 "セッテイ"
MSG_PREHEAT_2_ALL
MSG_PREHEAT_2 " スベテ"
MSG_PREHEAT_2_BEDONLY
MSG_PREHEAT_2 " ベッド"
MSG_PREHEAT_2_SETTINGS
MSG_PREHEAT_2 " セッテイ"
MSG_PREHEAT_2 "セッテイ"
utf8:
MSG_PREHEAT_1_ALL
MSG_PREHEAT_1 " スベテ"
MSG_PREHEAT_1_BEDONLY
MSG_PREHEAT_1 " ベッド"
MSG_PREHEAT_1_SETTINGS
MSG_PREHEAT_1 " セッテイ"
MSG_PREHEAT_1 "セッテイ"
MSG_PREHEAT_2_ALL
MSG_PREHEAT_2 " スベテ"
MSG_PREHEAT_2_BEDONLY
MSG_PREHEAT_2 " ベッド"
MSG_PREHEAT_2_SETTINGS
MSG_PREHEAT_2 " セッテイ"
MSG_PREHEAT_2 "セッテイ"
Note:
This is acrobatic(tricky?) translation.
The original translation of the
MSG_HOME
isフッキ(+サセヨ or サセテクダサイ)
,MSG_FIRST
isサキニ
.In that case, translated sentence is
フッキサセテクダサイ
X``Y``Z
ヲサキニ
(MSG_HOME
" "MSG_X
MSG_Y
MSG_Z
" "MSG_FIRST
).But this is a really colloquial expression, thus this is unsuitable for displayed message.