From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0D9721FF15C for ; Fri, 11 Jul 2025 09:41:07 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9ADECA2B2; Fri, 11 Jul 2025 09:41:51 +0200 (CEST) Message-ID: <795327d5-8394-4c4c-a5c9-428a3c99fed3@proxmox.com> Date: Fri, 11 Jul 2025 09:41:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Lukas Wagner , Proxmox VE development discussion References: <20250624112817.132312-1-l.wagner@proxmox.com> <20250624112817.132312-3-l.wagner@proxmox.com> From: =?UTF-8?Q?Michael_K=C3=B6ppl?= Content-Language: en-US In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 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 KAM_SHORT 0.001 Use of a URL Shortener for very short URL 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. [proxmox.com, man7.org] Subject: Re: [pve-devel] [PATCH manager v2 2/2] ui: backup job details: show notification-mode instead of legacy keys X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 7/9/25 09:12, Lukas Wagner wrote: > The parameter to the gettext function needs to be a static string, otherwise xgettext[1,2] cannot > extract it to generate the .pot file. While the xgettext tool has some basic understanding of the > syntax of supported languages to parse these strings, it does not evaluate or execute any code. > > That's also the reason why we have to do a > > Ext.String.format(gettext("... {0}"), var) > > instead of a > > gettext(`.... ${var}`) I see, I hadn't considered that. Thanks for the detailed response and the links! > > Also, I'm not the biggest fan of the ternary operator, I'm not sure if your suggestion is any easier > to read and comprehend. But that might just be me :) > Yeah, you're probably right. Shortening the code should not come at the expense of readability and thinking about it again, I prefer the way you implemented this. > > [1] https://man7.org/linux/man-pages/man1/xgettext.1.html > [2] https://git.proxmox.com/?p=proxmox-i18n.git;a=blob;f=Makefile;h=34859f5cfa776111b991da23e922cc5eb83cf306;hb=HEAD#l140 > > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel