Skip to content

Commit

Permalink
Reproducible test case for glebm/i18n-tasks#600
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Dec 9, 2024
1 parent e9d4d50 commit 5353d54
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ group :development, :test do
end

group :development do
gem 'i18n-tasks', require: false
gem 'i18n-tasks', github: 'retailzipline/i18n-tasks', branch: 'pluralization', require: false
gem 'rack-mini-profiler'
gem 'web-console'
end
Expand Down
28 changes: 17 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
GIT
remote: https://github.com/retailzipline/i18n-tasks.git
revision: 179e0b1fb29003d6ffaf0727ba06b259eb43e8e6
branch: pluralization
specs:
i18n-tasks (1.0.14)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
highline (>= 2.0.0)
i18n
parser (>= 3.2.2.1)
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -127,16 +143,6 @@ GEM
htmlentities (4.3.4)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
i18n-tasks (1.0.14)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
highline (>= 2.0.0)
i18n
parser (>= 3.2.2.1)
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
io-console (0.8.0)
irb (1.14.1)
rdoc (>= 4.0.0)
Expand Down Expand Up @@ -377,7 +383,7 @@ DEPENDENCIES
email_spec
factory_bot_rails
faker
i18n-tasks
i18n-tasks!
newrelic_rpm (~> 9.16)
pg (~> 1.5)
pry
Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Application < Rails::Application
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w[assets tasks])

config.i18n.available_locales = %i[en ar]

# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
Expand Down
12 changes: 9 additions & 3 deletions config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,19 @@ search:
# # Keep in mind the context of all the strings for a more accurate translation.

## Do not consider these keys missing:
# ignore_missing:
ignore_missing:
ar:
- *.zero
- *.two
- *.few
- *.many
# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
# - '{devise,simple_form}.*'

## Consider these keys used:
# ignore_unused:
# - 'activerecord.attributes.*'
ignore_unused:
- 'activemodel.*'
- 'activerecord.*'
# - '{devise,kaminari,will_paginate}.*'
# - 'simple_form.{yes,no}'
# - 'simple_form.{placeholders,hints,labels}.*'
Expand Down
12 changes: 12 additions & 0 deletions config/locales/ar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
ar:
activemodel:
models:
user:
one: User
other: Users
app_name: Rails 7 Starter App
meta_description: An opinionated starter application based on Ruby 3.1, Rails 7.1, Webpack 5, Yarn, and Bootstrap 5
shared:
navbar:
toggle_navigation: Toggle Navigation
5 changes: 5 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
en:
activemodel:
models:
user:
one: User
other: Users
app_name: Rails 7 Starter App
meta_description: An opinionated starter application based on Ruby 3.3, Rails 7.2, Webpack 5, Yarn, and Bootstrap 5
shared:
Expand Down

0 comments on commit 5353d54

Please sign in to comment.