aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/translation_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Hash Syntax to 1.9 related changesAvnerCohen2012-10-291-1/+1
|
* Fixed typo new_defautls -> new_defaults.Philip Arndt2012-05-231-2/+2
| | | | | * Added tests for 'else' case in ActionView::Helpers::TranslationHelper#wrap_translate_defaults * Also updated the testing syntax of translation.html_safe? asserts to provide better output upon failure.
* Added reference to I18n.localize, as discussed here:Ernesto Tagwerker2012-05-041-0/+3
| | | | https://github.com/rails/rails/issues/4027
* wrap translate defaults to use translate helper features, closes #1102Sergey Nartimov2012-04-301-0/+16
|
* Don't html-escape the :count option to translate if it's a Numeric. Fixes #3685.Jon Leighton2011-11-191-1/+3
|
* _html translation should escape interpolated argumentslest2011-11-171-4/+9
|
* Revert "warn the user values are directly interpolated into _html ↵Xavier Noria2011-11-171-2/+0
| | | | | | | | | | translation strings" Reason: After another round of discussion, it has been decided to let interpolation deal with unsafe strings as it should do. This reverts commit d57d8098fc269a26ea0051a9027a33af1a9a4b2b.
* warn the user values are directly interpolated into _html translation stringsXavier Noria2011-11-171-0/+2
|
* now the documentation reflects the actual returned value for a missing ↵gnagno2011-07-231-1/+1
| | | | translation
* simplify to only one conditionDamien Mathieu2011-06-151-5/+1
| | | | Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
* Make MissingTranslation exception handler respect :rescue_formatAndrew White2011-06-151-1/+5
|
* Fix styiling issue on TranslationHelper docsSebastian Martinez2011-05-101-4/+4
|
* Remove dependency from _template.José Valim2011-05-011-2/+2
|
* bump the i18n gem to 0.6.0beta1 and update docs for the i18n exception ↵Sven Fuchs2011-04-261-3/+3
| | | | | | handler [#6739 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Action Pack typos.R.T. Lechow2011-03-051-1/+1
|
* Allow back passing :rescue_format => nil and test addedSantiago Pastorino2010-12-041-1/+1
|
* Use ||= hereSantiago Pastorino2010-12-041-1/+1
|
* Make TranslationHelper#translate use the :rescue_format option in I18n 0.5.0Sven Fuchs2010-12-041-7/+25
| | | | | | 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>
* Clean up unused methods from AV::Base and pass in the template object on ↵José Valim2010-10-101-2/+2
| | | | rendering.
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-9/+9
| | | | 's/[ \t]*$//' -i {} \;)
* Added titles and description.Rizwan Reza2010-06-161-10/+17
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-2/+2
|
* i18n: t() handles single keys returning an Array, alsoJeremy Kemper2010-05-241-2/+5
|
* translate method doesn't support arrays anymore and is optimized to be used ↵Santiago Pastorino2010-05-241-18/+10
| | | | | | with strings or symbols Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "translation method for arrays on TranslationHelper module returns an ↵Santiago Pastorino2010-05-241-25/+25
| | | | | | | | array where values for keys of the form (.|_)html keys are html_safe" This reverts commit 05c95b5c5815c0b3ae55fda7a897922b7f3ec2c7. Signed-off-by: José Valim <jose.valim@gmail.com>
* translation method for arrays on TranslationHelper module returns an array ↵Santiago Pastorino2010-05-241-25/+25
| | | | | | | | where values for keys of the form (.|_)html keys are html_safe [#4675] Signed-off-by: José Valim <jose.valim@gmail.com>
* Speed up I18n helpers in views and add entry to CHANGELOG.José Valim2010-05-011-7/+3
|
* Changed translate helper so that it doesn’t mark every translation as safe ↵Craig Davey2010-04-131-3/+23
| | | | | | 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>
* scope_key_by_partial fix for Ruby 1.9 when there's virtual_path [#4202 ↵Santiago Pastorino2010-03-161-2/+3
| | | | | | state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* translation method of TranslationHelper module returns always SafeBuffer ↵Santiago Pastorino2010-03-161-1/+1
| | | | | | [#4194 status:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Change array entries to safe doesn't worth then the array is joined as a ↵Santiago Pastorino2010-03-161-1/+1
| | | | | | string losing the safe property of his entries [#4134 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Bump i18n for new public I18n.normalize_keysJeremy Kemper2010-02-251-1/+1
|
* ruby 1.9 array.to_s returns a string representing an escaped arraySantiago Pastorino2010-02-181-1/+1
| | | | Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
* i18n translate with arrays issue solvedSantiago Pastorino2010-02-181-2/+3
| | | | Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-1/+1
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* Fix t('.helper').José Valim2010-01-261-2/+6
|
* Translated strings in the view are assumed html_safe (Closes #3401)David Heinemeier Hansson2009-12-241-1/+1
|
* Fix some Ruby warnings: `*' interpreted as argument prefixBryan Helmkamp2009-11-091-1/+1
|
* Added partial scoping to TranslationHelper#translate, so if you call ↵David Heinemeier Hansson2009-02-101-1/+19
| | | | translate('.foo') from the people/index.html.erb template, you'll actually be calling I18n.translate(people.index.foo) [DHH]
* A little less hokus pokusDavid Heinemeier Hansson2008-10-281-5/+4
|
* I18n: add aliases #t and #l to TranslationHelper#translate and #localizeSven Fuchs2008-08-251-0/+2
|
* fixing another timezone dependent testSven Fuchs2008-07-161-1/+1
|
* Added localize helper methodLuca Guidi2008-07-081-0/+4
|
* align with changes in i18nSven Fuchs2008-07-061-3/+3
|
* add a translation helperSven Fuchs2008-07-061-0/+16