mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #3270 (Chapter detection keywords should not be translated)
This commit is contained in:
parent
05f7f42400
commit
745723b60c
@ -34,7 +34,7 @@ class Widget(QWidget):
|
||||
def initialize_options(self, get_option, get_help, db=None, book_id=None):
|
||||
'''
|
||||
:param get_option: A callable that takes one argument: the option name
|
||||
and returns the correspoing OptionRecommendation.
|
||||
and returns the corresponding OptionRecommendation.
|
||||
:param get_help: A callable that takes the option name and return a help
|
||||
string.
|
||||
'''
|
||||
|
@ -28,11 +28,12 @@ class StructureDetectionWidget(Widget, Ui_Form):
|
||||
'remove_footer', 'footer_regex']
|
||||
)
|
||||
self.db, self.book_id = db, book_id
|
||||
for x in ('pagebreak', 'rule', 'both', 'none'):
|
||||
self.opt_chapter_mark.addItem(x)
|
||||
self.initialize_options(get_option, get_help, db, book_id)
|
||||
self.opt_chapter.set_msg(_('Detect chapters at (XPath expression):'))
|
||||
self.opt_page_breaks_before.set_msg(_('Insert page breaks before '
|
||||
'(XPath expression):'))
|
||||
|
||||
def pre_commit_check(self):
|
||||
for x in ('header_regex', 'footer_regex'):
|
||||
x = getattr(self, 'opt_'+x)
|
||||
|
@ -29,26 +29,6 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="opt_chapter_mark">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>pagebreak</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>rule</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>both</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>none</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
@ -5,8 +5,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: calibre 0.6.8\n"
|
||||
"POT-Creation-Date: 2009-08-24 08:38+MDT\n"
|
||||
"PO-Revision-Date: 2009-08-24 08:38+MDT\n"
|
||||
"POT-Creation-Date: 2009-08-24 08:57+MDT\n"
|
||||
"PO-Revision-Date: 2009-08-24 08:57+MDT\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: LANGUAGE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -2006,7 +2006,7 @@ msgstr ""
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_input_ui.py:38
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/pdf_output_ui.py:39
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/rb_output_ui.py:28
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:71
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:67
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/toc_ui.py:61
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_input_ui.py:28
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:35
|
||||
@ -2523,91 +2523,71 @@ msgstr ""
|
||||
msgid "Fine tune the detection of chapter headings and other document structure."
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:32
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:34
|
||||
msgid "Detect chapters at (XPath expression):"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:33
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:35
|
||||
msgid "Insert page breaks before (XPath expression):"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:43
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:44
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:72
|
||||
msgid "Invalid regular expression"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:44
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:45
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:73
|
||||
msgid "Invalid regular expression: %s"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:49
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:50
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/toc.py:38
|
||||
msgid "Invalid XPath"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:50
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection.py:51
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/toc.py:39
|
||||
msgid "The XPath expression %s is invalid."
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:72
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:68
|
||||
msgid "Chapter &mark:"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:73
|
||||
msgid "pagebreak"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:74
|
||||
msgid "rule"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:75
|
||||
msgid "both"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:76
|
||||
msgid "none"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:77
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:69
|
||||
msgid "Remove first &image"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:78
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:70
|
||||
msgid "Insert &metadata as page at start of book"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:79
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:71
|
||||
msgid "&Footer regular expression:"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:80
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:72
|
||||
msgid "&Preprocess input file to possibly improve structure detection"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:81
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:73
|
||||
msgid "&Header regular expression:"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:82
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:74
|
||||
msgid "Remove F&ooter"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:83
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:75
|
||||
msgid "Remove H&eader"
|
||||
msgstr ""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user