#!/usr/bin/python3

import os
import gettext

gettext.install("mintsources", "/usr/share/linuxmint/locale")

tool = "/usr/lib/linuxmint/mintSources/mintSources.py"
sentence = _("Please enter your password to configure the software sources")
icon = "/usr/share/icons/hicolor/48x48/apps/software-sources.png"

if os.path.exists("/usr/bin/gksu"):
    launcher = "gksu  --message \"<b>%s</b>\"" % sentence   
elif os.path.exists("/usr/bin/kdesudo"):
    launcher = "kdesudo -i %s -d --comment \"<b>%s</b>\"" % (icon, sentence)

command = "%s %s" % (launcher, tool)
os.system(command)