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):
|
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
|
: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
|
:param get_help: A callable that takes the option name and return a help
|
||||||
string.
|
string.
|
||||||
'''
|
'''
|
||||||
|
@ -28,11 +28,12 @@ class StructureDetectionWidget(Widget, Ui_Form):
|
|||||||
'remove_footer', 'footer_regex']
|
'remove_footer', 'footer_regex']
|
||||||
)
|
)
|
||||||
self.db, self.book_id = db, book_id
|
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.initialize_options(get_option, get_help, db, book_id)
|
||||||
self.opt_chapter.set_msg(_('Detect chapters at (XPath expression):'))
|
self.opt_chapter.set_msg(_('Detect chapters at (XPath expression):'))
|
||||||
self.opt_page_breaks_before.set_msg(_('Insert page breaks before '
|
self.opt_page_breaks_before.set_msg(_('Insert page breaks before '
|
||||||
'(XPath expression):'))
|
'(XPath expression):'))
|
||||||
|
|
||||||
def pre_commit_check(self):
|
def pre_commit_check(self):
|
||||||
for x in ('header_regex', 'footer_regex'):
|
for x in ('header_regex', 'footer_regex'):
|
||||||
x = getattr(self, 'opt_'+x)
|
x = getattr(self, 'opt_'+x)
|
||||||
|
@ -29,26 +29,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QComboBox" name="opt_chapter_mark">
|
<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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: calibre 0.6.8\n"
|
"Project-Id-Version: calibre 0.6.8\n"
|
||||||
"POT-Creation-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:38+MDT\n"
|
"PO-Revision-Date: 2009-08-24 08:57+MDT\n"
|
||||||
"Last-Translator: Automatically generated\n"
|
"Last-Translator: Automatically generated\n"
|
||||||
"Language-Team: LANGUAGE\n"
|
"Language-Team: LANGUAGE\n"
|
||||||
"MIME-Version: 1.0\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_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/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/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/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_input_ui.py:28
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/txt_output_ui.py:35
|
#: /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."
|
msgid "Fine tune the detection of chapter headings and other document structure."
|
||||||
msgstr ""
|
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):"
|
msgid "Detect chapters at (XPath expression):"
|
||||||
msgstr ""
|
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):"
|
msgid "Insert page breaks before (XPath expression):"
|
||||||
msgstr ""
|
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
|
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:72
|
||||||
msgid "Invalid regular expression"
|
msgid "Invalid regular expression"
|
||||||
msgstr ""
|
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
|
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:73
|
||||||
msgid "Invalid regular expression: %s"
|
msgid "Invalid regular expression: %s"
|
||||||
msgstr ""
|
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
|
#: /home/kovid/work/calibre/src/calibre/gui2/convert/toc.py:38
|
||||||
msgid "Invalid XPath"
|
msgid "Invalid XPath"
|
||||||
msgstr ""
|
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
|
#: /home/kovid/work/calibre/src/calibre/gui2/convert/toc.py:39
|
||||||
msgid "The XPath expression %s is invalid."
|
msgid "The XPath expression %s is invalid."
|
||||||
msgstr ""
|
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:"
|
msgid "Chapter &mark:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#:
|
#:
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:73
|
#: /home/kovid/work/calibre/src/calibre/gui2/convert/structure_detection_ui.py:69
|
||||||
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
|
|
||||||
msgid "Remove first &image"
|
msgid "Remove first &image"
|
||||||
msgstr ""
|
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"
|
msgid "Insert &metadata as page at start of book"
|
||||||
msgstr ""
|
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:"
|
msgid "&Footer regular expression:"
|
||||||
msgstr ""
|
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"
|
msgid "&Preprocess input file to possibly improve structure detection"
|
||||||
msgstr ""
|
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:"
|
msgid "&Header regular expression:"
|
||||||
msgstr ""
|
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"
|
msgid "Remove F&ooter"
|
||||||
msgstr ""
|
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"
|
msgid "Remove H&eader"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user