From 5e676db4a0e111488b39f1ac5a252aecdad3cfbd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 12 Mar 2020 15:28:14 +1000 Subject: [PATCH] fix fallback preferences being used instead of English Check needs to be done regardless of if we found a regional variant or not. --- rslib/src/i18n/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rslib/src/i18n/mod.rs b/rslib/src/i18n/mod.rs index e35f69e1b..519851f64 100644 --- a/rslib/src/i18n/mod.rs +++ b/rslib/src/i18n/mod.rs @@ -260,15 +260,15 @@ impl I18n { } else { error!(log, "Failed to create bundle for {:?}", lang.language()) } + } - // if English was listed, any further preferences are skipped, - // as the template has 100% coverage, and we need to ensure - // it is tried prior to any other langs. But we do keep a file - // if one was returned, to allow locale English variants to take - // priority over the template. - if lang.language() == "en" { - break; - } + // if English was listed, any further preferences are skipped, + // as the template has 100% coverage, and we need to ensure + // it is tried prior to any other langs. But we do keep a file + // if one was returned, to allow locale English variants to take + // priority over the template. + if lang.language() == "en" { + break; } }