- Notifications
You must be signed in to change notification settings - Fork826
Comments
fix regression in ExtensionCore not working when updates are available#8964
fix regression in ExtensionCore not working when updates are available#8964clefebvre merged 1 commit intolinuxmint:masterfrom
Conversation
eli-schwartz commentedNov 17, 2019
clefebvre commentedNov 20, 2019
Already done in#8959. |
eli-schwartz commentedNov 21, 2019
I... don't even understand that other PR. It seems to be re-doing058e3a1, fixing some gtk deprecation, and switching one incorrect use of gettext.install() for another, none of which has anything to do with the commit message (that claims this is for python 3.8). |
eli-schwartz commentedNov 22, 2019
When the ngettext call was initially added in6ac295a, I think the person who added it tried to use I initially used from gettext import ngettext, because I wasn't sure under what circumstances the gettext.install() was guaranteed to have run, BTW. But I'm totally okay with either solution. |
In commit6ac295a,Settings>Applets>Download gained the ability to display the number ofavailable updates, using an ngettext-translated message. However, it hasnever worked since ngettext was never imported in the file in question,so it simply raised a traceback.In the same commit, gettext.install() was taught to declarenames="ngettext", but as per the python documentation, the names=argument requires a sequence (of one or more aliases to declare in theglobal namespace), not a string. So it tried to check if it couldinstall the gettext functions: {'x', 't', 'e', 'g'}, which was wrong.The fix is to either import ngettext directly, so it can be used as-is,or globally install ngettext by passing it as a one-item list to thegettext.install() function. I've done the latter.
eli-schwartz commentedNov 22, 2019
I've switched to using gettext.install() with the correct sequence. |
Uh oh!
There was an error while loading.Please reload this page.
In commit6ac295a, Settings>Applets>Download gained the ability to display the number of available updates, using an ngettext-translated message. However, it has never worked since ngettext was never imported in the file in question, so it simply raised a traceback.
In the same commit,
gettext.install()was taught to declarenames="ngettext", but as per the python documentation, thenames=argument requires a sequence (of one or more aliases to declare in the global namespace), not a string. So it tried to check if it could install the gettext functions:{'x', 't', 'e', 'g'}, which was wrong.The fix is to either import
ngettextdirectly, so it can be used as-is, or globally installngettextby passing it as a one-item list to thegettext.install()function. I've done the latter.