unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Named parameters to format?
@ 2015-12-15  4:52 Christopher Allan Webber
  2015-12-15  6:01 ` Nala Ginrut
  2015-12-15  6:30 ` Mark H Weaver
  0 siblings, 2 replies; 9+ messages in thread
From: Christopher Allan Webber @ 2015-12-15  4:52 UTC (permalink / raw)
  To: guile-user

Hello all,

I've been thinking about what I'm going to do once I hit the need for
gettext support.  I'm not really sure for things that have multiple
variables in their string.  In python land, I'd do something like:

  gettext("foo %(bar) %(baz)") % {"bar": "bleh",
                                  "baz": "wonk"}

This would give translators an opportunity to move the right parameters
to the right place in the string.  However, this appears to not be
possible in our current format system, because there's no place to put
keyword based substitutable arguments.  Syntactic word ordering varies
from natural language to natural language, so...

Surely someone's run into this before?  What's the right solution?

 - Chris



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-12-15 16:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15  4:52 Named parameters to format? Christopher Allan Webber
2015-12-15  6:01 ` Nala Ginrut
2015-12-15 15:43   ` Christopher Allan Webber
2015-12-15  6:30 ` Mark H Weaver
2015-12-15  9:14   ` Ludovic Courtès
2015-12-15 15:20     ` Mark H Weaver
2015-12-15 15:42     ` Christopher Allan Webber
2015-12-15 16:16       ` Ludovic Courtès
2015-12-15 15:43   ` Christopher Allan Webber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).