Updated translatable strings

This commit is contained in:
Kovid Goyal 2009-06-11 15:27:16 -07:00
parent a23bdcf536
commit 233c3bcb1b
3 changed files with 75 additions and 70 deletions

View File

@ -17,7 +17,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Newline Type:</string>
<string>Line ending style:</string>
</property>
</widget>
</item>

View File

@ -1,4 +1,4 @@
from __future__ import with_statement
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, John Schember <john@nachtimwald.com>'
@ -14,29 +14,29 @@ from calibre.gui2 import NONE, qstring_to_unicode
class BookmarkManager(QDialog, Ui_BookmarkManager):
def __init__(self, parent, bookmarks):
QDialog.__init__(self, parent)
self.setupUi(self)
self.bookmarks = bookmarks[:]
self.set_bookmarks()
self.connect(self.button_revert, SIGNAL('clicked()'), self.set_bookmarks)
self.connect(self.button_delete, SIGNAL('clicked()'), self.delete_bookmark)
self.connect(self.button_edit, SIGNAL('clicked()'), self.edit_bookmark)
self.connect(self.button_export, SIGNAL('clicked()'), self.export_bookmarks)
self.connect(self.button_import, SIGNAL('clicked()'), self.import_bookmarks)
def set_bookmarks(self, bookmarks=None):
if bookmarks == None:
bookmarks = self.bookmarks[:]
self._model = BookmarkTableModel(self, bookmarks)
self.bookmarks_table.setModel(self._model)
def delete_bookmark(self):
indexes = self.bookmarks_table.selectionModel().selectedIndexes()
if indexes != []:
self._model.remove_row(indexes[0].row())
def edit_bookmark(self):
indexes = self.bookmarks_table.selectionModel().selectedIndexes()
if indexes != []:
@ -44,27 +44,29 @@ class BookmarkManager(QDialog, Ui_BookmarkManager):
title = QVariant(unicode(title).strip())
if ok and title:
self._model.setData(indexes[0], title, Qt.EditRole)
def get_bookmarks(self):
return self._model.bookmarks
def export_bookmarks(self):
filename = QFileDialog.getSaveFileName(self, _("Export Bookmarks"), '%s%suntitled.pickle' % (os.getcwdu(), os.sep), _("Pickled Bookmarks (*.pickle)"))
filename = QFileDialog.getSaveFileName(self, _("Export Bookmarks"),
'%s%suntitled.pickle' % (os.getcwdu(), os.sep),
_("Saved Bookmarks (*.pickle)"))
if filename == '':
return
with open(filename, 'w') as fileobj:
cPickle.dump(self._model.bookmarks, fileobj)
def import_bookmarks(self):
filename = QFileDialog.getOpenFileName(self, _("Import Bookmarks"), '%s' % os.getcwdu(), _("Pickled Bookmarks (*.pickle)"))
if filename == '':
return
imported = None
with open(filename, 'r') as fileobj:
imported = cPickle.load(fileobj)
if imported != None:
bad = False
try:
@ -74,7 +76,7 @@ class BookmarkManager(QDialog, Ui_BookmarkManager):
break
except:
pass
if not bad:
bookmarks = self._model.bookmarks[:]
for bm in imported:
@ -88,32 +90,32 @@ class BookmarkTableModel(QAbstractTableModel):
def __init__(self, parent, bookmarks):
QAbstractTableModel.__init__(self, parent)
self.bookmarks = bookmarks[:]
def rowCount(self, parent):
if parent and parent.isValid():
return 0
return len(self.bookmarks)
def columnCount(self, parent):
if parent and parent.isValid():
return 0
return len(self.headers)
def data(self, index, role):
if role in (Qt.DisplayRole, Qt.EditRole):
ans = self.bookmarks[index.row()][0]
return NONE if ans is None else QVariant(ans)
return NONE
def setData(self, index, value, role):
if role == Qt.EditRole:
self.bookmarks[index.row()] = (qstring_to_unicode(value.toString()).strip(), self.bookmarks[index.row()][1])
self.emit(SIGNAL("dataChanged(QModelIndex, QModelIndex)"), index, index)
return True
return False
def flags(self, index):
flags = QAbstractTableModel.flags(self, index)
flags |= Qt.ItemIsEditable
@ -126,7 +128,7 @@ class BookmarkTableModel(QAbstractTableModel):
return QVariant(self.headers[section])
else:
return QVariant(section+1)
def remove_row(self, row):
self.beginRemoveRows(QModelIndex(), row, row)
del self.bookmarks[row]

View File

@ -4,9 +4,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: calibre 0.6.0b3\n"
"POT-Creation-Date: 2009-06-10 13:26+PDT\n"
"PO-Revision-Date: 2009-06-10 13:26+PDT\n"
"Project-Id-Version: calibre 0.6.0b5\n"
"POT-Creation-Date: 2009-06-11 15:24+PDT\n"
"PO-Revision-Date: 2009-06-11 15:24+PDT\n"
"Last-Translator: Automatically generated\n"
"Language-Team: LANGUAGE\n"
"MIME-Version: 1.0\n"
@ -58,12 +58,12 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:69
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:78
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:149
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:531
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:715
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:535
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:719
#: /home/kovid/work/calibre/src/calibre/ebooks/odt/input.py:44
#: /home/kovid/work/calibre/src/calibre/ebooks/odt/input.py:46
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:791
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:796
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:798
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:803
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/reader.py:162
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/reader.py:165
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/jacket.py:82
@ -363,7 +363,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/devices/prs505/driver.py:151
#: /home/kovid/work/calibre/src/calibre/devices/usbms/driver.py:133
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/scheduler.py:467
#: /home/kovid/work/calibre/src/calibre/gui2/tags.py:50
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80
#: /home/kovid/work/calibre/src/calibre/library/database2.py:937
#: /home/kovid/work/calibre/src/calibre/library/database2.py:941
#: /home/kovid/work/calibre/src/calibre/library/database2.py:1259
@ -1082,51 +1082,51 @@ msgstr ""
msgid "Set book ID"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:77
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:78
msgid "Enable autorotation of images that are wider than the screen width."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:81
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:82
msgid "Set the space between words in pts. Default is %default"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:84
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:85
msgid "Add a header to all the pages with title and author."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:87
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:88
msgid "Set the format of the header. %a is replaced by the author and %t by the title. Default is %default"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:91
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:92
msgid "Add extra spacing below the header. Default is %default pt."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:94
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:95
msgid "Minimum paragraph indent (the indent of the first line of a paragraph) in pts. Default: %default"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:99
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:100
msgid "Render tables in the HTML as images (useful if the document has large or complex tables)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:104
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:105
msgid "Multiply the size of text in rendered tables by this factor. Default is %default"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:108
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:109
msgid "The serif family of fonts to embed"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:111
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:112
msgid "The sans-serif family of fonts to embed"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:114
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:115
msgid "The monospace family of fonts to embed"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:139
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/output.py:140
msgid "Comic"
msgstr ""
@ -1178,7 +1178,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:942
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:1002
#: /home/kovid/work/calibre/src/calibre/gui2/status.py:60
#: /home/kovid/work/calibre/src/calibre/gui2/tags.py:50
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80
msgid "Tags"
msgstr ""
@ -1186,7 +1186,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:124
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:319
#: /home/kovid/work/calibre/src/calibre/gui2/status.py:59
#: /home/kovid/work/calibre/src/calibre/gui2/tags.py:50
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80
msgid "Series"
msgstr ""
@ -1356,74 +1356,74 @@ msgstr ""
msgid "Disable compression of the file contents."
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1164
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1177
msgid "Cover"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1165
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1178
msgid "Title Page"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1166
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1179
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/transforms/htmltoc.py:15
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/main.py:48
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/main_ui.py:166
msgid "Table of Contents"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1167
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1180
msgid "Index"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1168
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1181
msgid "Glossary"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1169
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1182
msgid "Acknowledgements"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1170
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1183
msgid "Bibliography"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1171
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1184
msgid "Colophon"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1172
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1185
msgid "Copyright"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1173
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1186
msgid "Dedication"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1174
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1187
msgid "Epigraph"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1175
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1188
msgid "Foreword"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1176
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1189
msgid "List of Illustrations"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1177
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1190
msgid "List of Tables"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1178
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1191
msgid "Notes"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1179
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1192
msgid "Preface"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1180
#: /home/kovid/work/calibre/src/calibre/ebooks/oeb/base.py:1193
msgid "Main Text"
msgstr ""
@ -2791,7 +2791,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/dialogs/config.py:212
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:309
#: /home/kovid/work/calibre/src/calibre/gui2/status.py:57
#: /home/kovid/work/calibre/src/calibre/gui2/tags.py:50
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80
msgid "Formats"
msgstr ""
@ -4327,7 +4327,7 @@ msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:302
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:308
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:313
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:374
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:376
msgid "None"
msgstr ""
@ -5028,11 +5028,11 @@ msgstr ""
msgid "Click to browse books by tags"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tags.py:50
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80
msgid "Authors"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/tags.py:50
#: /home/kovid/work/calibre/src/calibre/gui2/tag_view.py:80
msgid "Publishers"
msgstr ""
@ -5076,16 +5076,19 @@ msgstr ""
msgid "Export Bookmarks"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:52
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:60
msgid "Pickled Bookmarks (*.pickle)"
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:54
msgid "Saved Bookmarks (*.pickle)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:60
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:62
msgid "Import Bookmarks"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:87
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:62
msgid "Pickled Bookmarks (*.pickle)"
msgstr ""
#: /home/kovid/work/calibre/src/calibre/gui2/viewer/bookmarkmanager.py:89
msgid "Name"
msgstr ""