On 04/02/2012 03:15 PM, Rob Crittenden wrote:
John Dennis wrote:
Translators need to reorder messages to suit the needs of the target
language. The conventional positional format specifiers (e.g. %s %d)
do not permit reordering because their order is tied to the ordering
of the arguments to the printf function. The fix is to use indexed
I guess this looks ok but all of these errors are of the format: string
error, error number (and inconsistently, sometimes the reverse).
Not all of them, e.g.
- fprintf(stderr, _("Search for %s on rootdse failed with error %d"),
+ fprintf(stderr, _("Search for %1$s on rootdse failed with error %2$d\n"),
- fprintf(stderr, _("Failed to open keytab '%s': %s\n"), keytab,
+ fprintf(stderr, _("Failed to open keytab '%1$s': %2$s\n"), keytab,
Do those really need to be re-orderable?
You can never make too few assumptions about foreign languages. Most
likely at least some will need reordering.
Enforcing indexed specifiers everywhere means we don't have to worry
about individual cases, or change our strings when a new language is added.
Freeipa-devel mailing list