Support t-strings in gettext

That’s an interesting spin. Won’t the source message still have the placeholder in it?

Have you considered adding a comparison to $-strings/string.Template/flufl.i18n style?

1 Like

It does, but it still renders: the fallback substitutes into it, giving Hello Ada. The source message is the t-string in the code, so its names and the values passed can’t disagree — only the translated copy, written elsewhere by hand, can, and that’s the copy being discarded.

Not yet — and it belongs there, since $-syntax exists because of the failure you described. I’ll add it.

1 Like

One orthogonal thing that flufl.i18n handles is multiple stackable language constructs. This can be really helpful for things like a web application where you might need to translate into several different languages in the same request.

1 Like