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

Update Japanese translation (work in progress) #4185

Merged
merged 1 commit into from Jul 18, 2016
Merged

Update Japanese translation (work in progress) #4185

merged 1 commit into from Jul 18, 2016

Conversation

ghost
Copy link

@ghost ghost commented Jul 2, 2016

Update Japanese translation (work in progress)

・Add new translation
non-utf8:

derective translation notes
MSG_SELECT (work in progress) added by PR #4163
MSG_HOME サキニ
MSG_FIRST ヲフッキサセテクダサイ
MSG_FIRST ヲフッキサセヨ for 16 width ASCII LCD
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 プリントスウ for 16 width ASCII LCD
MSG_INFO_COMPLETED_PRINTS カンリョウスウ
MSG_INFO_COMPLETED_PRINTS カンリョウスウ for 16 width ASCII LCD
MSG_INFO_PRINT_TIME ゴウケイジカン
MSG_INFO_PRINT_TIME ケイカジカン for 16 width ASCII LCD
MSG_INFO_MIN_TEMP セッテイサイテイオン
MSG_INFO_MAX_TEMP セッテイサイコウオン
MSG_INFO_PSU デンゲンシュベツ
MSG_INFO_PSU デンゲン for 16 width ASCII LCD
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 None (unneeded)
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 None (unneeded)
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 コウカンヲカイシシマス for 2 lines ASCII LCD
MSG_FILAMENT_CHANGE_UNLOAD_1 フィラメントヌキダシチュウ for 2 lines ASCII LCD
MSG_FILAMENT_CHANGE_INSERT_1 ソウニュウシ,クリックシテクダサイ for 20 x 2 ASCII LCD
MSG_FILAMENT_CHANGE_INSERT_1 ソウニュウシ,クリックセヨ for 16 x 2 ASCII LCD
MSG_FILAMENT_CHANGE_LOAD_1 フィラメントソウテンチュウ for 2 lines ASCII LCD
MSG_FILAMENT_CHANGE_EXTRUDE_1 フィラメントオシダシチュウ for 2 lines ASCII LCD
MSG_FILAMENT_CHANGE_RESUME_1 プリントヲサイカイシマス for 2 lines ASCII LCD

utf8:

derective translation notes
MSG_SELECT (work in progress) added by PR #4163
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 None (unneeded)
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 None (unneeded)
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:

derective before after
MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " スベテ" PLA スベテヨネツ
MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " ベッド" PLA ベッドヨネツ
MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " セッテイ" MSG_PREHEAT_1 "セッテイ"
MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " スベテ" ABS スベテヨネツ
MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " ベッド" ABS ベッドヨネツ
MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 " セッテイ" MSG_PREHEAT_2 "セッテイ"

utf8:

derective before after
MSG_PREHEAT_1_ALL MSG_PREHEAT_1 " スベテ" PLA スベテヨネツ
MSG_PREHEAT_1_BEDONLY MSG_PREHEAT_1 " ベッド" PLA ベッドヨネツ
MSG_PREHEAT_1_SETTINGS MSG_PREHEAT_1 " セッテイ" MSG_PREHEAT_1 "セッテイ"
MSG_PREHEAT_2_ALL MSG_PREHEAT_2 " スベテ" ABS スベテヨネツ
MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 " ベッド" ABS ベッドヨネツ
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.

@AnHardt
Copy link
Contributor

AnHardt commented Jul 2, 2016

Would it help to make a grammatically correct, and shorter, message if you would translate
MSG_HOME to "first"
and
MSG_FIRST to "home"
like i did it for German?

@thinkyhead
Copy link
Member

thinkyhead commented Jul 2, 2016

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

@thinkyhead thinkyhead added this to the 1.1.0 milestone Jul 2, 2016
@ghost
Copy link
Author

ghost commented Jul 2, 2016

@AnHardt

make a grammatically correct ... MSG_HOME to "first" and MSG_FIRST to "home" like i did it for German

Well, I did it already.
Maybe my bad English confused you, sorry. And I thankful for your assistance.
Translated sentence of this PR is サキニ X``Y``Z ヲフッキサセテクダサイ.
This is natural for literary language.

shorter

It's impossible probably.
サセテクダサイ means "please do"(courteous expression), this expression isn't necessary in English(and the other languages conceivably), but it's necessary in Japanese.
It's cultural reason. Machine is vassal for human. Vassal(one's subordinate) has to use courteous expression to person who outranks one, in Japanese.
...サセヨ(for 16 chars LCD) means... maybe "Be"(imperative form) in English. Yes, it isn't best message by machine in Japanese.
But short courteous expression at this sentence doesn't exist probably. And サセヨ is still better than other imperative form, I think.
Every other short expressions are unsuitable obviously.
"サセテ" is colloquial and over-familiar(or vague expression), "シロ" is violent expression, "シナサイ" looks like a guidance for children by teacher and parents.
"ヲコウ"(を乞う) and "ヲモトム"(を求む) and "ヲヨウス"(を要す) are mandarin expressions in this situation...

@thinkyhead
It seems that it's a useful way for SOV(Subject–Object–Verb) languages.
But possibly at least,

#define MSG_HOME_XY_FIRST   MSG_FIRST " " MSG_X MSG_Y " " MSG_HOME

is necessary for Cartesian, too...?

@thinkyhead
Copy link
Member

thinkyhead commented Jul 2, 2016

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.)

@AnHardt
Copy link
Contributor

AnHardt commented Jul 2, 2016

#define MSG_HOME_XY_FIRST MSG_FIRST " " MSG_X MSG_Y " " MSG_HOME
No. Please do not recombine. If i remember correct the concatenation is done before putting into the progmem. So up to 7 separate, long, minimal different strings are stored. (XYZ, XY, XZ, YZ, X, Y, Z)
Combining on the fly saves memory.

If combined before or not - the length on the screen is constant.

@thinkyhead
Copy link
Member

Combining on the fly saves memory.

I assume you mean that using multiple print statements with smaller segments (perhaps used elsewhere) saves memory over a #define line like the above, which creates a whole new PROGMEM string.

@ghost ghost changed the title Update Japanese translation Update Japanese translation (work in progress) Jul 3, 2016
@ghost
Copy link
Author

ghost commented Jul 12, 2016

Translation has been almost done, but I'm getting displaying problem on ASCII LCD.
Many texts is pushed to right.
And after M600, debris of message is displayed every time.
But it seems that displaying of GLCD is good.

RepRapDiscount Full Graphic Smart Controller (UTF-8) RepRapDiscount Smart Controller (non UTF-8)
"About Printer" section "About Printer" section
dscn1659 dscn1651 1
dscn1660 dscn1652 1
M600 scenes M600 scenes
dscn1661 dscn1654 1
dscn1662 dscn1653 1
dscn1663 dscn1655 1
dscn1664 dscn1656 1
dscn1665 dscn1657 1
dscn1666 dscn1658 1

@Blue-Marlin
Copy link
Contributor

Blue-Marlin commented Jul 12, 2016

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.

@ghost
Copy link
Author

ghost commented Jul 12, 2016

Are the errors on the char displays status screen static? Or do the errors depend on the previous content of the screen?

It isn't static. I believe that those are debris of previous content of the screen.
The (previous) content is last message of M600 process (MSG_FILAMENT_CHANGE_HEAD and MSG_FILAMENT_CHANGE_RESUME_1 and MSG_FILAMENT_CHANGE_RESUME_2).

@Blue-Marlin
Copy link
Contributor

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.

@Blue-Marlin
Copy link
Contributor

Blue-Marlin commented Jul 12, 2016

If using kana.h you could try:
ultralcd.cpp

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;
}

@ghost
Copy link
Author

ghost commented Jul 12, 2016

For the char display - do you use kana or kana_utf?

ASCII LCD uses kana (non-UTF).
And Thanks for the unerring fix.
When I applied your patch, problem of text position is fixed absolutely.
But, debris of previous content still alive.

dscn1667 dscn1669 dscn1670
dscn1671 dscn1672 dscn1673
dscn1674 dscn1675 1 dscn1680 1

@ghost ghost changed the title Update Japanese translation (work in progress) Update Japanese translation (waiting for displaying system fixing) Jul 12, 2016
@thinkyhead
Copy link
Member

Strange. There is a call to lcd_implementation_clear whenever switching screens. It looks like it is being missed for the status screen, for some reason.

@thinkyhead
Copy link
Member

thinkyhead commented Jul 13, 2016

Is this resolved by #4281? (I'm guessing no.)

@ghost
Copy link
Author

ghost commented Jul 13, 2016

PR #4281 (Don't use UTF-strlen() if the text is not UTF) solved the problem of text position absolutely.
But about debris of previous content, it's still leaved.

@ghost
Copy link
Author

ghost commented Jul 13, 2016

By the way, there's something I'm a little curious about.
In case of GLCD, it seems that refresh rate of printer infomation screens are high.
Is this a intended behavior?

・Video clip

@ghost ghost changed the title Update Japanese translation (waiting for displaying system fixing) Update Japanese translation (work in progress) Jul 14, 2016
@thinkyhead
Copy link
Member

thinkyhead commented Jul 15, 2016

The refresh on info (static) screens should be minimal. Maybe the draw flag is being set too often… The PR below might help…

@ghost
Copy link
Author

ghost commented Jul 15, 2016

I've confirmed that PR #4309 (Fix skipping of static items) solved problem of refresh rate.

@thinkyhead
Copy link
Member

Rebase or redo?

@ghost ghost changed the title Update Japanese translation (work in progress) Update Japanese translation (waiting for displaying system fixing?) Jul 17, 2016
@ghost
Copy link
Author

ghost commented Jul 17, 2016

I rebased.

Ah, and I remember another displaying problem that it's only occured on ASCII LCD with language_kana.h.
If MSG_SD_INSERTED or MSG_SD_REMOVED include Kana, flickering occurs on first line of LCD when SD card is inserted or removed.
This problem exist from long time ago... before RC3...?

Video clip:

@thinkyhead
Copy link
Member

thinkyhead commented Jul 17, 2016

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 MAPPER_E382E383.

@ghost ghost changed the title Update Japanese translation (waiting for displaying system fixing?) Update Japanese translation (work in progress) Jul 17, 2016
@thinkyhead thinkyhead merged commit 4611759 into MarlinFirmware:RCBugFix Jul 18, 2016
@ghost ghost deleted the Update-Japanese-translation branch July 18, 2016 05:32
@thinkyhead thinkyhead mentioned this pull request Jul 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants