From d1983b29c1d16b13f078362e682b1c6c0b383898 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 28 Oct 2025 01:05:46 +0100 Subject: [PATCH] Reword warnings about missing sphinx-build/msgfmt Also merge them into one warning because some of these lines wrap on a small (80 column) terminal, which looks weird. The reason they wrap might be the long prefix ("warning: fish-build-man-pages@0.0.0:"). --- crates/build-man-pages/build.rs | 9 +++++---- crates/gettext-maps/build.rs | 11 ++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/crates/build-man-pages/build.rs b/crates/build-man-pages/build.rs index 0e8e4883b..011c73355 100644 --- a/crates/build-man-pages/build.rs +++ b/crates/build-man-pages/build.rs @@ -63,13 +63,14 @@ fn build_man(man_dir: &Path) { Err(e) if e.kind() == std::io::ErrorKind::NotFound => { if env_var("FISH_BUILD_DOCS") == Some("1".to_string()) { panic!( - "Could not find sphinx-build to build man pages.\n\ - Install sphinx or disable building the docs by setting $FISH_BUILD_DOCS=0." + "Could not find sphinx-build required to build man pages.\n\ + Install Sphinx or disable building the docs by setting $FISH_BUILD_DOCS=0." ); } - rsconf::warn!("Cannot find sphinx-build to build man pages."); rsconf::warn!( - "If you install it now you need to run `cargo clean` and rebuild, or set $FISH_BUILD_DOCS=1 explicitly." + "Could not find sphinx-build required to build man pages. \ + If you install Sphinx now, you need to trigger a rebuild to include man pages. \ + For example by running `touch doc_src` followed by the build command." ); return; } diff --git a/crates/gettext-maps/build.rs b/crates/gettext-maps/build.rs index e337402c5..4d1b5c473 100644 --- a/crates/gettext-maps/build.rs +++ b/crates/gettext-maps/build.rs @@ -38,13 +38,10 @@ fn embed_localizations(cache_dir: &Path) { match Command::new("msgfmt").arg("-h").output() { Err(e) if e.kind() == std::io::ErrorKind::NotFound => { rsconf::warn!( - "Cannot find msgfmt to build gettext message catalogs. Localization will not work." - ); - rsconf::warn!( - "If you install it now you need to trigger a rebuild to get localization support." - ); - rsconf::warn!( - "One way to achieve that is running `touch po` followed by the build command." + "Could not find msgfmt required to build message catalogs. \ + Localization will not work. \ + If you install gettext now, you need to trigger a rebuild to include localization support. \ + For example by running `touch po` followed by the build command." ); } Err(e) => {