mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
fix rendering of templates when translations bring in utf-8 characters
This commit is contained in:
parent
030c5b51d4
commit
c57900d4f6
1 changed files with 1 additions and 3 deletions
|
@ -26,12 +26,10 @@ import gettext
|
||||||
from mako.template import Template as MakoTemplate
|
from mako.template import Template as MakoTemplate
|
||||||
from deluge import common
|
from deluge import common
|
||||||
|
|
||||||
_ = gettext.gettext
|
|
||||||
|
|
||||||
class Template(MakoTemplate):
|
class Template(MakoTemplate):
|
||||||
|
|
||||||
builtins = {
|
builtins = {
|
||||||
"_": _,
|
"_": lambda x: gettext.gettext(x).decode("utf-8"),
|
||||||
"version": common.get_version()
|
"version": common.get_version()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue