mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #1329777 [Translation DE](https://bugs.launchpad.net/calibre/+bug/1329777)
This commit is contained in:
parent
82f9182f95
commit
3bc9e7c534
@ -106,7 +106,7 @@ class AddAction(InterfaceAction):
|
||||
ids = [view.model().id(r) for r in rows]
|
||||
|
||||
if len(ids) > 1 and not question_dialog(self.gui,
|
||||
_('Are you sure'),
|
||||
_('Are you sure?'),
|
||||
_('Are you sure you want to add the same'
|
||||
' files to all %d books? If the format'
|
||||
' already exists for a book, it will be replaced.')%len(ids)):
|
||||
@ -128,7 +128,7 @@ class AddAction(InterfaceAction):
|
||||
title = db.title(ids[0], index_is_id=True)
|
||||
msg = _('The {0} format(s) will be replaced in the book {1}. Are you sure?').format(
|
||||
', '.join(override), title)
|
||||
if not confirm(msg, 'confirm_format_override_on_add', title=_('Are you sure'), parent=self.gui):
|
||||
if not confirm(msg, 'confirm_format_override_on_add', title=_('Are you sure?'), parent=self.gui):
|
||||
return
|
||||
|
||||
for id_ in ids:
|
||||
|
@ -120,7 +120,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
_('You do not have read/write permissions for '
|
||||
'the folder: %s')%path, show=True)
|
||||
raise AbortCommit('invalid auto-add folder')
|
||||
if not question_dialog(self, _('Are you sure'),
|
||||
if not question_dialog(self, _('Are you sure?'),
|
||||
_('<b>WARNING:</b> Any files you place in %s will be '
|
||||
'automatically deleted after being added to '
|
||||
'calibre. Are you sure?')%path):
|
||||
|
@ -252,8 +252,7 @@ class TagBrowserMixin(object): # {{{
|
||||
if not question_dialog(self.tags_view,
|
||||
title=_('Delete item'),
|
||||
msg='<p>'+
|
||||
_('%s will be deleted from all books. Are you sure?')
|
||||
%orig_name,
|
||||
_('%s will be deleted from all books. Are you sure?') %orig_name,
|
||||
skip_dialog_name='tag_item_delete',
|
||||
skip_dialog_msg=_('Show this confirmation again')):
|
||||
return
|
||||
@ -436,7 +435,7 @@ class TagBrowserWidget(QWidget): # {{{
|
||||
'match any or all of them'))
|
||||
ma.setStatusTip(ma.toolTip())
|
||||
|
||||
mt = l.m.addAction(_('Manage authors, tags, etc'))
|
||||
mt = l.m.addAction(_('Manage authors, tags, etc.'))
|
||||
mt.setToolTip(_('All of these category_managers are available by right-clicking '
|
||||
'on items in the tag browser above'))
|
||||
mt.m = l.manage_menu = QMenu(l.m)
|
||||
|
@ -6,7 +6,6 @@ from __future__ import (unicode_literals, division, absolute_import,
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import textwrap
|
||||
from collections import namedtuple
|
||||
|
||||
from PyQt4.Qt import (
|
||||
@ -450,48 +449,8 @@ class Property(QWidget):
|
||||
self.data['underline'] = unicode(self.underline.currentText()) or None
|
||||
self.changed.emit()
|
||||
|
||||
class ThemeEditor(Dialog):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
Dialog.__init__(self, _('Create/edit custom theme'), 'custom-theme-editor', parent=parent)
|
||||
|
||||
def setup_ui(self):
|
||||
self.block_show = False
|
||||
self.properties = []
|
||||
self.l = l = QVBoxLayout(self)
|
||||
self.setLayout(l)
|
||||
h = QHBoxLayout()
|
||||
l.addLayout(h)
|
||||
self.la = la = QLabel(_('&Edit theme:'))
|
||||
h.addWidget(la)
|
||||
self.theme = t = QComboBox(self)
|
||||
la.setBuddy(t)
|
||||
t.addItems(sorted(custom_theme_names()))
|
||||
t.setMinimumWidth(200)
|
||||
if t.count() > 0:
|
||||
t.setCurrentIndex(0)
|
||||
t.currentIndexChanged[int].connect(self.show_theme)
|
||||
h.addWidget(t)
|
||||
|
||||
self.add_button = b = QPushButton(QIcon(I('plus.png')), _('Add &new theme'), self)
|
||||
b.clicked.connect(self.create_new_theme)
|
||||
h.addWidget(b)
|
||||
|
||||
self.remove_button = b = QPushButton(QIcon(I('minus.png')), _('&Remove theme'), self)
|
||||
b.clicked.connect(self.remove_theme)
|
||||
h.addWidget(b)
|
||||
h.addStretch(1)
|
||||
|
||||
self.scroll = s = QScrollArea(self)
|
||||
self.w = w = QWidget(self)
|
||||
s.setWidget(w), s.setWidgetResizable(True)
|
||||
self.cl = cl = QVBoxLayout()
|
||||
w.setLayout(cl)
|
||||
|
||||
from calibre.gui2.tweak_book.editor.text import TextEdit
|
||||
self.preview = p = TextEdit(self, expected_geometry=(73, 50))
|
||||
p.load_text(textwrap.dedent(_(
|
||||
'''\
|
||||
# Help text {{{
|
||||
HELP_TEXT = '''\
|
||||
<h2>Creating a custom theme</h2>
|
||||
|
||||
<p id="attribute" lang="und">You can create a custom syntax highlighting
|
||||
@ -559,7 +518,49 @@ class ThemeEditor(Dialog):
|
||||
line-height: 1.2;
|
||||
}}
|
||||
</style>
|
||||
''')).format(
|
||||
''' # }}}
|
||||
|
||||
class ThemeEditor(Dialog):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
Dialog.__init__(self, _('Create/edit custom theme'), 'custom-theme-editor', parent=parent)
|
||||
|
||||
def setup_ui(self):
|
||||
self.block_show = False
|
||||
self.properties = []
|
||||
self.l = l = QVBoxLayout(self)
|
||||
self.setLayout(l)
|
||||
h = QHBoxLayout()
|
||||
l.addLayout(h)
|
||||
self.la = la = QLabel(_('&Edit theme:'))
|
||||
h.addWidget(la)
|
||||
self.theme = t = QComboBox(self)
|
||||
la.setBuddy(t)
|
||||
t.addItems(sorted(custom_theme_names()))
|
||||
t.setMinimumWidth(200)
|
||||
if t.count() > 0:
|
||||
t.setCurrentIndex(0)
|
||||
t.currentIndexChanged[int].connect(self.show_theme)
|
||||
h.addWidget(t)
|
||||
|
||||
self.add_button = b = QPushButton(QIcon(I('plus.png')), _('Add &new theme'), self)
|
||||
b.clicked.connect(self.create_new_theme)
|
||||
h.addWidget(b)
|
||||
|
||||
self.remove_button = b = QPushButton(QIcon(I('minus.png')), _('&Remove theme'), self)
|
||||
b.clicked.connect(self.remove_theme)
|
||||
h.addWidget(b)
|
||||
h.addStretch(1)
|
||||
|
||||
self.scroll = s = QScrollArea(self)
|
||||
self.w = w = QWidget(self)
|
||||
s.setWidget(w), s.setWidgetResizable(True)
|
||||
self.cl = cl = QVBoxLayout()
|
||||
w.setLayout(cl)
|
||||
|
||||
from calibre.gui2.tweak_book.editor.text import TextEdit
|
||||
self.preview = p = TextEdit(self, expected_geometry=(73, 50))
|
||||
p.load_text(HELP_TEXT.format(
|
||||
*['<b>%s</b>' % x for x in (
|
||||
'Normal', 'Visual', 'CursorLine', 'LineNr', 'MatchParen',
|
||||
'Function', 'Type', 'Statement', 'Constant', 'SpecialCharacter', 'Error', 'SpellError', 'Comment'
|
||||
|
Loading…
x
Reference in New Issue
Block a user