[yew-devel] [PATCH proxmox-yew-comp v3 2/2] schema_validation: add translated description as tooltip to field and checkbox

Hannes Laimer h.laimer at proxmox.com
Thu Oct 9 15:31:20 CEST 2025


Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
---
 src/schema_validation.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/schema_validation.rs b/src/schema_validation.rs
index fbdf96d..dfbd92f 100644
--- a/src/schema_validation.rs
+++ b/src/schema_validation.rs
@@ -3,6 +3,7 @@ use std::collections::HashMap;
 
 use proxmox_schema::Schema;
 use pwt::{
+    gettext,
     props::FieldBuilder,
     state::Store,
     widget::form::{InputType, NumberTypeInfo, ValidateFn},
@@ -39,6 +40,7 @@ impl SchemaValidation for pwt::widget::form::Field {
                 self.max = s.maximum.map(|v| v as f64);
                 self.step = Some(1.0);
                 self.input_type = InputType::Number;
+                self.set_tip(gettext(s.description));
                 if let Some(value) = s.default {
                     self.set_placeholder(value.to_string());
                 }
@@ -48,6 +50,7 @@ impl SchemaValidation for pwt::widget::form::Field {
                 self.max = s.maximum;
                 self.step = Some(1.0);
                 self.input_type = InputType::Number;
+                self.set_tip(gettext(s.description));
                 if let Some(value) = s.default {
                     self.set_placeholder(value.to_string());
                 }
-- 
2.47.3





More information about the yew-devel mailing list