Unnamed
public text v1 · immutablePython's syntax is a little verbose, but putting in the names of all the arguments gives more context to the translator.
However if you really want a simpler numbered syntax instead, copy this function into your source:
def gettext_ordered(string, *args):
d = {}
for i, arg in enumerate(args):
d[str(i+1)] = arg
return string % d
>>> gettext_ordered("%(1)s by %(2)s", "The white album", "the beatles")
'The white album by the beatles'