aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/i18n.md
Commit message (Collapse)AuthorAgeFilesLines
...
* i18n guide: clarify interpolation rules in _html keys [ci skip]Xavier Noria2014-09-101-0/+16
|
* Merge pull request #16097 from nishantmodak/correct_mdZachary Scott2014-07-081-3/+3
|\ | | | | correct markdown usage [ci skip]
| * correct markdown usage [ci skip]Nishant Modak2014-07-091-3/+3
| |
* | Update Rails versions [ci skip]Robin Dupret2014-07-071-2/+2
|/ | | | | | | | | | | | | As discussed in #15304, we need to automate this process but for now, having out-of-date versions is not ideal. Since master targets 4.2.0, let's also update references to the last 4.1 version to 4.2.0. Finally, let's remove mentions to versions when this is not needed. The guides cover the features of the current version anyway. [Juanito Fatas + Robin Dupret]
* Pluralize paramsMauro George2014-06-031-1/+1
|
* Add default_i18n_subject to the guidesMauro George2014-06-031-0/+18
| | | | [ci skip]
* Include label value in i18n attribute lookupJoshua Cody2014-05-061-0/+13
| | | | | | | | | | | | | | | | | | | | | Previously, only the object and method name from the label tag were used when looking up the translation for a label. If a value is given for the label, this ought to be additionally used. The following: # form.html.erb <%= form_for @post do |f| %> <%= f.label :type, value: "long" %> <% end %> # en.yml en: activerecord: attributes: post/long: "Long-form Post" Used to simply return "long", but now it will return "Long-form Post".
* [skip ci] Reorder i18n guideKyle Heironimus2014-04-161-54/+54
| | | | | | | | | | Currently, the section called "How to store your custom translations" has several subheadings that make no sense, such as "Translations for ActiveRecord models." These make more sense under the "Overview of the I18n API Features" section. I moved the "How to store..." section down to the more appropriate sub-headings "Using Different Backends" and "Using Different Exception Handlers" and removed the "Customize your i18n setup" header.
* [ci skip] Avoid suggesting dangerous code in i18n guideMike MacDonald2014-04-151-2/+2
| | | | | | | | Calling `to_sym` on user input opens apps up to Denial of Service attacks, via the symbol table being expanded to consume vast swathes of memory. It is a fairly common configuration to have DNS configured such that all subdomains route to your Rails app, in which case an attacker visits `www1.foo.com`, `www2.foo.com`, and so on until something gives. It is far less likely to have this problem with TLDs, so that change was only for consistency.
* Update documentation to use Rails.application insteadMarcel Morgan2014-04-131-1/+1
| | | | | | | References to ``AppName::Application` removed in favour of ``Rails.application`` as generated with a new rails 4.1 app. [ci skip]
* Fix default_url_options example in i18n guide [ci skip]Nikolay Shebanov2014-04-031-5/+4
|
* Fix a grammatical error in the i18n guide [ci skip]sukolsak2014-03-121-1/+1
|
* Revert "Don't symbolize tainted data." [ci skip]Xavier Noria2014-02-111-5/+1
| | | | | | | | Reason: i18n whitelists now locales without passing through symbols, see https://github.com/svenfuchs/i18n/blob/master/lib/i18n.rb#L278. Therefore, this snippet is no longer a good practice. This reverts commit ec0664a6eb8906fcd31a53a1efad69bdc7fe6f5b.
* Don't symbolize tainted data.devlin zed2014-02-111-1/+5
| | | | | | | `I18n.locale=` symbolizes its argument, so passing it `params[:locale]` allows one to DOS your application by visiting `...?locale=` URLS repeatedly, with unique values, until the never-GCed symbols monopolize the available memory.
* Missing closing parenthesis.edogawaconan2014-02-041-1/+1
|
* Change all "can not"s to the correct "cannot".T.J. Schuck2014-01-031-2/+2
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-12-201-1/+1
|\
| * Revert "Fix on-site markdown rendering [ci skip]"Vijay Dev2013-12-191-1/+1
| | | | | | | | | | | | This reverts commit 427db6b9d2b35a72f3c017eb19a2e1e800b0a7a3. [ci skip]
| * Revert "Underscore in markdown should be escaped with backslash [ci skip]"Vijay Dev2013-12-191-1/+1
| | | | | | | | | | | | | | | | This reverts commit b58f3a641795e1777aa3e12a853c34ff512acfb9. Reason: Discussion in https://github.com/rails/docrails/commit/b58f3a641795e1777aa3e12a853c34ff512acfb9 [ci skip]
| * Fix on-site markdown rendering [ci skip]Harshad Sabne2013-11-281-1/+1
| |
| * Underscore in markdown should be escaped with backslash [ci skip]Harshad Sabne2013-11-261-1/+1
| | | | | | In the absence of proper escaping the first link was getting messed up and remaining part of the sentence (2nd link) was not displayed in the rendered markdown on the website though it was displaying correctly in the repository markdown file.
| * Globalize has moved to a new repositoryHarshad Sabne2013-11-251-1/+1
| | | | | | From (svenfuchs/globalize3) to (globalize/globalize)
* | Added `absence` parameter to pluralization tableIvan2013-12-161-0/+1
|/ | | Added `absence` parameter to table in section `5.1.2 Error Message Interpolation`.
* Merge remote-tracking branch 'docrails/master'Xavier Noria2013-11-241-1/+1
|\ | | | | | | | | | | Conflicts: activesupport/lib/active_support/core_ext/hash/deep_merge.rb activesupport/lib/active_support/core_ext/hash/keys.rb
| * Fix broken Wikipedia link.Harshad Sabne2013-11-131-1/+1
| |
* | Added a missing close parenthesis to i18n.mdJacob Evan Shreve2013-11-211-1/+1
|/
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2013-11-071-1/+7
|\
| * Fixes typoJay Hayes2013-10-201-1/+1
| |
| * Update I18n guide to note the additional features of the `translate` view helperJay Hayes2013-10-191-1/+7
| |
* | Clarify HTML Safe Translations [ci-skip]Derek Prior2013-11-051-1/+1
|/ | | | | | I think it's confusing to say "Use them in views without escaping." We use all keys in views without escaping - the escaping is done for us automatically _unless_ we call html_safe or the key ends in _html.
* [Documentation] Add a missing validation to I18n docsGrayson Wright2013-09-241-0/+1
| | | | | The guide was missing a description of the error message interpolation for validates_numericality_of with the :only_integer option.
* [ci skip] Fix links in section 5.3 of i18n.mdJuanito Fatas2013-09-101-5/+5
| | | | Now all links point to the correct line number.
* [ci skip] Add missing setting locale code snippet.Juanito Fatas2013-09-101-0/+11
| | | | | | | | This is for 3 Internationalizing your Application of i18n.md. Missing the code as mentioned in 2.3, setting locale. Without this, the example to add config/locales/pirate.yml will not work.
* [ci skip] Change link name of Rails i18n wiki.Juanito Fatas2013-09-091-1/+1
| | | | Actually it's Ruby i18n link.
* Use Ruby on Rails Coding Conventions for code examples in the guidesPaul Nikitochkin2013-09-061-4/+5
| | | | | | | | * Indent after private/protected * Ruby >= 1.9 syntax for hashes * Prefer method { do_stuff } instead of method{do_stuff} for single-line blocks. [ci skip]
* cleans the guides sources from fancy non-ASCII stuffXavier Noria2013-08-231-10/+10
|
* Add plural form example for AR I18n section [ci skip]Sadjow Leão2013-08-131-0/+13
|
* Updated the guide to say that the localisation file for validation messages ↵Iain Beeston2013-08-031-1/+1
| | | | is in activemodel, not activerecord
* Added missing closing bracket for markdown url in guides [ci skip]Wojciech Wnętrzak2013-08-011-1/+1
|
* Fixing the broken URL [skip ci]Ankit Gupta2013-07-291-1/+1
|
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2013-07-061-0/+5
|\
| * Complete a sentence in i18n guide's introductionRobin Dupret2013-06-301-0/+5
| | | | | | Add a list of what will be covered into this guide
* | Specify request method in guides [ci skip]Mihail Evsyukov2013-07-041-1/+1
| |
* | Fixing links to accept_language plugin/middlewareWouter van Lelyveld2013-06-271-1/+1
|/
* fix the path of action view from actionpack/lib/action_view => ↵Rajarshi Das2013-06-211-3/+3
| | | | actionview/lib/action_view
* Remove double spaces in code examplesSunny Ripert2013-05-281-1/+1
|
* Github -> GitHub [ci skip]Prathamesh Sonpatki2013-05-051-3/+3
|
* Added missing ')' on routing_filter linkhughkelsey2013-04-231-1/+1
|
* describe Action Mailer I18n subject lookupYves Senn2013-04-041-0/+22
|
* Revert "updating i18n guide with locale config location."Carlos Antonio da Silva2013-01-221-1/+1
| | | | This reverts commit 46902908910c041e268429d674bbe084399cc664.