This project is archived and is in readonly mode.
Array#to_sentence(:locale => Asia) improvement
Reported by Akira Matsuda | November 18th, 2008 @ 05:22 AM
Similar to #1294
Array#to_sentence method cannot properly handle the corresponding expression in Eastern languages which don't use those characters (like Japanese, Chinese, etc).
Problem here again, is that comma and space character are hardcoded inside the "I18n ready" source code.
This patch moves these "Western" characrers into the locale resource file, without changing the default en-US behavior.
This enables Array#to_sentence to generate a natural spoken Japanese with the following locale settings.
ja-JP:
support:
array:
words_connector: "と"
two_words_connector: "と"
last_word_connector: "と"
Comments and changes to this ticket
-
Jeremy Kemper December 3rd, 2008 @ 05:15 PM
- Assigned user set to Jeremy Kemper
- Milestone cleared.
- State changed from new to open
-
Repository December 8th, 2008 @ 11:54 PM
- State changed from open to committed
(from [273c770011ab43d4b523caacb808bce070922d77]) Change Array#to_sentence I18n options to pass comma and space character from outside.
[#1397 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1397 Array#to_sentence(:locale => Asia) improvement [#1397 state:committed]