File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,8 @@ pub fn read_from_dir<P: AsRef<Path>>(dirname: P) -> io::Result<Vec<FluentResourc
161
161
Ok ( result)
162
162
}
163
163
164
- pub fn create_bundle ( resources : & ' static Vec < FluentResource > ) -> FluentBundle < ' static > {
165
- let mut bundle = FluentBundle :: new ( & [ "en-US" ] ) ;
164
+ pub fn create_bundle ( lang : & str , resources : & ' static Vec < FluentResource > ) -> FluentBundle < ' static > {
165
+ let mut bundle = FluentBundle :: new ( & [ lang ] ) ;
166
166
167
167
for res in resources {
168
168
bundle
@@ -189,7 +189,7 @@ fn build_resources() -> HashMap<String, Vec<FluentResource>> {
189
189
fn build_bundles ( ) -> HashMap < String , FluentBundle < ' static > > {
190
190
let mut bundles = HashMap :: new ( ) ;
191
191
for ( ref k, ref v) in & * RESOURCES {
192
- bundles. insert ( k. to_string ( ) , create_bundle ( & v) ) ;
192
+ bundles. insert ( k. to_string ( ) , create_bundle ( & k , & v) ) ;
193
193
}
194
194
bundles
195
195
}
You can’t perform that action at this time.
0 commit comments