Skip to content

Commit

Permalink
Merge pull request #805 from LeXofLeviafan/fix-gettext-error
Browse files Browse the repository at this point in the history
fixed error caused by the fallback implementation of gettext
  • Loading branch information
jarun authored Jan 2, 2025
2 parents 863e61d + 095e68a commit 2bd94b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bukuserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
except ImportError:
from flask_babel import gettext, ngettext, pgettext, lazy_gettext, lazy_pgettext, LazyString
except ImportError:
from flask_admin.babel import gettext, ngettext, lazy_gettext
from flask_admin.babel import gettext as _gettext, ngettext, lazy_gettext
gettext = lambda s, *a, **kw: (s if not kw else _gettext(s, *a, **kw))
pgettext = lambda ctx, s, *a, **kw: gettext(s, *a, **kw)
lazy_pgettext = lambda ctx, s, *a, **kw: lazy_gettext(s, *a, **kw)
LazyString = lambda func, *args, **kwargs: func(*args, **kwargs)
Expand Down

0 comments on commit 2bd94b1

Please sign in to comment.