Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Rollback i18n PR

* Require helpers
  • Loading branch information
vbrazo authored and stympy committed Feb 12, 2019
1 parent 5bc5875 commit d64622c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
7 changes: 4 additions & 3 deletions lib/faker.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# frozen_string_literal: true

mydir = __dir__

begin
require 'psych'
end

require 'i18n'
require 'set' # Fixes a bug in i18n 0.6.11

# require helper files
Dir.glob(File.join(File.dirname(__FILE__), 'helpers', '*.rb')).sort.each { |file| require file }

# load locales via I18n.backend
I18n.backend = I18n::Backend::Chain.new(I18n.backend, Faker::I18nBackend.new)
I18n.load_path += Dir[File.join(mydir, 'locales', '**/*.yml')]
I18n.reload! if I18n.backend.initialized?

module Faker
class Config
Expand Down
10 changes: 0 additions & 10 deletions lib/helpers/i18n_backend.rb

This file was deleted.

10 changes: 0 additions & 10 deletions test/faker/default/test_faker_i18n_backend.rb

This file was deleted.

0 comments on commit d64622c

Please sign in to comment.