lib/hexlet.rb in hexlet-0.3.1 vs lib/hexlet.rb in hexlet-0.3.2
- old
+ new
@@ -15,14 +15,10 @@
I18n.available_locales = [:en]
I18n.enforce_available_locales = true
I18n.locale = :en
-I18n.load_path = Dir['locales/*.yml']
-I18n.backend.load_translations
-I18n.t "key" # FIXME this is hack
-
module Hexlet
autoload "Router", "hexlet/router"
autoload "BaseClient", "hexlet/base_client"
autoload "TeacherClient", "hexlet/teacher_client"
@@ -30,7 +26,13 @@
autoload "BaseCLI", "hexlet/base_cli"
autoload "MemberCLI", "hexlet/member_cli"
autoload "TeacherCLI", "hexlet/teacher_cli"
- # Your code goes here...
+ def self.root
+ File.expand_path '../..', __FILE__
+ end
end
+
+I18n.load_path = Dir[File.join(Hexlet.root, 'locales', '*.yml')]
+I18n.backend.load_translations
+I18n.t "key" # FIXME this is hack