DEV: add discourse_dev gem in development dependencies. (#12285)

For more details visit https://github.com/discourse/discourse_dev
This commit is contained in:
Vinoth Kannan 2021-03-04 23:04:51 +05:30 committed by GitHub
parent 2123561125
commit 8d96713aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 0 deletions

3
.gitignore vendored
View File

@ -151,3 +151,6 @@ copyright
yarn-error.log
tags
# file used with `discourse_dev` gem in development environment.
config/dev.yml

View File

@ -177,6 +177,7 @@ group :development do
gem 'binding_of_caller'
gem 'yaml-lint'
gem 'annotate'
gem 'discourse_dev'
end
# this is an optional gem, it provides a high performance replacement

View File

@ -114,6 +114,8 @@ GEM
railties (>= 3.1)
discourse-ember-source (3.12.2.2)
discourse-fonts (0.0.7)
discourse_dev (0.0.2)
faker (~> 2.16)
discourse_image_optim (0.26.2)
exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0)
@ -135,6 +137,8 @@ GEM
execjs (2.7.0)
exifr (1.3.9)
fabrication (2.21.1)
faker (2.16.0)
i18n (>= 1.6, < 2)
fakeweb (1.3.0)
faraday (1.3.0)
faraday-net_http (~> 1.0)
@ -499,6 +503,7 @@ DEPENDENCIES
discourse-ember-rails (= 0.18.6)
discourse-ember-source (~> 3.12.2)
discourse-fonts
discourse_dev
discourse_image_optim
email_reply_trimmer
ember-handlebars-template (= 0.8.0)

View File

@ -54,6 +54,11 @@ module I18n
# load it
I18n.backend.load_translations(I18n.load_path.grep(/\.#{Regexp.escape locale}\.yml$/))
if Rails.env.development?
I18n.backend.load_translations(I18n.load_path.grep(/.*faker.*\/#{Regexp.escape locale}\.yml$/))
I18n.backend.load_translations(I18n.load_path.grep(/.*faker.*\/#{Regexp.escape locale}\/.*\.yml$/))
end
@loaded_locales << locale
end
end