Commit 1b3f173 1 parent 4ecf542 commit 1b3f173 Copy full SHA for 1b3f173
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
module IsoDoc
2
2
module Iso
3
3
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 )
5
7
f = File . join ( File . dirname ( __FILE__ ) , fname )
6
8
File . exist? ( f ) ? YAML . load_file ( f ) : { }
7
9
end
8
10
9
- alias :local_load_file :load_file
10
-
11
11
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 )
14
14
super . deep_merge ( y )
15
15
end
16
16
end
You can’t perform that action at this time.
0 commit comments