| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* s/Postgres/PostgreSQL/
* s/MYSQL/MySQL/, s/Mysql/MySQL/
* s/Sqlite/SQLite/
Replaced all newly added them after 6089b31.
|
|
|
|
| |
supports it.
|
|
|
|
|
|
| |
about leak into subsequent requests.
[ci skip]
|
|
|
|
| |
Since #34356 logging `locale` value is more correct
|
|
|
|
|
|
|
|
|
| |
Changes `I18n.locale` assignment in docs to use `I18n.with_locale`
in `around_action` to ensure locale resetting after action processing.
[ci skip]
[Gannon McGibbon + Leonardo Tegon]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bulk lookups are sort of an edge case, I have not heard of them until a colleague of mine decided to dynamically iterate over a growing set of translations and receiving them in bulk as a hash with `I18n.t 'welcome'` as in the example above.
When passing an interpolation to these bulk lookups, they will only be performed when also passing `deep_interpolation: true`.
**Without passing `deep_interpolation` flag:**
```ruby
I18n.t 'welcome', app_name: 'book store'
# => {:title=>"Welcome!", :content=>"Welcome to the %{app_name}"}
**With passing `deep_interpolation`:**
I18n.t 'welcome', deep_interpolation: true, app_name: 'book store'
# => {:title=>"Welcome!", :content=>"Welcome to the book store"}
```
I found this digging in the I18n lookup backend, the flag is listed on [I18n's Rubydoc](https://www.rubydoc.info/github/svenfuchs/i18n/master/I18n) but not otherwise listed. Since bulk lookups are mentioned here, I suggest to add a note with this flag along with it.
|
| |
|
|
|
|
|
|
|
| |
Clarify `I18n.load_paths` vs `Rails.application.config.i18n.load_paths`
behaviour.
[Gannon McGibbon + Alberto Almagro Sotelo]
|
| |
|
|
|
|
| |
restricted list and consistently use permitted
|
|
|
|
| |
allowlist
|
|
|
|
| |
allowlist
|
|
|
|
|
| |
http links will be redirected to the https version, but still better to
just directly link to the https version.
|
|
|
|
|
|
|
| |
[ci skip] A regular expression was used to find a lot of missing Oxford
commas and add them. The regular expression was as follows.
", ([a-zA-Z0-9.\`:'\"]+ ){1,6}(or|and) "
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Remove reference to Globalize::Backend::Static as this class no longer exists.
* Remove reference to google group
* Remove confusing reference to Globalize3
* Add section on translating stored content
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The guide misleadingly indicates that the I18n gem will apply the CLDR pluralization rules for each language. This is not the case; only the English algorithm, with support for :zero, :one, and :other, is available by default. Locale-specific pluralization rules require additional configuration and must be supplied by the application (or by another gem).
|
| |
|
| |
|
|
|
|
|
|
| |
Update i18n.md
Addressed Feedback
|
| |
|
| |
|
|
|
|
|
|
| |
Mainly around `nil`
[ci skip]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When you don't explicitly provide `optional: true` to a `belongs_to`
definition, rails adds a validation to ensure presence of the
`belongs_to` validation.
However, when the validation is added, it is added with a message key of
`:required`, which was not documented in the "Translations for Active
Record Models" section of the i18n guides.
Here are the lines that add the `:required` message:
https://github.com/rails/rails/blob/c3e3577f9d5058382504773bf0d32afa15cb131e/activerecord/lib/active_record/associations/builder/belongs_to.rb#L136-L138
This commit adds the "non-optional association" validation to the table,
so rails users know how to override the message for this validation. The
default message is "must exist".
|
| |
|
| |
|
|
|
|
| |
- Grammar edits.
|
|
|
|
|
|
| |
- config/application.rb no longer has comments about how to specify load paths
or change default locale after
https://github.com/rails/rails/commit/28dcadc0140dfdeb.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This is a pass over the documentation which fills the missing gaps of
`ApplicationRecord`.
[ci skip]
|
|
|
|
| |
I spent a decent amount of time the other day trying to figure out why my active model including class wasn't generating the properly localized validation messages, and a note like this would have saved me a lot of time.
|
| |
|
| |
|
|
|
|
| |
clear cut approach
|
|
|
|
|
|
|
|
|
|
| |
In this sentence, there are three candidates of `this method`
* default_url_options
* url_for
* helper method(s)
so make it clear.
|
|
|
|
| |
skip]
|
|
|
|
| |
[Robin Dupret & Shunsuke Aida]
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|