From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH yew-widget-toolkit v3 1/1] improve translatable strings
Date: Wed, 30 Jul 2025 15:35:13 +0200 [thread overview]
Message-ID: <20250730133516.409663-12-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250730133516.409663-1-m.sandoval@proxmox.com>
Regarding the "may" change: we error when the fields are empty, hence
must is more appropriate.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/widget/form/field.rs | 2 +-
src/widget/form/number.rs | 4 ++--
src/widget/form/selector.rs | 2 +-
src/widget/form/textarea.rs | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/widget/form/field.rs b/src/widget/form/field.rs
index 314b5e16..da3b9777 100644
--- a/src/widget/form/field.rs
+++ b/src/widget/form/field.rs
@@ -329,7 +329,7 @@ impl ManagedField for StandardField {
if value.is_empty() {
if props.required {
- return Err(Error::msg(tr!("Field may not be empty.")));
+ return Err(Error::msg(tr!("Field must not be empty.")));
} else {
return Ok(Value::String(String::new()));
}
diff --git a/src/widget/form/number.rs b/src/widget/form/number.rs
index 78d44a39..298b4c8b 100644
--- a/src/widget/form/number.rs
+++ b/src/widget/form/number.rs
@@ -433,7 +433,7 @@ impl<T: NumberTypeInfo> ManagedField for NumberField<T> {
if is_empty {
if props.required {
- return Err(Error::msg(tr!("Field may not be empty.")));
+ return Err(Error::msg(tr!("Field must not be empty.")));
} else {
return Ok(Value::Null);
}
@@ -441,7 +441,7 @@ impl<T: NumberTypeInfo> ManagedField for NumberField<T> {
let number = match T::value_to_number(value) {
Ok(number) => number,
- Err(err) => return Err(Error::msg(tr!("Input invalid: {}", err.to_string()))),
+ Err(err) => return Err(Error::msg(tr!("Invalid input: {}", err.to_string()))),
};
if let Some(min) = props.min {
diff --git a/src/widget/form/selector.rs b/src/widget/form/selector.rs
index c7a2d7b2..75f25da7 100644
--- a/src/widget/form/selector.rs
+++ b/src/widget/form/selector.rs
@@ -208,7 +208,7 @@ impl<S: DataStore + 'static> ManagedField for SelectorField<S> {
if value.is_empty() {
if props.required {
- bail!("Field may not be empty.");
+ bail!("Field must not be empty.");
} else {
return Ok(Value::String(String::new()));
}
diff --git a/src/widget/form/textarea.rs b/src/widget/form/textarea.rs
index bf63a495..1f3246a2 100644
--- a/src/widget/form/textarea.rs
+++ b/src/widget/form/textarea.rs
@@ -139,7 +139,7 @@ impl ManagedField for TextAreaField {
if value.is_empty() {
if props.required {
- return Err(Error::msg(tr!("Field may not be empty.")));
+ return Err(Error::msg(tr!("Field must not be empty.")));
} else {
return Ok(Value::String(String::new()));
}
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-07-30 13:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 13:35 [pve-devel] [PATCH backup/manager/proxmox-datacenter-manager/widget-toolkit/yew-widget-toolkit v3 00/11] Improve " Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH manager v3 1/3] add context to " Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH manager v3 2/3] improve some " Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH manager v3 3/3] use Unicode not equal sign in " Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH widget-toolkit v3 1/2] add context to " Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH widget-toolkit v3 2/2] use WebAuthn in translatable string Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH backup v3 1/3] add translators comments to some translations Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH backup v3 2/3] improve some translatable strings Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH backup v3 3/3] use WebAuthn in " Maximiliano Sandoval
2025-07-30 13:35 ` [pve-devel] [PATCH proxmox-datacenter-manager v3 1/2] add context to " Maximiliano Sandoval
2025-09-08 13:04 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-30 13:35 ` [pve-devel] [PATCH proxmox-datacenter-manager v3 2/2] improve " Maximiliano Sandoval
2025-09-08 13:04 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-30 13:35 ` Maximiliano Sandoval [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250730133516.409663-12-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.