* [pdm-devel] [PATCH proxmox-datacenter-manager] ui: do not mark the empty string as translatable
@ 2025-01-21 11:54 Maximiliano Sandoval
2025-01-21 14:00 ` [pdm-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2025-01-21 11:54 UTC (permalink / raw)
To: pdm-devel
xtr will complain that there is a duplicated definition otherwise:
proxmox-datacenter-manager.pot:185: duplicate message definition...
As per [1]:
> There is always one special message in each valid PO file: the PO file
> header. It is encoded with the msgid for the empty string ("") as the
> key, and the actual header values are in the msgstr part. This
> unfortunately means that if you mark an empty string for translation,
> you will get the entire PO file header back as the "translation". In
> almost all cases this is probably not what you want. Hence, do not mark
> empty strings for translation.
[1] https://wiki.gnome.org/TranslationProject(2f)DevGuidelines(2f)Localize(20)using(20)gettext(20)and(20)intltool.html
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
ui/src/dashboard/subscription_info.rs | 2 +-
ui/src/remotes/wizard_page_info.rs | 4 ++--
ui/src/widget/migrate_window.rs | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/src/dashboard/subscription_info.rs b/ui/src/dashboard/subscription_info.rs
index bc1c679..7fb26d4 100644
--- a/ui/src/dashboard/subscription_info.rs
+++ b/ui/src/dashboard/subscription_info.rs
@@ -74,7 +74,7 @@ a list of available options. ",
(
Status::Success,
tr!("Your subscription status is valid."),
- tr!("").into(),
+ "".into(),
)
} else {
(
diff --git a/ui/src/remotes/wizard_page_info.rs b/ui/src/remotes/wizard_page_info.rs
index c67be78..b0a5ba2 100644
--- a/ui/src/remotes/wizard_page_info.rs
+++ b/ui/src/remotes/wizard_page_info.rs
@@ -313,14 +313,14 @@ impl Component for PdmWizardPageInfo {
pwt::widget::FieldPosition::Left,
false,
true,
- tr!(""),
+ "",
Field::new().name("token").required(true),
)
.with_field_and_options(
pwt::widget::FieldPosition::Left,
false,
true,
- tr!(""),
+ "",
Field::new().name("authid").required(true),
);
let content = Column::new()
diff --git a/ui/src/widget/migrate_window.rs b/ui/src/widget/migrate_window.rs
index 559d04c..5305084 100644
--- a/ui/src/widget/migrate_window.rs
+++ b/ui/src/widget/migrate_window.rs
@@ -397,7 +397,7 @@ impl PdmMigrateWindow {
pwt::widget::FieldPosition::Left,
false,
true,
- tr!(""),
+ "",
Checkbox::new()
.name("force")
.validate(|_: &bool| bail!("Uses local resources")),
--
2.39.5
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pdm-devel] applied: [PATCH proxmox-datacenter-manager] ui: do not mark the empty string as translatable
2025-01-21 11:54 [pdm-devel] [PATCH proxmox-datacenter-manager] ui: do not mark the empty string as translatable Maximiliano Sandoval
@ 2025-01-21 14:00 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-01-21 14:00 UTC (permalink / raw)
To: Proxmox Datacenter Manager development discussion, Maximiliano Sandoval
Am 21.01.25 um 12:54 schrieb Maximiliano Sandoval:
> xtr will complain that there is a duplicated definition otherwise:
>
> proxmox-datacenter-manager.pot:185: duplicate message definition...
>
> As per [1]:
>
>> There is always one special message in each valid PO file: the PO file
>> header. It is encoded with the msgid for the empty string ("") as the
>> key, and the actual header values are in the msgstr part. This
>> unfortunately means that if you mark an empty string for translation,
>> you will get the entire PO file header back as the "translation". In
>> almost all cases this is probably not what you want. Hence, do not mark
>> empty strings for translation.
>
> [1] https://wiki.gnome.org/TranslationProject(2f)DevGuidelines(2f)Localize(20)using(20)gettext(20)and(20)intltool.html
>
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> ui/src/dashboard/subscription_info.rs | 2 +-
> ui/src/remotes/wizard_page_info.rs | 4 ++--
> ui/src/widget/migrate_window.rs | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
>
applied, thanks!
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-21 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-21 11:54 [pdm-devel] [PATCH proxmox-datacenter-manager] ui: do not mark the empty string as translatable Maximiliano Sandoval
2025-01-21 14:00 ` [pdm-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox