[Development] format-like tr()
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Fri Oct 25 10:30:22 CEST 2024
Il 25/10/24 10:03, David C. Partridge ha scritto:
> While I applaud the thought of using std::format where appropriate, I
> can't see what converting the existing tr() mechanism to that will gain
> Qt Development or Qt Users
One would be the compile-time check on the format strings and its
replacements.
Another, arguably, to avoid mix and match of %n and {} if you want to
translate with a plural replacement and then use std::format into the
translated string?
> tr("{} bought %n apples", n).format(name);
My 2 c,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20241025/1aae36b5/attachment.bin>
More information about the Development
mailing list