Gettext or underscore?

Bonjour,

When wrapping a string for i18n we can either use gettext or _. Which one do you prefer ?

  • gettext(‘SOMETHING’)
  • _(‘SOMETHING’)

0 voters

Cheers

I’m in favor of getext because it is easier to grep although more verbose. I think to remember @heartsucker has the same preference :slight_smile:

2 Likes

Prefer gettext because it’s more pythonic (explicit over implicit), and _ is not friendly to new devs jumping in to the code. It looks like some sort of bizarre syntactic sugar.

Late to the party here, but I concur: gettext() over _()!

Ok, let’s stick to gettext then !