[wp-trac] [WordPress Trac] #8759: Word count function doesn't work in several languages
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 12 02:19:10 UTC 2012
#8759: Word count function doesn't work in several languages
----------------------------+-----------------------
Reporter: jim912 | Owner: nacin
Type: task (blessed) | Status: accepted
Priority: low | Milestone: 3.4
Component: I18N | Version: 2.7
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+-----------------------
Comment (by jiehanzheng):
In [attachment:8759.3.diff], I made the options "Count Latin by", "Count
Latin spaces", "Count East Asia punctuation marks" separately-
controllable, which gives more control to translators. For example, the
Chinese team could translate the control strings like this:
{{{
"Count Latin by" --> "words"
"Count Latin spaces" --> "no"
"Count East Asia punctuation marks" --> "yes"
}}}
And the Japanese team could set the strings like this:
{{{
"Count Latin by" --> "characters"
"Count Latin spaces" --> "yes"
"Count East Asia punctuation marks" --> "yes"
}}}
Known issue:
* I am unable to match Unicode chars which have five hex digits, maybe due
to JavaScript RegExp restrictions? Does anyone have solutions? Although
those characters that have five hex digits are used '''very rarely''', and
should only affect Chinese characters.
Notes: The Unicode ranges for East Asia characters listed in
settingsEastAsia.count are copied from http://www.unicode.org/charts/.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/8759#comment:37>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list