コード例 #1
0
ファイル: bmain.py プロジェクト: Ciwara/GCiss
def main():
    """  """
    gettext_windows.setup_env()
    locale.setlocale(locale.LC_ALL, "")
    # gettext.install('mmain', localedir='locale', unicode=True)
    gettext.install("bmain.py", localedir="locale")
    window = MainWindow()
    window.setStyleSheet(CSS.appStyle)
    setattr(FWindow, "window", window)
    window.show()
    # window.showMaximized()
    sys.exit(app.exec_())
コード例 #2
0
ファイル: soulou.py プロジェクト: fadiga/syesulu
def main():

    gettext_windows.setup_env()
    locale.setlocale(locale.LC_ALL, '')
    gettext.install('soulou', localedir='locale', unicode=True)

    app = QtGui.QApplication(sys.argv)
    window = MainWindow()
    setattr(F_Window, 'window', window)
    window.show()
    #~ window.showMaximized()
    sys.exit(app.exec_())
コード例 #3
0
ファイル: main.py プロジェクト: Geek-lkj/Telesk
def main():
    if sys.platform.startswith("win"):
        gettext_windows.setup_env()

    lang_path = os.path.dirname(os.path.abspath(sys.argv[0])) + '/locale'
    debug("Lang path: %s" % lang_path)
    gettext.install('telesk', lang_path, unicode=True)
    app = QtGui.QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(False)
    wnd = Dialer()
    rc = app.exec_()
    sys.exit(rc)
コード例 #4
0
ファイル: main.py プロジェクト: bigbn/Telesk
def main():
    if sys.platform.startswith("win"):
        gettext_windows.setup_env()
        
    lang_path = os.path.dirname(os.path.abspath(sys.argv[0]))+'/locale'
    debug("Lang path: %s" % lang_path)
    gettext.install('telesk', lang_path, unicode=True)
    app = QtGui.QApplication(sys.argv)
    app.setQuitOnLastWindowClosed(False)
    wnd = Dialer()
    rc = app.exec_()
    sys.exit(rc)
コード例 #5
0
ファイル: power_m.py プロジェクト: fadiga/Power-Management
def main():

    setup()
    gettext_windows.setup_env()

    locale.setlocale(locale.LC_ALL, '')

    gettext.install('power_m', localedir='locale', unicode=True)

    app = QtGui.QApplication(sys.argv)
    qb = MainWindows()
    qb.show()
    sys.exit(app.exec_())
コード例 #6
0
ファイル: power_m.py プロジェクト: fadiga/Power-Management
def main():

    setup()
    gettext_windows.setup_env()

    locale.setlocale(locale.LC_ALL, '')

    gettext.install('power_m', localedir='locale', unicode=True)

    app = QtGui.QApplication(sys.argv)
    qb = MainWindows()
    qb.show()
    sys.exit(app.exec_())
コード例 #7
0
ファイル: anm.py プロジェクト: yeleman/anm
def main():

    gettext_windows.setup_env()

    locale.setlocale(locale.LC_ALL, '')

    gettext.install('anm', localedir='locale', unicode=True)

    # ensure DB is in place
    fixture_data.initial_setup()

    app = QtGui.QApplication(sys.argv)
    window = MainWindow()
    setattr(ANMWindow, 'window', window)
    window.show()
    #window.showMaximized()
    sys.exit(app.exec_())
コード例 #8
0
ファイル: cmain.py プロジェクト: Ciwara/qt_common
def cmain():

    gettext_windows.setup_env()
    locale.setlocale(locale.LC_ALL, '')
    gettext.install('main.py', localedir='locale')

    if CConstants.DEBUG:
        print("Debug is True")
        return True

    if Owner().select().where(Owner.isactive == True).count() == 0:
        if not NewOrEditUserViewWidget().exec_() == QDialog.Accepted:
            return
    if Organization().select().count() == 0:
        if not NewOrEditOrganizationViewWidget().exec_() == QDialog.Accepted:
            return
    if not is_valide_mac() == CConstants.OK:
        if not LicenseViewWidget(parent=None).exec_() == QDialog.Accepted:
            return
    if not Organization().get(id=1).is_login or LoginWidget().exec_() == QDialog.Accepted:
        return True
    return False
コード例 #9
0
ファイル: maindebt.py プロジェクト: fadiga/debt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#maintainer : Fad

import sys
import gettext
import locale

from gettext import gettext as _
from PyQt4 import QtCore, QtGui

import gettext_windows
from ui.mainviews import MainWindows


if __name__ == "__main__":
    gettext_windows.setup_env()
    locale.setlocale(locale.LC_ALL, '')

    gettext.install('debt', localedir='locale', unicode=True)
    app = QtGui.QApplication(sys.argv)
    qb = MainWindows()
    qb.show()
    sys.exit(app.exec_())
コード例 #10
0
# not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are
# incorporated in the source code or documentation are not subject to the GNU
# General Public License and may only be used or replicated with the express
# permission of Red Hat, Inc.
#
# Author(s): Luke Macken <*****@*****.**>

import os
import sys
import gettext
import locale

if sys.platform == 'win32':
    import gettext_windows
    gettext_windows.setup_env()

if os.path.exists('locale'):
    translation = gettext.translation('liveusb-creator', 'locale', fallback=True)
else:
    translation = gettext.translation('liveusb-creator', '/usr/share/locale',
                                      fallback=True)
_ = translation.gettext

def utf8_gettext(string):
    " Translate string, converting it to a UTF-8 encoded bytestring "
    return _(string).encode('utf8')

from liveusb.creator import LiveUSBError

if sys.platform == "win32":