lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> >Tricky to do when there's format specifiers in general.
> 
> We probably need a way to specify the order in format specifiers
> (like in GLIBC) first ...

We probably need more than that. Many error messages in Lua are built
piece by piece, not in a single format string. For instance, consider
this message:

  > a = a + 1
  stdin:1: attempt to perform arithmetic on a table value (global 'a')

Thre is "attempt to %s a %s value%s", then an optional " (%s '%s')",
filled with "perform arithmetic on", "table", "global", and 'a'. (BTW,
"table" here is the type buildin name; should it be translated too?)
You have to make sure the individual translation of each of these parts
will bring good results, considering all places each of these parts can
go. (Note that we are lucky that all buildin type names in Lua work
with article "a" (as oposed to "an"); we may not be that lucky in
other languages...)

-- Roberto