Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rails update script #1086

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions rails/rails/action_view.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@
distance_in_words:
half_a_minute: "half a minute"
less_than_x_seconds:
one: "less than %{count} second"
one: "less than 1 second"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decision to prefer %{count} was discussed in #993

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, that is why #1088 leaves them as they are.
These changes are verbatim from https://github.com/rails/rails/blob/main/actionview/lib/action_view/locale/en.yml
This file does not belong to this project, it is only used as a reference.

other: "less than %{count} seconds"
x_seconds:
one: "%{count} second"
one: "1 second"
other: "%{count} seconds"
less_than_x_minutes:
one: "less than a minute"
other: "less than %{count} minutes"
x_minutes:
one: "%{count} minute"
one: "1 minute"
other: "%{count} minutes"
about_x_hours:
one: "about %{count} hour"
one: "about 1 hour"
other: "about %{count} hours"
x_days:
one: "%{count} day"
one: "1 day"
other: "%{count} days"
about_x_months:
one: "about %{count} month"
one: "about 1 month"
other: "about %{count} months"
x_months:
one: "%{count} month"
one: "1 month"
other: "%{count} months"
about_x_years:
one: "about %{count} year"
one: "about 1 year"
other: "about %{count} years"
over_x_years:
one: "over %{count} year"
one: "over 1 year"
other: "over %{count} years"
almost_x_years:
one: "almost %{count} year"
one: "almost 1 year"
other: "almost %{count} years"
prompts:
year: "Year"
Expand Down
13 changes: 7 additions & 6 deletions rails/rails/active_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ en:
inclusion: "is not included in the list"
exclusion: "is reserved"
invalid: "is invalid"
confirmation: "doesn't match %{attribute}"
confirmation: "doesnt match %{attribute}"
accepted: "must be accepted"
empty: "can't be empty"
blank: "can't be blank"
empty: "cant be empty"
blank: "cant be blank"
present: "must be blank"
too_long:
one: "is too long (maximum is %{count} character)"
one: "is too long (maximum is 1 character)"
other: "is too long (maximum is %{count} characters)"
password_too_long: "is too long"
too_short:
one: "is too short (minimum is %{count} character)"
one: "is too short (minimum is 1 character)"
other: "is too short (minimum is %{count} characters)"
wrong_length:
one: "is the wrong length (should be %{count} character)"
one: "is the wrong length (should be 1 character)"
other: "is the wrong length (should be %{count} characters)"
not_a_number: "is not a number"
not_an_integer: "must be an integer"
Expand Down
2 changes: 2 additions & 0 deletions rails/rails/active_support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ en:
format:
# Where is the currency sign? %u is the currency unit, %n is the number (default: $5.00)
format: "%u%n"
negative_format: "-%u%n"
unit: "$"
# These six are to override number.format and are optional
separator: "."
Expand Down Expand Up @@ -112,6 +113,7 @@ en:
tb: "TB"
pb: "PB"
eb: "EB"
zb: "ZB"
# Used in NumberHelper.number_to_human()
decimal_units:
format: "%n %u"
Expand Down
8 changes: 4 additions & 4 deletions rails/script/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
puts "Fetching latest Rails locale files to #{rails_locale_dir}"

exec %(
curl -Lo '#{rails_locale_dir}/action_view.yml' https://raw.github.com/rails/rails/master/actionview/lib/action_view/locale/en.yml
curl -Lo '#{rails_locale_dir}/action_view.yml' https://raw.github.com/rails/rails/main/actionview/lib/action_view/locale/en.yml

curl -Lo '#{rails_locale_dir}/active_model.yml' https://raw.github.com/rails/rails/master/activemodel/lib/active_model/locale/en.yml
curl -Lo '#{rails_locale_dir}/active_model.yml' https://raw.github.com/rails/rails/main/activemodel/lib/active_model/locale/en.yml

curl -Lo '#{rails_locale_dir}/active_record.yml' https://raw.github.com/rails/rails/master/activerecord/lib/active_record/locale/en.yml
curl -Lo '#{rails_locale_dir}/active_record.yml' https://raw.github.com/rails/rails/main/activerecord/lib/active_record/locale/en.yml

curl -Lo '#{rails_locale_dir}/active_support.yml' https://raw.github.com/rails/rails/master/activesupport/lib/active_support/locale/en.yml
curl -Lo '#{rails_locale_dir}/active_support.yml' https://raw.github.com/rails/rails/main/activesupport/lib/active_support/locale/en.yml
)