Helpviewer/Bookmarks/BookmarksImporters/HtmlImporter.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
20 20
21 def getImporterInfo(id): 21 def getImporterInfo(id):
22 """ 22 """
23 Module function to get information for the given HTML source id. 23 Module function to get information for the given HTML source id.
24 24
25 @param id id of the browser ("chrome" or "chromium")
25 @return tuple with an icon (QPixmap), readable name (string), name of 26 @return tuple with an icon (QPixmap), readable name (string), name of
26 the default bookmarks file (string), an info text (string), 27 the default bookmarks file (string), an info text (string),
27 a prompt (string) and the default directory of the bookmarks file (string) 28 a prompt (string) and the default directory of the bookmarks file
29 (string)
30 @exception ValueError raised to indicate an invalid browser ID
28 """ 31 """
29 if id == "html": 32 if id == "html":
30 return ( 33 return (
31 UI.PixmapCache.getPixmap("html.png"), 34 UI.PixmapCache.getPixmap("html.png"),
32 "HTML Netscape Bookmarks", 35 "HTML Netscape Bookmarks",
33 QCoreApplication.translate("HtmlImporter", 36 QCoreApplication.translate(
37 "HtmlImporter",
34 "HTML Netscape Bookmarks") + " (*.htm *.html)", 38 "HTML Netscape Bookmarks") + " (*.htm *.html)",
35 QCoreApplication.translate("HtmlImporter", 39 QCoreApplication.translate(
36 """You can import bookmarks from any browser that supports HTML """ 40 "HtmlImporter",
37 """exporting. This file has usually the extension .htm or .html."""), 41 """You can import bookmarks from any browser that supports"""
38 QCoreApplication.translate("HtmlImporter", 42 """ HTML exporting. This file has usually the extension"""
43 """ .htm or .html."""),
44 QCoreApplication.translate(
45 "HtmlImporter",
39 """Please choose the file to begin importing bookmarks."""), 46 """Please choose the file to begin importing bookmarks."""),
40 "", 47 "",
41 ) 48 )
42 else: 49 else:
43 raise ValueError("Unsupported browser ID given ({0}).".format(id)) 50 raise ValueError("Unsupported browser ID given ({0}).".format(id))

eric ide

mercurial