Skip to content

Commit b1bfb9a

Browse files
committedJan 22, 2013
Merge pull request #389 from slarosa/pyqgis-console
Update translation for Python Console
2 parents 53197ad + 73b3d9c commit b1bfb9a

File tree

5 files changed

+104
-61
lines changed

5 files changed

+104
-61
lines changed
 

‎i18n/qgis_it.ts

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6470,30 +6470,69 @@ Cambiare questa situazione prima, perché il plugin OSM non quale layer è la de
64706470
<translation>Esegui comando</translation>
64716471
</message>
64726472
<message>
6473-
<source>Are you sure you want to completely
6474-
delete the command history ?</source>
6475-
<translation>Sei sicuro di voler concellare completamente
6476-
la cronologia dei comandi ?</translation>
6473+
<source>Session and file history cleared successfully.</source>
6474+
<translation>Storia dei comandi cancellata completamente.</translation>
64776475
</message>
64786476
<message>
6479-
<source>## History saved successfully ##</source>
6480-
<translation>## Storia comandi salvata con successo ##</translation>
6477+
<source>History saved successfully.</source>
6478+
<translation>Storia comandi salvata con successo.</translation>
64816479
</message>
64826480
<message>
6483-
<source>## History cleared successfully ##</source>
6484-
<translation>## Storia comandi cancellata con successo ##</translation>
6481+
<source>History cleared successfully.</source>
6482+
<translation>Storia comandi cancellata con successo.</translation>
6483+
</message>
6484+
<message>
6485+
<source>Script was correctly saved.</source>
6486+
<translation>File salvato correttamente.</translation>
6487+
</message>
6488+
<message>
6489+
<source>URL copied to clipboard.</source>
6490+
<translation>URL copiata nella clipboard</translation>
6491+
</message>
6492+
<message>
6493+
<source>Connection error: </source>
6494+
<translation>Errore di connessione: </translation>
64856495
</message>
64866496
<message>
64876497
<source>## To access Quantum GIS environment from this console
6488-
## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.
6498+
## use iface object (instance of QgisInterface class).
6499+
## Type help(iface) for more info and list of methods.
64896500

64906501
</source>
64916502
<translation>## Per accedere all&apos;ambiente Quantum GIS da questa console
6492-
## usa l&apos;oggetto qgis.utils.iface (istanza della classe QgisInterface). Consulta l&apos;aiuto per ottenere più informazioni.
6503+
## usa l&apos;oggetto iface (istanza della classe QgisInterface).
6504+
## Digita help(iface) per ottenere più informazioni.
64936505

64946506
</translation>
64956507
</message>
64966508
</context>
6509+
<context>
6510+
<name>SettingsDialogPythonConsole</name>
6511+
<message>
6512+
<source>Settings Python Console</source>
6513+
<translation>Impostazioni Python Console</translation>
6514+
</message>
6515+
<message>
6516+
<location filename="../python/console/console_settings.ui" line="200"/>
6517+
<source>Font</source>
6518+
<translation>Carattere</translation>
6519+
</message>
6520+
<message>
6521+
<location filename="../python/console/console_settings.ui" line="201"/>
6522+
<source>Size</source>
6523+
<translation>Dimensione</translation>
6524+
</message>
6525+
<message>
6526+
<location filename="../python/console/console_settings.ui" line="203"/>
6527+
<source>Browse</source>
6528+
<translation>Sfoglia</translation>
6529+
</message>
6530+
<message>
6531+
<location filename="../python/console/console_settings.ui" line="206"/>
6532+
<source>Using preloaded API file</source>
6533+
<translation>Usare il file delle API preinstallato</translation>
6534+
</message>
6535+
</context>
64976536
<context>
64986537
<name>QGis::UnitType</name>
64996538
<message>

‎python/console/console_output.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __init__(self, parent=None):
137137
def insertInitText(self):
138138
txtInit = QCoreApplication.translate("PythonConsole",
139139
"## To access Quantum GIS environment from this console\n"
140-
"## use iface object (instance of QgisInterface class). \n"
140+
"## use iface object (instance of QgisInterface class).\n"
141141
"## Type help(iface) for more info and list of methods.\n\n")
142142
initText = self.setText(txtInit)
143143

@@ -277,9 +277,11 @@ def pastebin(self):
277277
link = i.replace('<a href="',"").strip()
278278
if link:
279279
QApplication.clipboard().setText(link)
280-
self.parent.callWidgetMessageBar('URL copied to clipboard')
280+
msgText = QCoreApplication.translate('PythonConsole', 'URL copied to clipboard.')
281+
self.parent.callWidgetMessageBar(msgText)
281282
except urllib2.URLError, e:
282-
self.parent.callWidgetMessageBar('Connection error: ' + str(e.args))
283+
msgText = QCoreApplication.translate('PythonConsole', 'Connection error: ')
284+
self.parent.callWidgetMessageBar(msgText + str(e.args))
283285

284286
def widgetMessageBar(self, iface, text):
285287
timeout = iface.messageTimeout()

‎python/console/console_sci.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,18 +502,20 @@ def runCommand(self, cmd):
502502
if cmd in ('_save', '_clear', '_clearAll', '_pyqgis', '_api'):
503503
if cmd == '_save':
504504
self.writeHistoryFile()
505-
self.parent.callWidgetMessageBar('History saved successfully')
505+
msgText = QCoreApplication.translate('PythonConsole', 'History saved successfully.')
506506
elif cmd == '_clear':
507507
self.clearHistoryFile()
508-
self.parent.callWidgetMessageBar('History cleared successfully')
508+
msgText = QCoreApplication.translate('PythonConsole', 'History cleared successfully.')
509509
elif cmd == '_clearAll':
510510
self.history = QStringList()
511511
self.clearHistoryFile()
512-
self.parent.callWidgetMessageBar('Session and file history cleared successfully')
512+
msgText = QCoreApplication.translate('PythonConsole', 'Session and file history cleared successfully.')
513513
elif cmd == '_pyqgis':
514514
webbrowser.open( "http://www.qgis.org/pyqgis-cookbook/" )
515515
elif cmd == '_api':
516516
webbrowser.open( "http://www.qgis.org/api/" )
517+
if msgText:
518+
self.parent.callWidgetMessageBar(msgText)
517519

518520
self.displayPrompt(False)
519521
else:

‎python/console/console_settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
from PyQt4.QtCore import *
2323
from PyQt4.QtGui import *
2424

25-
from ui_console_settings import Ui_SettingsDialog
25+
from ui_console_settings import Ui_SettingsDialogPythonConsole
2626

27-
class optionsDialog(QDialog, Ui_SettingsDialog):
27+
class optionsDialog(QDialog, Ui_SettingsDialogPythonConsole):
2828
def __init__(self, parent):
2929
QDialog.__init__(self, parent)
30-
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Settings Python Console"))
30+
self.setWindowTitle(QCoreApplication.translate("SettingsDialogPythonConsole", "Settings Python Console"))
3131
#self.iface = iface
3232
self.parent = parent
3333
self.setupUi(self)

‎python/console/console_settings.ui

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>SettingsDialog</class>
4-
<widget class="QDialog" name="SettingsDialog">
3+
<class>SettingsDialogPythonConsole</class>
4+
<widget class="QDialog" name="SettingsDialogPythonConsole">
55
<property name="windowModality">
66
<enum>Qt::NonModal</enum>
77
</property>
@@ -109,43 +109,6 @@
109109
</item>
110110
<item row="5" column="0">
111111
<layout class="QGridLayout" name="gridLayout">
112-
<item row="0" column="0">
113-
<widget class="QTableWidget" name="tableWidget">
114-
<property name="editTriggers">
115-
<set>QAbstractItemView::NoEditTriggers</set>
116-
</property>
117-
<property name="tabKeyNavigation">
118-
<bool>false</bool>
119-
</property>
120-
<property name="showDropIndicator" stdset="0">
121-
<bool>false</bool>
122-
</property>
123-
<property name="dragDropOverwriteMode">
124-
<bool>false</bool>
125-
</property>
126-
<property name="selectionMode">
127-
<enum>QAbstractItemView::ExtendedSelection</enum>
128-
</property>
129-
<property name="selectionBehavior">
130-
<enum>QAbstractItemView::SelectItems</enum>
131-
</property>
132-
<property name="verticalScrollMode">
133-
<enum>QAbstractItemView::ScrollPerItem</enum>
134-
</property>
135-
<property name="horizontalScrollMode">
136-
<enum>QAbstractItemView::ScrollPerPixel</enum>
137-
</property>
138-
<property name="rowCount">
139-
<number>0</number>
140-
</property>
141-
<attribute name="horizontalHeaderVisible">
142-
<bool>true</bool>
143-
</attribute>
144-
<attribute name="verticalHeaderVisible">
145-
<bool>false</bool>
146-
</attribute>
147-
</widget>
148-
</item>
149112
<item row="0" column="1">
150113
<layout class="QVBoxLayout" name="verticalLayout">
151114
<item>
@@ -207,6 +170,43 @@
207170
</item>
208171
</layout>
209172
</item>
173+
<item row="0" column="0">
174+
<widget class="QTableWidget" name="tableWidget">
175+
<property name="editTriggers">
176+
<set>QAbstractItemView::NoEditTriggers</set>
177+
</property>
178+
<property name="tabKeyNavigation">
179+
<bool>false</bool>
180+
</property>
181+
<property name="showDropIndicator" stdset="0">
182+
<bool>false</bool>
183+
</property>
184+
<property name="dragDropOverwriteMode">
185+
<bool>false</bool>
186+
</property>
187+
<property name="selectionMode">
188+
<enum>QAbstractItemView::ExtendedSelection</enum>
189+
</property>
190+
<property name="selectionBehavior">
191+
<enum>QAbstractItemView::SelectItems</enum>
192+
</property>
193+
<property name="verticalScrollMode">
194+
<enum>QAbstractItemView::ScrollPerItem</enum>
195+
</property>
196+
<property name="horizontalScrollMode">
197+
<enum>QAbstractItemView::ScrollPerPixel</enum>
198+
</property>
199+
<property name="rowCount">
200+
<number>0</number>
201+
</property>
202+
<attribute name="horizontalHeaderVisible">
203+
<bool>true</bool>
204+
</attribute>
205+
<attribute name="verticalHeaderVisible">
206+
<bool>false</bool>
207+
</attribute>
208+
</widget>
209+
</item>
210210
</layout>
211211
</item>
212212
<item row="6" column="0">
@@ -222,7 +222,7 @@
222222
<item row="2" column="0">
223223
<widget class="QCheckBox" name="preloadAPI">
224224
<property name="text">
225-
<string>Use preloaded API file</string>
225+
<string>Using preloaded API file</string>
226226
</property>
227227
<property name="checked">
228228
<bool>true</bool>
@@ -239,7 +239,7 @@
239239
<connection>
240240
<sender>buttonBox</sender>
241241
<signal>accepted()</signal>
242-
<receiver>SettingsDialog</receiver>
242+
<receiver>SettingsDialogPythonConsole</receiver>
243243
<slot>accept()</slot>
244244
<hints>
245245
<hint type="sourcelabel">
@@ -255,7 +255,7 @@
255255
<connection>
256256
<sender>buttonBox</sender>
257257
<signal>rejected()</signal>
258-
<receiver>SettingsDialog</receiver>
258+
<receiver>SettingsDialogPythonConsole</receiver>
259259
<slot>reject()</slot>
260260
<hints>
261261
<hint type="sourcelabel">

0 commit comments

Comments
 (0)
Please sign in to comment.