Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3058
0a02c433f52d
--- a/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py	Fri Oct 18 23:00:41 2013 +0200
@@ -22,9 +22,12 @@
     """
     Module function to get information for the given XBEL source id.
     
+    @param id id of the browser ("chrome" or "chromium")
     @return tuple with an icon (QPixmap), readable name (string), name of
         the default bookmarks file (string), an info text (string),
-        a prompt (string) and the default directory of the bookmarks file (string)
+        a prompt (string) and the default directory of the bookmarks file
+        (string)
+    @exception ValueError raised to indicate an invalid browser ID
     """
     if id == "e5browser":
         from ..BookmarksManager import BookmarksManager
@@ -33,9 +36,10 @@
             UI.PixmapCache.getPixmap("ericWeb48.png"),
             "eric5 Web Browser",
             os.path.basename(bookmarksFile),
-            QCoreApplication.translate("XbelImporter",
-                """eric5 Web Browser stores its bookmarks in the <b>{0}</b> XML file. """
-                """This file is usually located in"""
+            QCoreApplication.translate(
+                "XbelImporter",
+                """eric5 Web Browser stores its bookmarks in the"""
+                """ <b>{0}</b> XML file. This file is usually located in"""
             ).format(os.path.basename(bookmarksFile)),
             QCoreApplication.translate("XbelImporter",
                 """Please choose the file to begin importing bookmarks."""),
@@ -52,9 +56,11 @@
             UI.PixmapCache.getPixmap("konqueror.png"),
             "Konqueror",
             "bookmarks.xml",
-            QCoreApplication.translate("XbelImporter",
-                """Konqueror stores its bookmarks in the <b>bookmarks.xml</b> XML """
-                """file. This file is usually located in"""),
+            QCoreApplication.translate(
+                "XbelImporter",
+                """Konqueror stores its bookmarks in the"""
+                """ <b>bookmarks.xml</b> XML file. This file is usually"""
+                """ located in"""),
             QCoreApplication.translate("XbelImporter",
                 """Please choose the file to begin importing bookmarks."""),
             standardDir,
@@ -63,12 +69,15 @@
         return (
             UI.PixmapCache.getPixmap("xbel.png"),
             "XBEL Bookmarks",
-            QCoreApplication.translate("XbelImporter", "XBEL Bookmarks") + \
-                " (*.xbel *.xml)",
-            QCoreApplication.translate("XbelImporter",
-                """You can import bookmarks from any browser that supports XBEL """
-                """exporting. This file has usually the extension .xbel or .xml."""),
-            QCoreApplication.translate("XbelImporter",
+            QCoreApplication.translate(
+                "XbelImporter", "XBEL Bookmarks") + " (*.xbel *.xml)",
+            QCoreApplication.translate(
+                "XbelImporter",
+                """You can import bookmarks from any browser that supports"""
+                """ XBEL exporting. This file has usually the extension"""
+                """ .xbel or .xml."""),
+            QCoreApplication.translate(
+                "XbelImporter",
                 """Please choose the file to begin importing bookmarks."""),
             "",
         )
@@ -126,7 +135,8 @@
         if reader.error() != QXmlStreamReader.NoError:
             self._error = True
             self._errorString = self.trUtf8(
-                """Error when importing bookmarks on line {0}, column {1}:\n{2}""")\
+                """Error when importing bookmarks on line {0},"""
+                """ column {1}:\n{2}""")\
                 .format(reader.lineNumber(),
                         reader.columnNumber(),
                         reader.errorString())

eric ide

mercurial