fix error message

This commit is contained in:
Tim Bentley 2013-09-11 20:00:30 +01:00
parent 71f74a53c2
commit 5295697677
3 changed files with 8 additions and 2 deletions

View File

@ -50,7 +50,10 @@ class FormattingTags(object):
@staticmethod
def save_html_tags(new_tags):
"""
Saves all formatting tags except protected ones.
Saves all formatting tags except protected ones
`new_tags`
The tags to be saved..
"""
# Formatting Tags were also known as display tags.
Settings().setValue('formattingTags/html_tags', json.dumps(new_tags) if new_tags else '')

View File

@ -107,6 +107,9 @@ class FormattingTagController(object):
def _strip(self, tag):
"""
Remove tag wrappers for editing.
`tag`
Tag to be stripped
"""
tag = tag.replace('{', '')
tag = tag.replace('}', '')

View File

@ -90,7 +90,7 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog, FormattingTagCont
new_row = self.tag_table_widget.rowCount()
self.tag_table_widget.insertRow(new_row)
self.tag_table_widget.setItem(new_row, 0,
QtGui.QTableWidgetItem(translate('OpenLP.FormattingTagForm', 'New Tag')))
QtGui.QTableWidgetItem(translate('OpenLP.FormattingTagForm', 'New Tag%s') % str(new_row)))
self.tag_table_widget.setItem(new_row, 1, QtGui.QTableWidgetItem('n%s' % str(new_row)))
self.tag_table_widget.setItem(new_row, 2,
QtGui.QTableWidgetItem(translate('OpenLP.FormattingTagForm', '<HTML here>')))