Skip to content

Commit

Permalink
[pyqgis-console] adds a "\n" at the end of the header text if it has …
Browse files Browse the repository at this point in the history
…not been inserted from translators
  • Loading branch information
slarosa committed Aug 31, 2013
1 parent 9f6e933 commit 460b007
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/console/console_output.py
Expand Up @@ -137,7 +137,13 @@ def insertInitText(self):
"Python {0} on {1}\n"
"## Type help(iface) for more info and list of methods.\n").format(sys.version,
socket.gethostname())
initText = self.setText(txtInit)
## some translation string for the console header ends without '\n'
## and the first command in console will be appended at the header text.
## The following code add a '\n' at the end of the string if not present.
if txtInit.endswith('\n'):
initText = self.setText(txtInit)
else:
initText = self.setText(txtInit + '\n')

def refreshLexerProperties(self):
self.setLexers()
Expand Down

0 comments on commit 460b007

Please sign in to comment.