mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-06-07 22:45:32 -04:00
String changes
This commit is contained in:
@@ -420,7 +420,7 @@ class DB(object):
|
||||
|
||||
if iswindows and len(self.library_path) + 4*self.PATH_LIMIT + 10 > 259:
|
||||
raise ValueError(_(
|
||||
'Path to library ({0}) too long. Must be less than'
|
||||
'Path to library ({0}) too long. It must be less than'
|
||||
' {1} characters.').format(self.library_path, 259-4*self.PATH_LIMIT-10))
|
||||
exists = self._exists = os.path.exists(self.dbpath)
|
||||
if not exists:
|
||||
@@ -428,7 +428,7 @@ class DB(object):
|
||||
# allowed for max path lengths of 265 chars.
|
||||
if (iswindows and len(self.library_path) > self.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
raise ValueError(_(
|
||||
'Path to library too long. Must be less than'
|
||||
'Path to library too long. It must be less than'
|
||||
' %d characters.')%self.WINDOWS_LIBRARY_PATH_LIMIT)
|
||||
|
||||
if read_only and os.path.exists(self.dbpath):
|
||||
|
||||
@@ -54,7 +54,7 @@ def main(opts, args, dbctx):
|
||||
)
|
||||
if iswindows and len(loc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT:
|
||||
raise SystemExit(
|
||||
_('Path to library too long. Must be less than'
|
||||
_('Path to library too long. It must be less than'
|
||||
' %d characters.') % LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT
|
||||
)
|
||||
LibraryDatabase(loc, default_prefs=prefs)
|
||||
|
||||
@@ -307,7 +307,7 @@ def _config(): # {{{
|
||||
# This option is no longer used. It remains for compatibility with upgrades
|
||||
# so the value can be migrated
|
||||
c.add_opt('tag_browser_hidden_categories', default=set(),
|
||||
help=_('tag browser categories not to display'))
|
||||
help=_('Tag browser categories not to display'))
|
||||
|
||||
c.add_opt
|
||||
return ConfigProxy(c)
|
||||
|
||||
@@ -445,7 +445,7 @@ class ChooseLibraryAction(InterfaceAction):
|
||||
newloc, show=True)
|
||||
if (iswindows and len(newloc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
return error_dialog(self.gui, _('Too long'),
|
||||
_('Path to library too long. Must be less than'
|
||||
_('Path to library too long. It must be less than'
|
||||
' %d characters.')%LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT,
|
||||
show=True)
|
||||
if not os.path.exists(loc):
|
||||
@@ -505,7 +505,7 @@ class ChooseLibraryAction(InterfaceAction):
|
||||
db = m.db
|
||||
if (iswindows and len(db.library_path) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
return error_dialog(self.gui, _('Too long'),
|
||||
_('Path to library too long. Must be less than'
|
||||
_('Path to library too long. It must be less than'
|
||||
' %d characters. Move your library to a location with'
|
||||
' a shorter path using Windows Explorer, then point'
|
||||
' calibre to the new location and try again.')%
|
||||
|
||||
@@ -121,7 +121,7 @@ class ChooseLibrary(QDialog, Ui_Dialog):
|
||||
if (iswindows and len(loc) >
|
||||
LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
error_dialog(self, _('Too long'),
|
||||
_('Path to library too long. Must be less than'
|
||||
_('Path to library too long. It must be less than'
|
||||
' %d characters.')%LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT,
|
||||
show=True)
|
||||
return False
|
||||
|
||||
@@ -102,7 +102,7 @@ class DeviceCategoryEditor(QDialog, Ui_DeviceCategoryEditor):
|
||||
def _rename_tag(self, item):
|
||||
if item is None:
|
||||
error_dialog(self, _('No item selected'),
|
||||
_('You must select one item from the list of Available items.')).exec_()
|
||||
_('You must select one item from the list of available items.')).exec_()
|
||||
return
|
||||
self.available_tags.editItem(item)
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ class EximDialog(Dialog):
|
||||
continue
|
||||
if iswindows and len(newloc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT:
|
||||
error_dialog(self, _('Too long'),
|
||||
_('Path to library ({0}) too long. Must be less than'
|
||||
_('Path to library ({0}) too long. It must be less than'
|
||||
' {1} characters.').format(newloc, LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT), show=True)
|
||||
return False
|
||||
if not os.path.isdir(newloc):
|
||||
|
||||
@@ -556,7 +556,7 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
||||
indexes = self.table.selectionModel().selectedRows()
|
||||
if not indexes:
|
||||
error_dialog(self, _('No item selected'),
|
||||
_('You must select one item from the list of Available items.')).exec_()
|
||||
_('You must select one item from the list of available items.')).exec_()
|
||||
return
|
||||
|
||||
if not confirm(
|
||||
@@ -581,7 +581,7 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
||||
def _rename_tag(self, item):
|
||||
if item is None:
|
||||
error_dialog(self, _('No item selected'),
|
||||
_('You must select one item from the list of Available items.')).exec_()
|
||||
_('You must select one item from the list of available items.')).exec_()
|
||||
return
|
||||
for col_zero_item in self.table.selectedItems():
|
||||
if col_zero_item.is_deleted:
|
||||
|
||||
@@ -99,7 +99,7 @@ def find_portable_library():
|
||||
if len(lib) > 74:
|
||||
error_dialog(None, _('Path too long'),
|
||||
_("Path to Calibre Portable (%s) "
|
||||
'too long. Must be less than 59 characters.')%base, show=True)
|
||||
'too long. It must be less than 59 characters.')%base, show=True)
|
||||
raise AbortInit()
|
||||
|
||||
prefs.set('library_path', lib)
|
||||
|
||||
@@ -23,7 +23,7 @@ Use this dialog to define a 'plugboard' for a format (or all formats) and a devi
|
||||
|
||||
Often templates will contain simple references to composite columns, but this is not necessary. You can use any template in a source box that you can use elsewhere in calibre.
|
||||
|
||||
One possible use for a plugboard is to alter the title to contain series information. Another would be to change the author sort, something that MOBI users might do to force it to use the ';' that the kindle requires. A third would be to specify the language.</string>
|
||||
One possible use for a plugboard is to alter the title to contain series information. Another would be to change the author sort, something that MOBI users might do to force it to use the ';' that the Kindle requires. A third would be to specify the language.</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
|
||||
@@ -62,7 +62,7 @@ class Tool(object):
|
||||
def register_shortcut(self, qaction, unique_name, default_keys=(), short_text=None, description=None, **extra_data):
|
||||
'''
|
||||
Register a keyboard shortcut that will trigger the specified ``qaction``. This keyboard shortcut
|
||||
will become automatically customizable by the user in the Keyboard section of the editor preferences.
|
||||
will become automatically customizable by the user in the Keyboard shortcuts section of the editor preferences.
|
||||
|
||||
:param qaction: A QAction object, it will be triggered when the
|
||||
configured key combination is pressed by the user.
|
||||
|
||||
@@ -766,7 +766,7 @@ class LibraryPage(QWizardPage, LibraryUI):
|
||||
if x:
|
||||
if (iswindows and len(x) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||
return error_dialog(self, _('Too long'),
|
||||
_('Path to library too long. Must be less than'
|
||||
_('Path to library too long. It must be less than'
|
||||
' %d characters.')%(LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT),
|
||||
show=True)
|
||||
if not os.path.exists(x):
|
||||
|
||||
@@ -1160,7 +1160,7 @@ def get_appdata():
|
||||
'summary':_('Edit the text and styles inside e-books'),
|
||||
'description':(
|
||||
_('The calibre E-book editor allows you to edit the text and styles inside the book with a live preview of your changes.'),
|
||||
_('It can edit books in both the EPUB and AZW3 (kindle) formats. It includes various useful tools for checking the book for errors, editing the Table of Contents, performing automated cleanups, etc.'), # noqa
|
||||
_('It can edit books in both the EPUB and AZW3 (Kindle) formats. It includes various useful tools for checking the book for errors, editing the Table of Contents, performing automated cleanups, etc.'), # noqa
|
||||
),
|
||||
'screenshots':(
|
||||
(1408, 792, 'https://lh5.googleusercontent.com/-M2MAVc3A8e4/UvHMWqGRa8I/AAAAAAAAATA/cecQeWUYBVs/w1408-h792-no/edit-default.png',),
|
||||
|
||||
@@ -431,7 +431,7 @@ class BuiltinListSplit(BuiltinFormatterFunction):
|
||||
"of the value in the list. The first item has position 0 (zero). "
|
||||
"The function returns the last element in the list. "
|
||||
"Example: split('one:two:foo', ':', 'var') is equivalent "
|
||||
"to var_0 = 'one'; var_1 = 'two'; var_3 = 'foo'.")
|
||||
"to var_0 = 'one'; var_1 = 'two'; var_2 = 'foo'.")
|
||||
|
||||
def evaluate(self, formatter, kwargs, mi, locals, list_val, sep, id_prefix):
|
||||
l = [v.strip() for v in list_val.split(sep)]
|
||||
|
||||
Reference in New Issue
Block a user