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