Skip to content

Commit

Permalink
Support for None locale
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Dec 28, 2017
1 parent 3d21c48 commit 434fb51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plumbum/cli/i18n.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import locale

# High performance method for English (no translation needed)
if locale.getlocale()[0].startswith('en'):
loc = locale.getlocale()[0]
if loc is None or loc.startswith('en'):
class NullTranslation(object):
def gettext(self, str):
return str
Expand Down

0 comments on commit 434fb51

Please sign in to comment.