localization_generator 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/localization_generator.rb +1 -1
- data/templates/localization.rb +1 -1
- metadata +1 -1
data/localization_generator.rb
CHANGED
@@ -17,7 +17,7 @@ class LocalizationGenerator < Rails::Generator::NamedBase
|
|
17
17
|
m.template "localization_test.rb", "test/unit/#{file_name}_test.rb"
|
18
18
|
m.template "lang.yaml", "lang/#{plural_name}.yaml"
|
19
19
|
|
20
|
-
m.template "README", "README_#{
|
20
|
+
m.template "README", "README_#{file_name.upcase}"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/templates/localization.rb
CHANGED
@@ -43,7 +43,7 @@ module <%= class_name %>
|
|
43
43
|
def self.load_localized_strings
|
44
44
|
# Load language files
|
45
45
|
Dir[RAILS_ROOT + '/lang/*.yaml'].each do |filename|
|
46
|
-
filename =~ /([a-z]+)\.yaml$/
|
46
|
+
filename =~ /(([a-z]+_?)+)\.yaml$/
|
47
47
|
hash = YAML::load(File.read(filename))
|
48
48
|
file_charset = hash['file_charset'] || 'ascii'
|
49
49
|
|