Chris McGrath
6bb784eab0
Remove i18n symbol dependency
...
date.order is the only key in rails i18n that is required to be a
symbol. This patch allows for symbols or strings which means:
* No requirement for symbol type in .yml files. A future
YAML.safe_load wouldn't need to load symbols
* Rails could actually use json rather than yml as the backend
2013-01-17 15:21:26 +00:00
Steve Klabnik
e22e785451
Add i18n scope to disance_of_time_in_words.
...
This fixes #733 .
2012-10-19 18:35:23 -03:00
Dmitriy Kiriyenko
4a2d53a514
Replace boolean argument with an options hash.
...
This replaces `include_seconds` argument with an option key
`include_seconds => true` in options hash.
Also `time_ago_in_words` now passes options hash, including a `locale`
key, which makes in compatible with `distance_of_time_in_words`.
2012-04-30 10:26:11 +03:00
Vasiliy Ermolovich
735c56d0cd
tiny refactoring
...
use :default option with translate method instead of condition
simplify separator method
2012-01-29 18:26:38 +03:00
Indrek Juhkam
88ec722a0f
Raise exception when date.order includes invalid elements
2012-01-22 23:47:36 +02:00
Aaron Patterson
fd918fe5ed
AP tests should inherit from AS::TestCase
2012-01-05 17:05:44 -08:00
Emilio Tagua
f625b87f24
These tests shouldn't depend on local time to pass or fail, we can use utc here.
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-24 15:51:29 +02:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
John Trupiano
c9318e9010
Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 days return '2 days'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#3266 state:committed]
2009-09-28 14:37:31 +13:00
Jeremy Kemper
278186534c
Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.
2009-02-03 18:40:22 -08:00
Sam Oliver
70456aed31
Use I18n for date/time select helpers prompt text [ #561 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-22 15:13:39 +00:00
Sven Fuchs
12118963ac
use :en as a default locale (in favor of :en-US)
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-18 14:23:53 +01:00
Sven Fuchs
bdf783b5a8
update i18n usage for pluralization hashes (api change)
2008-08-10 21:29:02 +02:00
Clemens Kofler
105093f907
Refactor DateHelper to use DateTimeSelector presenter pattern
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-07 13:13:47 -05:00
Sven Fuchs
84816ae981
align with changes in i18n
2008-07-06 21:20:02 +02:00
Luca Guidi
66c2508ebb
Make sure mocha is available
2008-06-27 15:00:55 +02:00
Sven Fuchs
ac66865ea3
update tests according to removal of self.locale from helpers
2008-06-23 14:49:02 +02:00
Sven Fuchs
3533dc6812
check self.locale instead of request.locale in helpers
2008-06-22 13:49:38 +02:00
Sven Fuchs
45d41f0dad
integrating I18n into Rails
2008-06-19 16:25:27 +02:00