Skip to content

Commit 1b3f173

Browse files
committed
1 parent 4ecf542 commit 1b3f173

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/isodoc/iso/i18n.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module IsoDoc
22
module Iso
33
class I18n < IsoDoc::I18n
4-
def load_file(fname)
4+
# name iso_load_file instead of load_file
5+
# so that child flavours cannot inherit it and override it
6+
def iso_load_file(fname)
57
f = File.join(File.dirname(__FILE__), fname)
68
File.exist?(f) ? YAML.load_file(f) : {}
79
end
810

9-
alias :local_load_file :load_file
10-
1111
def load_yaml1(lang, script)
12-
y = local_load_file("i18n-#{yaml_lang(lang, script)}.yaml")
13-
y.empty? and return local_load_file("i18n-en.yaml").deep_merge(super)
12+
y = iso_load_file("i18n-#{yaml_lang(lang, script)}.yaml")
13+
y.empty? and return iso_load_file("i18n-en.yaml").deep_merge(super)
1414
super.deep_merge(y)
1515
end
1616
end

0 commit comments

Comments
 (0)