Hi all,
I am using Gettext to handle translations of Phoenix projects, it’s working great.
But I am not 100% happy about I organize my translated strings.
I have dgettext
calls scattered around, and I know it’s perfectly fine, as the job of Gettext extract is exactly to fetch and group them.
But I don’t know, I still find a bit verbose: dgettext("domain", "Some %{arg} message", %{arg: "cool"})
.
Also, there are cases where I use module attributes to messages used multiple times in the module (if they don’t have args).
There are cases where I use functions, because of the args.
So, I would like to know how do you organize them, if you have smart helpers or macros…?
I can’t stop thinking about a gigantic module that contains every single translation where I can address the translation with an atom. Is that silly?
Cheers!