mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-01 19:17:02 -04:00 
			
		
		
		
	Fix #636
This commit is contained in:
		
							parent
							
								
									395fcc0ae0
								
							
						
					
					
						commit
						4fe56b1ef2
					
				| @ -10,7 +10,7 @@ msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: ca\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" | ||||
| "Last-Translator: calibre\n" | ||||
| "Language-Team: \n" | ||||
| @ -702,19 +702,19 @@ msgstr "" | ||||
| msgid "No filename specified." | ||||
| 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" | ||||
| 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." | ||||
| 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" | ||||
| 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" | ||||
| 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 "" | ||||
| "Project-Id-Version: es\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" | ||||
| "Last-Translator: calibre\n" | ||||
| "Language-Team: Spanish\n" | ||||
| @ -293,6 +293,7 @@ msgstr "" | ||||
| "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 " | ||||
| "fuents, familia\" ( --serif-family \"%s, Times New Roman\")\n" | ||||
| "    " | ||||
| 
 | ||||
| #: /home/kovid/work/calibre/src/calibre/ebooks/lrf/__init__.py:207 | ||||
| msgid "The serif family of fonts to embed" | ||||
| @ -703,19 +704,19 @@ msgstr "" | ||||
| msgid "No filename specified." | ||||
| 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" | ||||
| 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." | ||||
| 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" | ||||
| 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" | ||||
| msgstr "" | ||||
| 
 | ||||
|  | ||||
| @ -5,7 +5,7 @@ | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "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" | ||||
| "Last-Translator: FixB <fix.bornes@free.fr>\n" | ||||
| "Language-Team: fr\n" | ||||
| @ -705,19 +705,19 @@ msgstr "" | ||||
| msgid "No filename specified." | ||||
| 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" | ||||
| 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." | ||||
| 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" | ||||
| 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" | ||||
| msgstr "" | ||||
| 
 | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,5 +1,6 @@ | ||||
| #! /usr/bin/env python | ||||
| # 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. | ||||
| 
 | ||||
| @ -13,11 +14,7 @@ import os | ||||
| import struct | ||||
| import array | ||||
| 
 | ||||
| __version__ = "1.1" | ||||
| 
 | ||||
| MESSAGES = {} | ||||
| 
 | ||||
| 
 | ||||
| __version__ = "1.2" | ||||
| 
 | ||||
| def usage(code, msg=''): | ||||
|     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." | ||||
|     global MESSAGES | ||||
|     if not fuzzy and str: | ||||
|         MESSAGES[id] = str | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| def generate(): | ||||
| def generate(MESSAGES): | ||||
|     "Return the generated output." | ||||
|     global MESSAGES | ||||
|     keys = MESSAGES.keys() | ||||
|     # the keys are sorted in the .mo file | ||||
|     keys.sort() | ||||
| @ -78,6 +73,7 @@ def generate(): | ||||
| 
 | ||||
| 
 | ||||
| def make(filename, outfile): | ||||
|     MESSAGES = {} | ||||
|     ID = 1 | ||||
|     STR = 2 | ||||
| 
 | ||||
| @ -100,11 +96,12 @@ def make(filename, outfile): | ||||
| 
 | ||||
|     # Parse the catalog | ||||
|     lno = 0 | ||||
|     msgid = msgstr = '' | ||||
|     for l in lines: | ||||
|         lno += 1 | ||||
|         # If we get a comment line after a msgstr, this is a new entry | ||||
|         if l[0] == '#' and section == STR: | ||||
|             add(msgid, msgstr, fuzzy) | ||||
|             add(msgid, msgstr, fuzzy, MESSAGES) | ||||
|             section = None | ||||
|             fuzzy = 0 | ||||
|         # Record a fuzzy mark | ||||
| @ -116,7 +113,7 @@ def make(filename, outfile): | ||||
|         # Now we are in a msgid section, output previous section | ||||
|         if l.startswith('msgid'): | ||||
|             if section == STR: | ||||
|                 add(msgid, msgstr, fuzzy) | ||||
|                 add(msgid, msgstr, fuzzy, MESSAGES) | ||||
|             section = ID | ||||
|             l = l[5:] | ||||
|             msgid = msgstr = '' | ||||
| @ -141,10 +138,10 @@ def make(filename, outfile): | ||||
|             sys.exit(1) | ||||
|     # Add last entry | ||||
|     if section == STR: | ||||
|         add(msgid, msgstr, fuzzy) | ||||
|         add(msgid, msgstr, fuzzy, MESSAGES) | ||||
| 
 | ||||
|     # Compute output | ||||
|     output = generate() | ||||
|     output = generate(MESSAGES) | ||||
| 
 | ||||
|     try: | ||||
|         outfile.write(output) | ||||
| @ -156,5 +153,7 @@ def make(filename, outfile): | ||||
| def main(outfile, args=sys.argv[1:]): | ||||
|     for filename in args: | ||||
|         make(filename, outfile) | ||||
|     return 0 | ||||
| 
 | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
|     sys.exit(main(sys.stdout)) | ||||
|  | ||||
| @ -5,7 +5,7 @@ | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "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" | ||||
| "Last-Translator: Automatically generated\n" | ||||
| "Language-Team: sl\n" | ||||
| @ -640,19 +640,19 @@ msgstr "" | ||||
| msgid "No filename specified." | ||||
| 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" | ||||
| 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." | ||||
| 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" | ||||
| 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" | ||||
| msgstr "" | ||||
| 
 | ||||
|  | ||||
| @ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en' | ||||
| ''' | ||||
| globeandmail.com | ||||
| ''' | ||||
| import re | ||||
| 
 | ||||
| from calibre.web.feeds.news import BasicNewsRecipe | ||||
| from calibre.ebooks.BeautifulSoup import BeautifulSoup | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user