From 28d7ada650dcee5c67cab95112ee6285eec64f94 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Tue, 23 Jun 2026 13:41:46 -0600 Subject: [PATCH] i18n: bundle Slint translations via compile_with_config (no gettext C dep) cc --- crates/qbz-slint/build.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/qbz-slint/build.rs b/crates/qbz-slint/build.rs index 832c96ad3..0454751a0 100644 --- a/crates/qbz-slint/build.rs +++ b/crates/qbz-slint/build.rs @@ -1,6 +1,10 @@ -//! Compiles the Slint UI tree. `ui/app.slint` is the single entry point; it -//! imports everything else, so only the entry file is listed here. - +//! Compiles the Slint UI tree with bundled translations. `ui/app.slint` is the +//! single entry point. Translations are bundled (pure-Rust, no C dep) from +//! `translations//LC_MESSAGES/qbz-slint.po`; msgid = English source, no context. fn main() { - slint_build::compile("ui/app.slint").expect("Slint UI failed to compile"); + let config = slint_build::CompilerConfiguration::new() + .with_bundled_translations("translations") + .with_default_translation_context(slint_build::DefaultTranslationContext::None); + slint_build::compile_with_config("ui/app.slint", config) + .expect("Slint UI failed to compile"); }