mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #636
This commit is contained in:
parent
395fcc0ae0
commit
4fe56b1ef2
@ -10,7 +10,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: ca\n"
|
"Project-Id-Version: ca\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2008-04-29 17:45+PDT\n"
|
"POT-Creation-Date: 2008-05-02 09:40+PDT\n"
|
||||||
"PO-Revision-Date: 2007-11-16 09:07+0100\n"
|
"PO-Revision-Date: 2007-11-16 09:07+0100\n"
|
||||||
"Last-Translator: calibre\n"
|
"Last-Translator: calibre\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -702,19 +702,19 @@ msgstr ""
|
|||||||
msgid "No filename specified."
|
msgid "No filename specified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:297
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
||||||
msgid "%prog [options] myebook.mobi"
|
msgid "%prog [options] myebook.mobi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:301
|
||||||
msgid "Output directory. Defaults to current directory."
|
msgid "Output directory. Defaults to current directory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:318
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
||||||
msgid "Raw MOBI HTML saved in"
|
msgid "Raw MOBI HTML saved in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:322
|
||||||
msgid "OEB ebook created in"
|
msgid "OEB ebook created in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: es\n"
|
"Project-Id-Version: es\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2008-04-29 17:45+PDT\n"
|
"POT-Creation-Date: 2008-05-02 09:40+PDT\n"
|
||||||
"PO-Revision-Date: 2007-11-16 09:21+0100\n"
|
"PO-Revision-Date: 2007-11-16 09:21+0100\n"
|
||||||
"Last-Translator: calibre\n"
|
"Last-Translator: calibre\n"
|
||||||
"Language-Team: Spanish\n"
|
"Language-Team: Spanish\n"
|
||||||
@ -293,6 +293,7 @@ msgstr ""
|
|||||||
"que añadir fuentes personalizadas relentiza el cambio de página. Para "
|
"que añadir fuentes personalizadas relentiza el cambio de página. Para "
|
||||||
"especificar cada una de las familias se utiliza: \"ruta a la carpeta de "
|
"especificar cada una de las familias se utiliza: \"ruta a la carpeta de "
|
||||||
"fuents, familia\" ( --serif-family \"%s, Times New Roman\")\n"
|
"fuents, familia\" ( --serif-family \"%s, Times New Roman\")\n"
|
||||||
|
" "
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/__init__.py:207
|
#: /home/kovid/work/calibre/src/calibre/ebooks/lrf/__init__.py:207
|
||||||
msgid "The serif family of fonts to embed"
|
msgid "The serif family of fonts to embed"
|
||||||
@ -703,19 +704,19 @@ msgstr ""
|
|||||||
msgid "No filename specified."
|
msgid "No filename specified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:297
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
||||||
msgid "%prog [options] myebook.mobi"
|
msgid "%prog [options] myebook.mobi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:301
|
||||||
msgid "Output directory. Defaults to current directory."
|
msgid "Output directory. Defaults to current directory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:318
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
||||||
msgid "Raw MOBI HTML saved in"
|
msgid "Raw MOBI HTML saved in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:322
|
||||||
msgid "OEB ebook created in"
|
msgid "OEB ebook created in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: calibre 0.4.22\n"
|
"Project-Id-Version: calibre 0.4.22\n"
|
||||||
"POT-Creation-Date: 2008-04-29 17:45+PDT\n"
|
"POT-Creation-Date: 2008-05-02 09:40+PDT\n"
|
||||||
"PO-Revision-Date: 2008-01-20 09:59+0100\n"
|
"PO-Revision-Date: 2008-01-20 09:59+0100\n"
|
||||||
"Last-Translator: FixB <fix.bornes@free.fr>\n"
|
"Last-Translator: FixB <fix.bornes@free.fr>\n"
|
||||||
"Language-Team: fr\n"
|
"Language-Team: fr\n"
|
||||||
@ -705,19 +705,19 @@ msgstr ""
|
|||||||
msgid "No filename specified."
|
msgid "No filename specified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:297
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
||||||
msgid "%prog [options] myebook.mobi"
|
msgid "%prog [options] myebook.mobi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:301
|
||||||
msgid "Output directory. Defaults to current directory."
|
msgid "Output directory. Defaults to current directory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:318
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
||||||
msgid "Raw MOBI HTML saved in"
|
msgid "Raw MOBI HTML saved in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:322
|
||||||
msgid "OEB ebook created in"
|
msgid "OEB ebook created in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# Written by Martin v. Loewis <loewis@informatik.hu-berlin.de>
|
# Written by Martin v. Loewis <loewis@informatik.hu-berlin.de>
|
||||||
|
# Modified by Kovid Goyal <kovid@kovidgoyal.net>
|
||||||
|
|
||||||
"""Generate binary message catalog from textual translation description.
|
"""Generate binary message catalog from textual translation description.
|
||||||
|
|
||||||
@ -13,11 +14,7 @@ import os
|
|||||||
import struct
|
import struct
|
||||||
import array
|
import array
|
||||||
|
|
||||||
__version__ = "1.1"
|
__version__ = "1.2"
|
||||||
|
|
||||||
MESSAGES = {}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def usage(code, msg=''):
|
def usage(code, msg=''):
|
||||||
print >> sys.stderr, __doc__
|
print >> sys.stderr, __doc__
|
||||||
@ -27,17 +24,15 @@ def usage(code, msg=''):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def add(id, str, fuzzy):
|
def add(id, str, fuzzy, MESSAGES):
|
||||||
"Add a non-fuzzy translation to the dictionary."
|
"Add a non-fuzzy translation to the dictionary."
|
||||||
global MESSAGES
|
|
||||||
if not fuzzy and str:
|
if not fuzzy and str:
|
||||||
MESSAGES[id] = str
|
MESSAGES[id] = str
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def generate():
|
def generate(MESSAGES):
|
||||||
"Return the generated output."
|
"Return the generated output."
|
||||||
global MESSAGES
|
|
||||||
keys = MESSAGES.keys()
|
keys = MESSAGES.keys()
|
||||||
# the keys are sorted in the .mo file
|
# the keys are sorted in the .mo file
|
||||||
keys.sort()
|
keys.sort()
|
||||||
@ -78,6 +73,7 @@ def generate():
|
|||||||
|
|
||||||
|
|
||||||
def make(filename, outfile):
|
def make(filename, outfile):
|
||||||
|
MESSAGES = {}
|
||||||
ID = 1
|
ID = 1
|
||||||
STR = 2
|
STR = 2
|
||||||
|
|
||||||
@ -100,11 +96,12 @@ def make(filename, outfile):
|
|||||||
|
|
||||||
# Parse the catalog
|
# Parse the catalog
|
||||||
lno = 0
|
lno = 0
|
||||||
|
msgid = msgstr = ''
|
||||||
for l in lines:
|
for l in lines:
|
||||||
lno += 1
|
lno += 1
|
||||||
# If we get a comment line after a msgstr, this is a new entry
|
# If we get a comment line after a msgstr, this is a new entry
|
||||||
if l[0] == '#' and section == STR:
|
if l[0] == '#' and section == STR:
|
||||||
add(msgid, msgstr, fuzzy)
|
add(msgid, msgstr, fuzzy, MESSAGES)
|
||||||
section = None
|
section = None
|
||||||
fuzzy = 0
|
fuzzy = 0
|
||||||
# Record a fuzzy mark
|
# Record a fuzzy mark
|
||||||
@ -116,7 +113,7 @@ def make(filename, outfile):
|
|||||||
# Now we are in a msgid section, output previous section
|
# Now we are in a msgid section, output previous section
|
||||||
if l.startswith('msgid'):
|
if l.startswith('msgid'):
|
||||||
if section == STR:
|
if section == STR:
|
||||||
add(msgid, msgstr, fuzzy)
|
add(msgid, msgstr, fuzzy, MESSAGES)
|
||||||
section = ID
|
section = ID
|
||||||
l = l[5:]
|
l = l[5:]
|
||||||
msgid = msgstr = ''
|
msgid = msgstr = ''
|
||||||
@ -141,10 +138,10 @@ def make(filename, outfile):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# Add last entry
|
# Add last entry
|
||||||
if section == STR:
|
if section == STR:
|
||||||
add(msgid, msgstr, fuzzy)
|
add(msgid, msgstr, fuzzy, MESSAGES)
|
||||||
|
|
||||||
# Compute output
|
# Compute output
|
||||||
output = generate()
|
output = generate(MESSAGES)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
outfile.write(output)
|
outfile.write(output)
|
||||||
@ -156,5 +153,7 @@ def make(filename, outfile):
|
|||||||
def main(outfile, args=sys.argv[1:]):
|
def main(outfile, args=sys.argv[1:]):
|
||||||
for filename in args:
|
for filename in args:
|
||||||
make(filename, outfile)
|
make(filename, outfile)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main(sys.stdout))
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: calibre 0.4.17\n"
|
"Project-Id-Version: calibre 0.4.17\n"
|
||||||
"POT-Creation-Date: 2008-04-29 17:45+PDT\n"
|
"POT-Creation-Date: 2008-05-02 09:40+PDT\n"
|
||||||
"PO-Revision-Date: 2007-11-08 14:39+PST\n"
|
"PO-Revision-Date: 2007-11-08 14:39+PST\n"
|
||||||
"Last-Translator: Automatically generated\n"
|
"Last-Translator: Automatically generated\n"
|
||||||
"Language-Team: sl\n"
|
"Language-Team: sl\n"
|
||||||
@ -640,19 +640,19 @@ msgstr ""
|
|||||||
msgid "No filename specified."
|
msgid "No filename specified."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:297
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
||||||
msgid "%prog [options] myebook.mobi"
|
msgid "%prog [options] myebook.mobi"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:299
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:301
|
||||||
msgid "Output directory. Defaults to current directory."
|
msgid "Output directory. Defaults to current directory."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:318
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
||||||
msgid "Raw MOBI HTML saved in"
|
msgid "Raw MOBI HTML saved in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:320
|
#: /home/kovid/work/calibre/src/calibre/ebooks/mobi/reader.py:322
|
||||||
msgid "OEB ebook created in"
|
msgid "OEB ebook created in"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
'''
|
'''
|
||||||
globeandmail.com
|
globeandmail.com
|
||||||
'''
|
'''
|
||||||
import re
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user