How to address "_ global will break in the future; please see anki/lang.py" warning?

Hi,
I’m trying to address the following deprecation message:

_ global will break in the future; please see anki/lang.py
  File "/home/vhong/.local/share/Anki2/addons21/ir/main.py", line 206, in answerButtonList
    return ((1, _('Soon')), (2, _('Later')), (3, _('Custom')))

Here’s the related code:

I have checked lang.py, but not sure what’s the replacement for _ global would be.

I’ve also tried to search this forum and Google about this error message but there isn’t much info.

Can someone give me a pointer on how to fix this warning?

https://translating.ankiweb.net/anki/developers.html#add-ons

The simplest solution is to remove the _ calls altogether.

3 Likes