From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pdm-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id C2DBD1FF168
	for <inbox@lore.proxmox.com>; Tue, 21 Jan 2025 12:54:52 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id E1064797D;
	Tue, 21 Jan 2025 12:54:50 +0100 (CET)
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pdm-devel@lists.proxmox.com
Date: Tue, 21 Jan 2025 12:54:46 +0100
Message-Id: <20250121115446.260316-1-m.sandoval@proxmox.com>
X-Mailer: git-send-email 2.39.5
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.105 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to
 Validity was blocked. See
 https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more
 information.
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [gnome.org]
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager] ui: do not mark the
 empty string as translatable
X-BeenThere: pdm-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Datacenter Manager development discussion
 <pdm-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pdm-devel>, 
 <mailto:pdm-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pdm-devel/>
List-Post: <mailto:pdm-devel@lists.proxmox.com>
List-Help: <mailto:pdm-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel>, 
 <mailto:pdm-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox Datacenter Manager development discussion
 <pdm-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pdm-devel-bounces@lists.proxmox.com
Sender: "pdm-devel" <pdm-devel-bounces@lists.proxmox.com>

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