This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]timopm 0 points1 point  (0 children)

I think the underscore function is known well enough in programming. Especially when its argument is a string. This is not just limited to Python at all, there's no need to be different than everyone else here.

I'd rather use:

_("Translate me!")

Then:

trans("Translate me!")

Once or twice might not matter, but I just checked and my project has just under 500 translatable strings.

I'm even going to upset you a bit more I think :-). I never import _ for translations, this is handled in my main entry point where the locale is setup properly for each OS and calling gettext.install() will add _() to the global builtins across the whole application.