Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #389 from slarosa/pyqgis-console
Update translation for Python Console
  • Loading branch information
dakcarto committed Jan 22, 2013
2 parents 53197ad + 73b3d9c commit b1bfb9a
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 61 deletions.
59 changes: 49 additions & 10 deletions i18n/qgis_it.ts
Expand Up @@ -6470,30 +6470,69 @@ Cambiare questa situazione prima, perché il plugin OSM non quale layer è la de
<translation>Esegui comando</translation>
</message>
<message>
<source>Are you sure you want to completely
delete the command history ?</source>
<translation>Sei sicuro di voler concellare completamente
la cronologia dei comandi ?</translation>
<source>Session and file history cleared successfully.</source>
<translation>Storia dei comandi cancellata completamente.</translation>
</message>
<message>
<source>## History saved successfully ##</source>
<translation>## Storia comandi salvata con successo ##</translation>
<source>History saved successfully.</source>
<translation>Storia comandi salvata con successo.</translation>
</message>
<message>
<source>## History cleared successfully ##</source>
<translation>## Storia comandi cancellata con successo ##</translation>
<source>History cleared successfully.</source>
<translation>Storia comandi cancellata con successo.</translation>
</message>
<message>
<source>Script was correctly saved.</source>
<translation>File salvato correttamente.</translation>
</message>
<message>
<source>URL copied to clipboard.</source>
<translation>URL copiata nella clipboard</translation>
</message>
<message>
<source>Connection error: </source>
<translation>Errore di connessione: </translation>
</message>
<message>
<source>## To access Quantum GIS environment from this console
## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.
## use iface object (instance of QgisInterface class).
## Type help(iface) for more info and list of methods.

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

</translation>
</message>
</context>
<context>
<name>SettingsDialogPythonConsole</name>
<message>
<source>Settings Python Console</source>
<translation>Impostazioni Python Console</translation>
</message>
<message>
<location filename="../python/console/console_settings.ui" line="200"/>
<source>Font</source>
<translation>Carattere</translation>
</message>
<message>
<location filename="../python/console/console_settings.ui" line="201"/>
<source>Size</source>
<translation>Dimensione</translation>
</message>
<message>
<location filename="../python/console/console_settings.ui" line="203"/>
<source>Browse</source>
<translation>Sfoglia</translation>
</message>
<message>
<location filename="../python/console/console_settings.ui" line="206"/>
<source>Using preloaded API file</source>
<translation>Usare il file delle API preinstallato</translation>
</message>
</context>
<context>
<name>QGis::UnitType</name>
<message>
Expand Down
8 changes: 5 additions & 3 deletions python/console/console_output.py
Expand Up @@ -137,7 +137,7 @@ def __init__(self, parent=None):
def insertInitText(self):
txtInit = QCoreApplication.translate("PythonConsole",
"## To access Quantum GIS environment from this console\n"
"## use iface object (instance of QgisInterface class). \n"
"## use iface object (instance of QgisInterface class).\n"
"## Type help(iface) for more info and list of methods.\n\n")
initText = self.setText(txtInit)

Expand Down Expand Up @@ -277,9 +277,11 @@ def pastebin(self):
link = i.replace('<a href="',"").strip()
if link:
QApplication.clipboard().setText(link)
self.parent.callWidgetMessageBar('URL copied to clipboard')
msgText = QCoreApplication.translate('PythonConsole', 'URL copied to clipboard.')
self.parent.callWidgetMessageBar(msgText)
except urllib2.URLError, e:
self.parent.callWidgetMessageBar('Connection error: ' + str(e.args))
msgText = QCoreApplication.translate('PythonConsole', 'Connection error: ')
self.parent.callWidgetMessageBar(msgText + str(e.args))

def widgetMessageBar(self, iface, text):
timeout = iface.messageTimeout()
Expand Down
8 changes: 5 additions & 3 deletions python/console/console_sci.py
Expand Up @@ -502,18 +502,20 @@ def runCommand(self, cmd):
if cmd in ('_save', '_clear', '_clearAll', '_pyqgis', '_api'):
if cmd == '_save':
self.writeHistoryFile()
self.parent.callWidgetMessageBar('History saved successfully')
msgText = QCoreApplication.translate('PythonConsole', 'History saved successfully.')
elif cmd == '_clear':
self.clearHistoryFile()
self.parent.callWidgetMessageBar('History cleared successfully')
msgText = QCoreApplication.translate('PythonConsole', 'History cleared successfully.')
elif cmd == '_clearAll':
self.history = QStringList()
self.clearHistoryFile()
self.parent.callWidgetMessageBar('Session and file history cleared successfully')
msgText = QCoreApplication.translate('PythonConsole', 'Session and file history cleared successfully.')
elif cmd == '_pyqgis':
webbrowser.open( "http://www.qgis.org/pyqgis-cookbook/" )
elif cmd == '_api':
webbrowser.open( "http://www.qgis.org/api/" )
if msgText:
self.parent.callWidgetMessageBar(msgText)

self.displayPrompt(False)
else:
Expand Down
6 changes: 3 additions & 3 deletions python/console/console_settings.py
Expand Up @@ -22,12 +22,12 @@
from PyQt4.QtCore import *
from PyQt4.QtGui import *

from ui_console_settings import Ui_SettingsDialog
from ui_console_settings import Ui_SettingsDialogPythonConsole

class optionsDialog(QDialog, Ui_SettingsDialog):
class optionsDialog(QDialog, Ui_SettingsDialogPythonConsole):
def __init__(self, parent):
QDialog.__init__(self, parent)
self.setWindowTitle(QCoreApplication.translate("PythonConsole", "Settings Python Console"))
self.setWindowTitle(QCoreApplication.translate("SettingsDialogPythonConsole", "Settings Python Console"))
#self.iface = iface
self.parent = parent
self.setupUi(self)
Expand Down
84 changes: 42 additions & 42 deletions python/console/console_settings.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingsDialog</class>
<widget class="QDialog" name="SettingsDialog">
<class>SettingsDialogPythonConsole</class>
<widget class="QDialog" name="SettingsDialogPythonConsole">
<property name="windowModality">
<enum>Qt::NonModal</enum>
</property>
Expand Down Expand Up @@ -109,43 +109,6 @@
</item>
<item row="5" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerItem</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="rowCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
Expand Down Expand Up @@ -207,6 +170,43 @@
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidget">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectItems</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerItem</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="rowCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
Expand All @@ -222,7 +222,7 @@
<item row="2" column="0">
<widget class="QCheckBox" name="preloadAPI">
<property name="text">
<string>Use preloaded API file</string>
<string>Using preloaded API file</string>
</property>
<property name="checked">
<bool>true</bool>
Expand All @@ -239,7 +239,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>SettingsDialog</receiver>
<receiver>SettingsDialogPythonConsole</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
Expand All @@ -255,7 +255,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>SettingsDialog</receiver>
<receiver>SettingsDialogPythonConsole</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
Expand Down

0 comments on commit b1bfb9a

Please sign in to comment.