[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #66313] msgfmt fails to parse glib's format specifiers
From: |
Bruno Haible |
Subject: |
[bug #66313] msgfmt fails to parse glib's format specifiers |
Date: |
Wed, 9 Oct 2024 04:22:29 -0400 (EDT) |
Update of bug #66313 (group gettext):
Status: None => Not a Bug
Assigned to: None => haible
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
There are two alternative ways to write this:
1) A way that is perfectly supported by GNU gettext:
#include <inttypes.h>
g_strdup_printf (_("%"PRId64" minutes ago"), minutes);
-varbatim-
Documented at
https://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html
.
The PRId64 macro may need a platform-dependent override, as done in Gnulib:
https://www.gnu.org/software/gnulib/manual/html_node/inttypes_002eh.html
2) A way that will be supported in the future:
+verbatim+
g_strdup_printf (_("%w64d minutes ago"), minutes);
This is specified by ISO C 23 and will get increasing platform support over
the next years.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66313>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature