|
@@ -59,11 +59,16 @@ fn resolve_config_path(cli_config: &str) -> std::path::PathBuf {
|
|
|
async fn main() -> Result<()> {
|
|
async fn main() -> Result<()> {
|
|
|
// Locale: check LANG env var first (macOS sys-locale ignores it).
|
|
// Locale: check LANG env var first (macOS sys-locale ignores it).
|
|
|
// Normalize "ru_RU.UTF-8" → "ru-RU" for unic-langid.
|
|
// Normalize "ru_RU.UTF-8" → "ru-RU" for unic-langid.
|
|
|
- let locale = std::env::var("LANG").ok().map(|l| {
|
|
|
|
|
- l.split('.').next().unwrap_or(&l).replace('_', "-")
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ let locale = std::env::var("LANG")
|
|
|
|
|
+ .ok()
|
|
|
|
|
+ .map(|l| l.split('.').next().unwrap_or(&l).replace('_', "-"));
|
|
|
let _ = fluent_i18n::set_locale(locale.as_deref());
|
|
let _ = fluent_i18n::set_locale(locale.as_deref());
|
|
|
- tracing_subscriber::fmt::init();
|
|
|
|
|
|
|
+ tracing_subscriber::fmt()
|
|
|
|
|
+ .with_env_filter(
|
|
|
|
|
+ tracing_subscriber::EnvFilter::try_from_default_env()
|
|
|
|
|
+ .unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
|
|
|
|
|
+ )
|
|
|
|
|
+ .init();
|
|
|
let cli = Cli::parse();
|
|
let cli = Cli::parse();
|
|
|
|
|
|
|
|
let config_path = resolve_config_path(&cli.config);
|
|
let config_path = resolve_config_path(&cli.config);
|