25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/generators/old_sql/install_generator.rb', line 25
def copy_locales_files
print "Now copying locales files! "
locales_path = "#{gem_path}/config/locales/*.yml"
locales_app_path = "#{app_path}/config/locales"
unless File.directory?(locales_app_path)
FileUtils.mkdir locales_app_path
end
Dir.glob(locales_path).each do |file|
file_path = file.split("/")
file_path = file_path[-1]
FileUtils.copy_file(file, "#{locales_app_path}/#{file_path}")
print "."
end
print "\n"
end
|