On 2013-05-04, at 13:15 , Olivier Renaud wrote: > > Gettext is indeed dependent on the fact that the format syntax allows > positional parameters.
Not really, since gettext does not do formatting it does not care and because different languages may need to reorder parameters it's usually better to have either named or explicitly indexable parameters. Gettext pluralization takes specific count arguments to handle dispatching between multiple forms, but that's orthogonal to formatting as this example from the documentation shows: puts (ngettext ("Delete the selected file?", "Delete the selected files?", n)); Gettext's documentation specifically recommends making use of a POSIX/XSH indexing extension to printf-style formats to handle reordering: http://www.gnu.org/software/gettext/manual/gettext.html#c_002dformat but any other (better) scheme can be used instead e.g. Python's keyword-based cformat extension, java's MessageFormat. > I'd like to point out that gettext also makes use of a "feature" of the > formatting function. It's not gettext doing that either, since gettext doesn't do any formatting. It can be a useful feature when paired with gettext as translations may or may not need all original format arguments, but it's orthogonal to gettext's behavior and features. _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev