Plugins/PluginVcsMercurial.py

changeset 3656
441956d8fce5
parent 3523
8df1ab89e261
child 3677
a53cf139293f
equal deleted inserted replaced
3654:ffeb85cdc72d 3656:441956d8fce5
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
13 13
14 from PyQt4.QtCore import QObject 14 from PyQt5.QtCore import QObject, QCoreApplication
15 from PyQt4.QtGui import QApplication
16 15
17 from E5Gui.E5Application import e5App 16 from E5Gui.E5Application import e5App
18 17
19 import Preferences 18 import Preferences
20 from Preferences.Shortcuts import readShortcuts 19 from Preferences.Shortcuts import readShortcuts
54 if Utilities.isWindowsPlatform(): 53 if Utilities.isWindowsPlatform():
55 exe += '.exe' 54 exe += '.exe'
56 55
57 data = { 56 data = {
58 "programEntry": True, 57 "programEntry": True,
59 "header": QApplication.translate( 58 "header": QCoreApplication.translate(
60 "VcsMercurialPlugin", "Version Control - Mercurial"), 59 "VcsMercurialPlugin", "Version Control - Mercurial"),
61 "exe": exe, 60 "exe": exe,
62 "versionCommand": 'version', 61 "versionCommand": 'version',
63 "versionStartsWith": 'Mercurial', 62 "versionStartsWith": 'Mercurial',
64 "versionPosition": -1, 63 "versionPosition": -1,
95 """ 94 """
96 exe = 'hg' 95 exe = 'hg'
97 if Utilities.isWindowsPlatform(): 96 if Utilities.isWindowsPlatform():
98 exe += '.exe' 97 exe += '.exe'
99 if Utilities.isinpath(exe): 98 if Utilities.isinpath(exe):
100 return QApplication.translate('VcsMercurialPlugin', 'Mercurial') 99 return QCoreApplication.translate('VcsMercurialPlugin', 'Mercurial')
101 else: 100 else:
102 return "" 101 return ""
103 102
104 mercurialCfgPluginObject = None 103 mercurialCfgPluginObject = None
105 104
127 @return dictionary with key "zzz_mercurialPage" containing the relevant 126 @return dictionary with key "zzz_mercurialPage" containing the relevant
128 data 127 data
129 """ 128 """
130 return { 129 return {
131 "zzz_mercurialPage": 130 "zzz_mercurialPage":
132 [QApplication.translate("VcsMercurialPlugin", "Mercurial"), 131 [QCoreApplication.translate("VcsMercurialPlugin", "Mercurial"),
133 os.path.join("VcsPlugins", "vcsMercurial", "icons", 132 os.path.join("VcsPlugins", "vcsMercurial", "icons",
134 "preferences-mercurial.png"), 133 "preferences-mercurial.png"),
135 createConfigurationPage, "vcsPage", None], 134 createConfigurationPage, "vcsPage", None],
136 } 135 }
137 136

eric ide

mercurial