Santiago Pastorino
b696dd70db
Allow back passing :rescue_format => nil and test added
2010-12-04 20:08:23 -02:00
Sven Fuchs
896e25e994
Make TranslationHelper#translate use the :rescue_format option in I18n 0.5.0
...
Don't catch exceptions here. Instead only declare that we want exceptions to be rescued as :html, but also let users configure reactions to exceptions in I18n.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-04 18:00:52 +01:00
José Valim
49b6f33f99
Clean up unused methods from AV::Base and pass in the template object on rendering.
2010-10-10 14:47:11 +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
Jeremy Kemper
f53a6d8149
i18n: t() handles single keys returning an Array, also
2010-05-24 20:30:21 -07:00
Santiago Pastorino
b5f9c8822d
translate method doesn't support arrays anymore and is optimized to be used with strings or symbols
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 23:42:20 +02:00
Santiago Pastorino
2b8eb5404e
Revert "translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe"
...
This reverts commit 05c95b5c58
.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 23:41:55 +02:00
Santiago Pastorino
05c95b5c58
translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe
...
[#4675 ]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 20:12:43 +02:00
Craig Davey
5208cc3cf5
Changed translate helper so that it doesn’t mark every translation as safe HTML. Only keys with a "_html" suffix and keys named "html" are considered to be safe HTML. All other translations are left untouched.
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-04-13 17:35:10 -07:00
Santiago Pastorino
0c1ac36ccb
scope_key_by_partial fix for Ruby 1.9 when there's virtual_path [ #4202 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 16:20:10 -07:00
Santiago Pastorino
12bf636461
translation method of TranslationHelper module returns always SafeBuffer [ #4194 status:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-16 13:49:13 -07:00
Yehuda Katz
bf8898b49b
Revert "i18n translate with arrays issue solved"
...
This reverts commit e7055e5b08
.
2010-02-19 15:05:46 -08:00
Santiago Pastorino
e7055e5b08
i18n translate with arrays issue solved
2010-02-19 13:59:15 -08:00
Santiago Pastorino
af05420d6b
i18n translate with arrays issue solved
...
Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
2010-02-18 16:41:00 -08:00
José Valim
dc57d545bb
Fix t('.helper').
2010-01-26 20:43:35 +01:00
David Heinemeier Hansson
a8f1ee5986
Fix tests
2009-12-25 10:04:26 -08:00
David Heinemeier Hansson
7527cdf79c
Added partial scoping to TranslationHelper#translate, so if you call translate('.foo') from the people/index.html.erb template, you'll actually be calling I18n.translate(people.index.foo) [DHH]
2009-02-10 12:57:12 +01:00
Jeremy Kemper
278186534c
Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.
2009-02-03 18:40:22 -08: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
David Heinemeier Hansson
4dbfe18b37
Proper API for reloading translations
2008-10-29 10:51:56 +01:00
Sven Fuchs
428b77debd
fixing another timezone dependent test
2008-07-16 11:07:08 -07:00
Luca Guidi
cf5d6ab9a8
Added localize helper method
2008-07-08 12:37:49 +02:00
Sven Fuchs
c9ed2c9bd2
add a translation helper
2008-07-06 19:00:55 +02:00