[asterisk-bugs] [Asterisk 0015346]: [patch] TW is not an ISO Language Code
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Jun 29 11:50:51 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15346
======================================================================
Reported By: volivier
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 15346
Category: Core/Internationalization
Reproducibility: always
Severity: minor
Priority: normal
Status: ready for testing
Asterisk Version: 1.6.1.0
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-06-17 16:49 CDT
Last Modified: 2009-06-29 11:50 CDT
======================================================================
Summary: [patch] TW is not an ISO Language Code
Description:
Tawanese actually is standard mandarin chinese that is categorized as
"zh-tw" or simply "zh" and NEVER "tw". Should simply be "zh" in Asterisk
because Asterisk is not concerned with the actual script of a locale (the
way it is written).
The reason why setting taiwanese as "tw" is a problem, is because it
fragments the efforts to localize in the standard mandarin chinese language
(which is coded as "zh") and is a bad internationalization practice
altogether.
======================================================================
----------------------------------------------------------------------
(0107141) davidw (reporter) - 2009-06-29 11:50
https://issues.asterisk.org/view.php?id=15346#c107141
----------------------------------------------------------------------
It's wrong or incomplete if 1.6.1.1 is the same in this respect as 1.6.1.0,
as the code doubles to code for another bogus language, with slightly
different handling for zero (this may be historic, and unreachable, as I
can't see a difference between if and else branches):
2279 }
2280 if (strcasecmp(language,"twz") ==
0)
2281 snprintf(fn, sizeof(fn),
"digits/%d", num);
2282 else
2283 snprintf(fn, sizeof(fn),
"digits/%d", num);
Also, I don't think it should be saying Taiwanese in the comments, as it
is talking about Chinese as a language, not about administrative units.
The only clue as to the actual language, for which the code was originally
written, is the use of "wan", which is consistent with Mandarin, but might
be more universal.
ast_say_digit_str_full needs changing to use yao. As I say it really
needs native speakers to determine whether this special case applies to
zh_*. This is probably a different issue, but potentially affects whether
one can use a single set of syntax rules for zh_*.
One big problem may be tone sandhi. It's possible that say_digits mode
can treat each character in isolation, but say number really ought to apply
the rules for combining tones (which are, unfortunately, rather more
complex than those given in the average text book for foreigners). The
tone systems are definitely not consistent across zh_*.
For the record, my Chinese level was HSK Basic Level 2 about 3 years ago,
which is one level below the minimum level for to take undergraduate
science courses and well below that to be certain about language issues. I
believe the grading scheme has changed since.
Issue History
Date Modified Username Field Change
======================================================================
2009-06-29 11:50 davidw Note Added: 0107141
======================================================================
More information about the asterisk-bugs
mailing list