13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/generators/rodauth/translations_generator.rb', line 13
def copy_locales
say "No locales specified!", :yellow if locales.empty?
locales.each do |locale|
translations = retrieve_translations(locale)
if translations.empty?
say "No translations for locale: #{locale}", :yellow
next
end
translations.merge!(existing_translations(locale))
translations.slice!(*rodauth_methods)
create_file "config/locales/rodauth.#{locale}.yml", locale_content(locale, translations)
end
end
|