fixed CQ for bitmessageqt.languagebox module

This commit is contained in:
coolguy-cell 2020-06-03 16:59:15 +05:30
parent b750b02963
commit e372459737
No known key found for this signature in database
GPG Key ID: CD3A42E1D470AD70

View File

@ -1,3 +1,5 @@
"""Language Box Module for Locale Settings"""
# pylint: disable=too-few-public-methods,bad-continuation
import glob import glob
import os import os
@ -8,6 +10,7 @@ from bmconfigparser import BMConfigParser
class LanguageBox(QtGui.QComboBox): class LanguageBox(QtGui.QComboBox):
"""LanguageBox class for Qt UI"""
languageName = { languageName = {
"system": "System Settings", "eo": "Esperanto", "system": "System Settings", "eo": "Esperanto",
"en_pirate": "Pirate English" "en_pirate": "Pirate English"
@ -18,6 +21,7 @@ class LanguageBox(QtGui.QComboBox):
self.populate() self.populate()
def populate(self): def populate(self):
"""Populates drop down list with all available languages."""
self.clear() self.clear()
localesPath = os.path.join(paths.codePath(), 'translations') localesPath = os.path.join(paths.codePath(), 'translations')
self.addItem(QtGui.QApplication.translate( self.addItem(QtGui.QApplication.translate(