Summary: | Chinese l10n problem in check printing | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | wordlessecho |
Component: | translation | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | alvin, kde |
Priority: | NOR | ||
Version: | git (master) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
wordlessecho
2021-09-17 03:27:34 UTC
https://invent.kde.org/office/kmymoney/-/blob/2257a1e2f9837fa23b3ac4550fb422307cada5a6/kmymoney/plugins/checkprinting/numbertowords.cpp#L14 In Chinese: - smallNumbers should be 0 to 9. - Does not have "tens". - Numbers are grouped by four instead of three in English. - Any number ending with a zero could be a scaleNumber. Such as 10, 100, 1000…up to hundred million. (more rules after hundred million) Examples: Arabic numerals -> Chinese Simplified -> Chinese (when written on cheques) -> Word-for-word translation Note: 万 = Wan (ten thousand) 12 -> 十二 -> 拾贰 -> ten two 1212 -> 一千两百一十二 -> 壹仟贰佰壹拾贰 -> one thousand two hundred one ten two 12000 -> 一万二 -> 壹万贰 -> one Wan two 210000 -> 二十一万 -> 贰拾壹万 -> two ten one Wan We had a similar problem in Korean too, so that's why this exist: https://invent.kde.org/office/kmymoney/-/blob/2257a1e2f9837fa23b3ac4550fb422307cada5a6/kmymoney/plugins/checkprinting/numbertowords.cpp#L79 Instead of coding numerals for every language, it is possible to write a Javascript logic for translating them. The JS function should take numbers as input and should produce a proper translation. See also: https://techbase.kde.org/Localization/Concepts/Transcript and bug 420321 I believe the numbering rules between Chinese, Japanese and Korean are quite similar, but there may be some subtle differences with the handling of zeros and ones. Side note: In Hong Kong it is rather common for us to write cheques with the amount in English, so I would hope that KMyMoney will not force the use of Chinese numbers when the interface language is set to Chinese Traditional (zh_TW). (But to clarify, I don't use KMyMoney so I may be missing some context.) (In reply to Alvin Wong from comment #3) > I believe the numbering rules between Chinese, Japanese and Korean are quite > similar, but there may be some subtle differences with the handling of zeros > and ones. True, we don't explicitly mention zero and one in colloquial speech but ones are expllicitly mentioned in financial speech in Korean. That's why I only suppress zeroes at https://websvn.kde.org/trunk/l10n-kf5/ko/scripts/kmymoney/kmymoney.js?view=markup (line 19 to 28) and explicitly include ones. > Side note: In Hong Kong it is rather common for us to write cheques with the > amount in English, so I would hope that KMyMoney will not force the use of > Chinese numbers when the interface language is set to Chinese Traditional > (zh_TW). (But to clarify, I don't use KMyMoney so I may be missing some > context.) That's another good point... Do we support issuing cheques in different language from the current $LANG? |