class HelpDialog(QDialog): def __init__(self, parent, help): QDialog.__init__(self, parent) self.setCaption(i18n("Package Manager Help")) self.layout = QGridLayout(self) self.htmlPart = KHTMLPart(self) self.resize(500,600) self.layout.addWidget(self.htmlPart.view(),1,1) if getKDELocale() == "tr": self.htmlPart.openURL(KURL(locate("data","package-manager/help/tr/%s" % help_files[help]))) else: self.htmlPart.openURL(KURL(locate("data","package-manager/help/en/%s" % help_files[help])))
class HelpDialog(QDialog): def __init__(self, parent=None): QDialog.__init__(self,parent) self.setCaption(i18n("PiSi X Help")) self.layout = QGridLayout(self) self.htmlPart = KHTMLPart(self) self.resize(500,600) self.layout.addWidget(self.htmlPart.view(),1,1) if os.environ['LANG'].startswith('tr_TR'): self.htmlPart.openURL(KURL(locate("data","pisix/help/tr/main_help.html"))) else: self.htmlPart.openURL(KURL(locate("data","pisix/help/en/main_help.html")))
class HelpDialog(KDialog): def __init__(self, parent, help): KDialog.__init__(self, parent) self.setCaption(i18n("Package Manager Help")) self.layout = QGridLayout(self) self.htmlPart = KHTMLPart(self) self.resize(500,600) self.layout.addWidget(self.htmlPart.view(),1,1) locale = getKDELocale() if locale in ["tr", "es", "en", "fr", "nl", "de", "sv"]: self.htmlPart.openURL(KURL(locate("data","package-manager/help/%s/%s" % (locale, help_files[help])))) else: self.htmlPart.openURL(KURL(locate("data","package-manager/help/en/%s" % help_files[help])))
class HelpDialog(QDialog): def __init__(self, name, title, parent=None): QDialog.__init__(self, parent) self.setCaption(title) self.layout = QGridLayout(self) self.htmlPart = KHTMLPart(self) self.resize(500, 600) self.layout.addWidget(self.htmlPart.view(), 1, 1) lang = locale.setlocale(locale.LC_MESSAGES) if "_" in lang: lang = lang.split("_", 1)[0] url = locate("data", "%s/help/%s/main_help.html" % (name, lang)) if not os.path.exists(url): url = locate("data", "%s/help/en/main_help.html" % name) self.htmlPart.openURL(KURL(url))