mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Updated translatable strings
This commit is contained in:
parent
a52242cecb
commit
c3e5c50f98
@ -20,8 +20,8 @@ class PDBOutput(OutputFormatPlugin):
|
|||||||
OptionRecommendation(name='format', recommended_value='doc',
|
OptionRecommendation(name='format', recommended_value='doc',
|
||||||
level=OptionRecommendation.LOW,
|
level=OptionRecommendation.LOW,
|
||||||
short_switch='f', choices=FORMAT_WRITERS.keys(),
|
short_switch='f', choices=FORMAT_WRITERS.keys(),
|
||||||
help=_('Format to use inside the pdb container. Choices are: '
|
help=(_('Format to use inside the pdb container. Choices are:')+\
|
||||||
'%s' % FORMAT_WRITERS.keys())),
|
' %s' % FORMAT_WRITERS.keys())),
|
||||||
])
|
])
|
||||||
|
|
||||||
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
||||||
|
@ -14,7 +14,6 @@ import string, sys
|
|||||||
from calibre.utils.config import OptionParser
|
from calibre.utils.config import OptionParser
|
||||||
from calibre.utils.logging import Log
|
from calibre.utils.logging import Log
|
||||||
from calibre.constants import preferred_encoding
|
from calibre.constants import preferred_encoding
|
||||||
from calibre.customize.conversion import OptionRecommendation
|
|
||||||
from calibre.ebooks.pdf.manipulate import crop, decrypt, encrypt, \
|
from calibre.ebooks.pdf.manipulate import crop, decrypt, encrypt, \
|
||||||
info, merge, reverse, rotate, split
|
info, merge, reverse, rotate, split
|
||||||
|
|
||||||
@ -37,7 +36,7 @@ command can be one of the following:
|
|||||||
Use %prog command --help to get more information about a specific command
|
Use %prog command --help to get more information about a specific command
|
||||||
|
|
||||||
Manipulate a PDF.
|
Manipulate a PDF.
|
||||||
'''.replace('%%commands', string.join(sorted(COMMANDS.keys()), ', ')))
|
''').replace('%%commands', string.join(sorted(COMMANDS.keys()), ', '))
|
||||||
|
|
||||||
def print_help(parser, log):
|
def print_help(parser, log):
|
||||||
help = parser.format_help().encode(preferred_encoding, 'replace')
|
help = parser.format_help().encode(preferred_encoding, 'replace')
|
||||||
|
@ -10,7 +10,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
Crop a pdf file
|
Crop a pdf file
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os, sys, re
|
import sys, re
|
||||||
from optparse import OptionGroup, Option
|
from optparse import OptionGroup, Option
|
||||||
|
|
||||||
from calibre.ebooks.metadata.meta import metadata_from_formats
|
from calibre.ebooks.metadata.meta import metadata_from_formats
|
||||||
@ -37,16 +37,16 @@ OPTIONS = set([
|
|||||||
help=_('Path to output file. By default a file is created in the current directory.')),
|
help=_('Path to output file. By default a file is created in the current directory.')),
|
||||||
OptionRecommendation(name='bottom_left_x', recommended_value=DEFAULT_CROP,
|
OptionRecommendation(name='bottom_left_x', recommended_value=DEFAULT_CROP,
|
||||||
level=OptionRecommendation.LOW, long_switch='leftx', short_switch='x',
|
level=OptionRecommendation.LOW, long_switch='leftx', short_switch='x',
|
||||||
help=_('Number of pixels to crop from the left most x (default is %s) ' % DEFAULT_CROP)),
|
help=_('Number of pixels to crop from the left most x (default is %s)') % DEFAULT_CROP),
|
||||||
OptionRecommendation(name='bottom_left_y', recommended_value=DEFAULT_CROP,
|
OptionRecommendation(name='bottom_left_y', recommended_value=DEFAULT_CROP,
|
||||||
level=OptionRecommendation.LOW, long_switch='lefty', short_switch='y',
|
level=OptionRecommendation.LOW, long_switch='lefty', short_switch='y',
|
||||||
help=_('Number of pixels to crop from the left most y (default is %s) ' % DEFAULT_CROP)),
|
help=_('Number of pixels to crop from the left most y (default is %s)') % DEFAULT_CROP),
|
||||||
OptionRecommendation(name='top_right_x', recommended_value=DEFAULT_CROP,
|
OptionRecommendation(name='top_right_x', recommended_value=DEFAULT_CROP,
|
||||||
level=OptionRecommendation.LOW, long_switch='rightx', short_switch='v',
|
level=OptionRecommendation.LOW, long_switch='rightx', short_switch='v',
|
||||||
help=_('Number of pixels to crop from the right most x (default is %s) ' % DEFAULT_CROP)),
|
help=_('Number of pixels to crop from the right most x (default is %s)') % DEFAULT_CROP),
|
||||||
OptionRecommendation(name='top_right_y', recommended_value=DEFAULT_CROP,
|
OptionRecommendation(name='top_right_y', recommended_value=DEFAULT_CROP,
|
||||||
level=OptionRecommendation.LOW, long_switch='right y', short_switch='w',
|
level=OptionRecommendation.LOW, long_switch='right y', short_switch='w',
|
||||||
help=_('Number of pixels to crop from the right most y (default is %s)' % DEFAULT_CROP)),
|
help=_('Number of pixels to crop from the right most y (default is %s)') % DEFAULT_CROP),
|
||||||
OptionRecommendation(name='bounding', recommended_value=None,
|
OptionRecommendation(name='bounding', recommended_value=None,
|
||||||
level=OptionRecommendation.LOW, long_switch='bounding', short_switch='b',
|
level=OptionRecommendation.LOW, long_switch='bounding', short_switch='b',
|
||||||
help=_('A file generated by ghostscript which allows each page to be individually cropped `gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox file.pdf 2> bounding`')),
|
help=_('A file generated by ghostscript which allows each page to be individually cropped `gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox file.pdf 2> bounding`')),
|
||||||
|
@ -32,12 +32,12 @@ class PDFOutput(OutputFormatPlugin):
|
|||||||
level=OptionRecommendation.LOW, short_switch='u', choices=UNITS.keys(),
|
level=OptionRecommendation.LOW, short_switch='u', choices=UNITS.keys(),
|
||||||
help=_('The unit of measure. Default is inch. Choices '
|
help=_('The unit of measure. Default is inch. Choices '
|
||||||
'are %s '
|
'are %s '
|
||||||
'Note: This does not override the unit for margins!' % UNITS.keys())),
|
'Note: This does not override the unit for margins!') % UNITS.keys()),
|
||||||
OptionRecommendation(name='paper_size', recommended_value='letter',
|
OptionRecommendation(name='paper_size', recommended_value='letter',
|
||||||
level=OptionRecommendation.LOW, choices=PAPER_SIZES.keys(),
|
level=OptionRecommendation.LOW, choices=PAPER_SIZES.keys(),
|
||||||
help=_('The size of the paper. This size will be overridden when an '
|
help=_('The size of the paper. This size will be overridden when an '
|
||||||
'output profile is used. Default is letter. Choices '
|
'output profile is used. Default is letter. Choices '
|
||||||
'are %s' % PAPER_SIZES.keys())),
|
'are %s') % PAPER_SIZES.keys()),
|
||||||
OptionRecommendation(name='custom_size', recommended_value=None,
|
OptionRecommendation(name='custom_size', recommended_value=None,
|
||||||
help=_('Custom size of the document. Use the form widthxheight '
|
help=_('Custom size of the document. Use the form widthxheight '
|
||||||
'EG. `123x321` to specify the width and height. '
|
'EG. `123x321` to specify the width and height. '
|
||||||
@ -45,7 +45,7 @@ class PDFOutput(OutputFormatPlugin):
|
|||||||
OptionRecommendation(name='orientation', recommended_value='portrait',
|
OptionRecommendation(name='orientation', recommended_value='portrait',
|
||||||
level=OptionRecommendation.LOW, choices=ORIENTATIONS.keys(),
|
level=OptionRecommendation.LOW, choices=ORIENTATIONS.keys(),
|
||||||
help=_('The orientation of the page. Default is portrait. Choices '
|
help=_('The orientation of the page. Default is portrait. Choices '
|
||||||
'are %s' % ORIENTATIONS.keys())),
|
'are %s') % ORIENTATIONS.keys()),
|
||||||
])
|
])
|
||||||
|
|
||||||
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
||||||
|
@ -23,7 +23,7 @@ class TXTOutput(OutputFormatPlugin):
|
|||||||
help=_('Type of newline to use. Options are %s. Default is \'system\'. '
|
help=_('Type of newline to use. Options are %s. Default is \'system\'. '
|
||||||
'Use \'old_mac\' for compatibility with Mac OS 9 and earlier. '
|
'Use \'old_mac\' for compatibility with Mac OS 9 and earlier. '
|
||||||
'For Mac OS X use \'unix\'. \'system\' will default to the newline '
|
'For Mac OS X use \'unix\'. \'system\' will default to the newline '
|
||||||
'type used by this OS.' % sorted(TxtNewlines.NEWLINE_TYPES.keys()))),
|
'type used by this OS.') % sorted(TxtNewlines.NEWLINE_TYPES.keys())),
|
||||||
])
|
])
|
||||||
|
|
||||||
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
||||||
|
@ -68,7 +68,8 @@ def convert_single_ebook(parent, db, book_ids, auto_conversion=False, out_format
|
|||||||
|
|
||||||
msg = '%s' % '\n'.join(res)
|
msg = '%s' % '\n'.join(res)
|
||||||
warning_dialog(parent, _('Could not convert some books'),
|
warning_dialog(parent, _('Could not convert some books'),
|
||||||
_('Could not convert %d of %d books, because no suitable source format was found.' % (len(res), total)),
|
_('Could not convert %d of %d books, because no suitable source'
|
||||||
|
' format was found.') % (len(res), total),
|
||||||
msg).exec_()
|
msg).exec_()
|
||||||
|
|
||||||
return jobs, changed, bad
|
return jobs, changed, bad
|
||||||
@ -122,7 +123,8 @@ def convert_bulk_ebook(parent, db, book_ids, out_format=None):
|
|||||||
|
|
||||||
msg = '%s' % '\n'.join(res)
|
msg = '%s' % '\n'.join(res)
|
||||||
warning_dialog(parent, _('Could not convert some books'),
|
warning_dialog(parent, _('Could not convert some books'),
|
||||||
_('Could not convert %d of %d books, because no suitable source format was found.' % (len(res), total)),
|
_('Could not convert %d of %d books, because no suitable '
|
||||||
|
'source format was found.') % (len(res), total),
|
||||||
msg).exec_()
|
msg).exec_()
|
||||||
|
|
||||||
return jobs, changed, bad
|
return jobs, changed, bad
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user