aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/i18n.md
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] Make clear what `this method` isyui-knk2015-06-241-1/+1
| | | | | | | | | | In this sentence, there are three candidates of `this method` * default_url_options * url_for * helper method(s) so make it clear.
* i18n guide: warn about default_url_options caching and locale selectors [ci ↵Xavier Noria2015-06-151-4/+6
| | | | skip]
* A few documentation tweaks [ci skip]Robin Dupret2015-06-071-1/+4
| | | | [Robin Dupret & Shunsuke Aida]
* Enhance the "Passing Variables to Translations" partEvan Prothro2015-05-041-19/+48
| | | | | | | | | Add more information about passing variables to translation definitions and also merge this part with the "Interpolation" one as the latter didn't bring any new information. Moreover, each one was referring to the other for further information. [ci skip]
* Updates various prose to the i18n guideEvan Prothro2015-05-041-49/+57
| | | | [ci skip]
* Fix typos and improve the documentationJon Atack2015-04-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a squash of the following commits, from first to last: - Fix minor, random things I’ve come across lately that individually did not seem worth making a PR for, so I saved them for one commit. One common error is using “it’s” (which is an abbreviation of “it is”) when the possessive “its” should be used for indicating possession. - Changes include the name of a test, so remove the `[skip ci]` (thanks @senny). - Line wrap the changes at 80 chars and add one more doc fix. - Add a missing line wrap in the Contributing to Ruby on Rails Guide. - Line wrap the `TIP` section in the Contributing to Ruby on Rails Guide as well. Rendering the guide locally with `bundle exec rake guides:generate` did not show any change in on-screen formatting after adding the line wrap. The HTML generated is (extra line added to illustrate where the line wrap takes place): <div class="info"><p>Please squash your commits into a single commit when appropriate. This simplifies future cherry picks and also keeps the git log clean.</p></div> - Squash commits.
* change REQUEST_URI to PATH_INFOMehmet Emin İNAÇ2015-04-041-1/+1
| | | | | request.env['REQUEST_URI'] returns full URI of the resource request.env['PATH_INFO'] returns only path of the resource
* Added missing closing brace in sample code for safe HTML translationsChristian Ress2015-03-131-1/+1
| | | | Closes #19321. [ci skip]
* Remove reference to workingwithrails.com since it is being retiredRichard Venneman2015-02-271-5/+2
|
* Fix code sample for custom exception handler [ci skip]Bart2015-02-191-2/+2
|
* Tiny documentation edits [ci skip]Robin Dupret2015-02-151-2/+3
|
* Document lazy lookup behavior for controllersCarlos Ramirez III2015-02-031-0/+19
| | | | | | | | Pull request #7082 added lazy lookup to controllers using the translate method, but the documentation still stated that it was available for views only. [ci skip]
* Add missing options to Error Message Interpolation guide [CI skip]Wojciech Wnętrzak2015-01-211-1/+2
|
* Underscore typo [ci skip]Jared Fine2015-01-161-1/+1
|
* - Changed `IN` to `ON` in markdown renderer conditionVipul A M2015-01-141-1/+1
| | | | - Changed `IN` to `ON` in all note sentences in guides.
* warn about reading guides in GitHubXavier Noria2014-12-231-0/+2
| | | | References #18148.
* [ci skip] fix class nameyui-knk2014-11-291-1/+1
|
* [ci skip] removing ruby-i18n.org/wiki link that is not available and using ↵Gaurav Sharma2014-10-091-9/+6
| | | | “gems” instead of plugins
* 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.