errors: implement sysroot/testing bundle loading
Extend loading of Fluent bundles so that bundles can be loaded from the sysroot based on the language requested by the user, or using a nightly flag. Sysroot bundles are loaded from `$sysroot/share/locale/$locale/*.ftl`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
6eea2a88c1
commit
f8ad4b5cf8
@ -114,10 +114,12 @@ fn default_handler(
|
||||
let emitter = if hide_parse_errors {
|
||||
silent_emitter()
|
||||
} else {
|
||||
let fallback_bundle = rustc_errors::fallback_fluent_bundle();
|
||||
let fallback_bundle = rustc_errors::fallback_fluent_bundle()
|
||||
.expect("failed to load fallback fluent bundle");
|
||||
Box::new(EmitterWriter::stderr(
|
||||
color_cfg,
|
||||
Some(source_map.clone()),
|
||||
None,
|
||||
fallback_bundle,
|
||||
false,
|
||||
false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user