Skip to content

Commit

Permalink
firewall-config: Add missing gettext.textdomain call to fix translations
Browse files Browse the repository at this point in the history
gettext.gettext was used without setting the textdomain. This resulted in failed
translations and also in a traceback in the rich rule dialog while adding a
service or port, ..

The failed translations only happended for strings that have been translated
using _() in the code, but not in glade.
  • Loading branch information
t-woerner committed Jul 29, 2016
1 parent 560a0e4 commit de8ed60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/firewall-config
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import sys
import string
import gi
import gettext
_ = gettext.gettext

try:
gi.require_version('Gtk', '3.0')
Expand Down Expand Up @@ -57,6 +55,10 @@ from firewall.core.io.ipset import IPSet
from firewall.core import rich
from firewall.core.fw_nm import *

import gettext
gettext.textdomain(config.DOMAIN)
_ = gettext.gettext

if not datadir:
datadir = config.DATADIR
sys.path.insert(0, datadir)
Expand Down

0 comments on commit de8ed60

Please sign in to comment.