eric6/Plugins/CheckerPlugins/CodeStyleChecker/translations.py

changeset 7609
d5aff4fd0ef8
parent 7360
9190402e4505
child 7610
df7025fe26a3
--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/translations.py	Sun May 31 17:23:49 2020 +0200
+++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/translations.py	Thu Jun 04 17:57:20 2020 +0200
@@ -854,151 +854,152 @@
     ##################################################################
     ## CodeStyleFixer messages
     ##################################################################
-    "FD111": QCoreApplication.translate(
+    
+    "FIXD111": QCoreApplication.translate(
         'CodeStyleFixer',
         "Triple single quotes converted to triple double quotes."),
-    'FD112': QCoreApplication.translate(
+    'FIXD112': QCoreApplication.translate(
         'CodeStyleFixer',
         'Introductory quotes corrected to be {0}"""'),
-    "FD121": QCoreApplication.translate(
+    "FIXD121": QCoreApplication.translate(
         'CodeStyleFixer',
         "Single line docstring put on one line."),
-    "FD131": QCoreApplication.translate(
+    "FIXD131": QCoreApplication.translate(
         'CodeStyleFixer',
         "Period added to summary line."),
-    "FD141": QCoreApplication.translate(
+    "FIXD141": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line before function/method docstring removed."),
-    "FD142": QCoreApplication.translate(
+    "FIXD142": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line inserted before class docstring."),
-    "FD143": QCoreApplication.translate(
+    "FIXD143": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line inserted after class docstring."),
-    "FD144": QCoreApplication.translate(
+    "FIXD144": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line inserted after docstring summary."),
-    "FD145": QCoreApplication.translate(
+    "FIXD145": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line inserted after last paragraph of docstring."),
-    "FD221": QCoreApplication.translate(
+    "FIXD221": QCoreApplication.translate(
         'CodeStyleFixer',
         "Leading quotes put on separate line."),
-    "FD222": QCoreApplication.translate(
+    "FIXD222": QCoreApplication.translate(
         'CodeStyleFixer',
         "Trailing quotes put on separate line."),
-    "FD242": QCoreApplication.translate(
+    "FIXD242": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line before class docstring removed."),
-    "FD244": QCoreApplication.translate(
+    "FIXD244": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line before function/method docstring removed."),
-    "FD243": QCoreApplication.translate(
+    "FIXD243": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line after class docstring removed."),
-    "FD245": QCoreApplication.translate(
+    "FIXD245": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line after function/method docstring removed."),
-    "FD247": QCoreApplication.translate(
+    "FIXD247": QCoreApplication.translate(
         'CodeStyleFixer',
         "Blank line after last paragraph removed."),
-    "FE101": QCoreApplication.translate(
+    "FIXE101": QCoreApplication.translate(
         'CodeStyleFixer',
         "Tab converted to 4 spaces."),
-    "FE111": QCoreApplication.translate(
+    "FIXE111": QCoreApplication.translate(
         'CodeStyleFixer',
         "Indentation adjusted to be a multiple of four."),
-    "FE121": QCoreApplication.translate(
+    "FIXE121": QCoreApplication.translate(
         'CodeStyleFixer',
         "Indentation of continuation line corrected."),
-    "FE124": QCoreApplication.translate(
+    "FIXE124": QCoreApplication.translate(
         'CodeStyleFixer',
         "Indentation of closing bracket corrected."),
-    "FE122": QCoreApplication.translate(
+    "FIXE122": QCoreApplication.translate(
         'CodeStyleFixer',
         "Missing indentation of continuation line corrected."),
-    "FE123": QCoreApplication.translate(
+    "FIXE123": QCoreApplication.translate(
         'CodeStyleFixer',
         "Closing bracket aligned to opening bracket."),
-    "FE125": QCoreApplication.translate(
+    "FIXE125": QCoreApplication.translate(
         'CodeStyleFixer',
         "Indentation level changed."),
-    "FE126": QCoreApplication.translate(
+    "FIXE126": QCoreApplication.translate(
         'CodeStyleFixer',
         "Indentation level of hanging indentation changed."),
-    "FE127": QCoreApplication.translate(
+    "FIXE127": QCoreApplication.translate(
         'CodeStyleFixer',
         "Visual indentation corrected."),
-    "FE201": QCoreApplication.translate(
+    "FIXE201": QCoreApplication.translate(
         'CodeStyleFixer',
         "Extraneous whitespace removed."),
-    "FE225": QCoreApplication.translate(
+    "FIXE225": QCoreApplication.translate(
         'CodeStyleFixer',
         "Missing whitespace added."),
-    "FE221": QCoreApplication.translate(
+    "FIXE221": QCoreApplication.translate(
         'CodeStyleFixer',
         "Extraneous whitespace removed."),
-    "FE231": QCoreApplication.translate(
+    "FIXE231": QCoreApplication.translate(
         'CodeStyleFixer',
         "Missing whitespace added."),
-    "FE251": QCoreApplication.translate(
+    "FIXE251": QCoreApplication.translate(
         'CodeStyleFixer',
         "Extraneous whitespace removed."),
-    "FE261": QCoreApplication.translate(
+    "FIXE261": QCoreApplication.translate(
         'CodeStyleFixer',
         "Whitespace around comment sign corrected."),
     
-    "FE302+": lambda n=1: translate(
+    "FIXE302+": lambda n=1: translate(
         'CodeStyleFixer',
         "%n blank line(s) inserted.", '', n),
-    "FE302-": lambda n=1: translate(
+    "FIXE302-": lambda n=1: translate(
         'CodeStyleFixer',
         "%n superfluous lines removed", '', n),
     
-    "FE303": QCoreApplication.translate(
+    "FIXE303": QCoreApplication.translate(
         'CodeStyleFixer',
         "Superfluous blank lines removed."),
-    "FE304": QCoreApplication.translate(
+    "FIXE304": QCoreApplication.translate(
         'CodeStyleFixer',
         "Superfluous blank lines after function decorator removed."),
-    "FE401": QCoreApplication.translate(
+    "FIXE401": QCoreApplication.translate(
         'CodeStyleFixer',
         "Imports were put on separate lines."),
-    "FE501": QCoreApplication.translate(
+    "FIXE501": QCoreApplication.translate(
         'CodeStyleFixer',
         "Long lines have been shortened."),
-    "FE502": QCoreApplication.translate(
+    "FIXE502": QCoreApplication.translate(
         'CodeStyleFixer',
         "Redundant backslash in brackets removed."),
-    "FE701": QCoreApplication.translate(
+    "FIXE701": QCoreApplication.translate(
         'CodeStyleFixer',
         "Compound statement corrected."),
-    "FE702": QCoreApplication.translate(
+    "FIXE702": QCoreApplication.translate(
         'CodeStyleFixer',
         "Compound statement corrected."),
-    "FE711": QCoreApplication.translate(
+    "FIXE711": QCoreApplication.translate(
         'CodeStyleFixer',
         "Comparison to None/True/False corrected."),
-    "FN804": QCoreApplication.translate(
+    "FIXN804": QCoreApplication.translate(
         'CodeStyleFixer',
         "'{0}' argument added."),
-    "FN806": QCoreApplication.translate(
+    "FIXN806": QCoreApplication.translate(
         'CodeStyleFixer',
         "'{0}' argument removed."),
-    "FW291": QCoreApplication.translate(
+    "FIXW291": QCoreApplication.translate(
         'CodeStyleFixer',
         "Whitespace stripped from end of line."),
-    "FW292": QCoreApplication.translate(
+    "FIXW292": QCoreApplication.translate(
         'CodeStyleFixer',
         "newline added to end of file."),
-    "FW391": QCoreApplication.translate(
+    "FIXW391": QCoreApplication.translate(
         'CodeStyleFixer',
         "Superfluous trailing blank lines removed from end of file."),
-    "FW603": QCoreApplication.translate(
+    "FIXW603": QCoreApplication.translate(
         'CodeStyleFixer',
         "'<>' replaced by '!='."),
         
-    "FWRITE_ERROR": QCoreApplication.translate(
+    "FIXWRITE_ERROR": QCoreApplication.translate(
         'CodeStyleFixer',
         "Could not save the file! Skipping it. Reason: {0}"),
 }
@@ -1073,17 +1074,19 @@
     "A891": [5, 3],
     "A999": ["SyntaxError", "Invalid Syntax"],
     
-    "FWRITE_ERROR": ["IOError"],
+    "FIXWRITE_ERROR": ["IOError"],
 }
 
 
 def getTranslatedMessage(message):
     """
     Module function to get a translated and formatted message for a
-    given pyflakes message ID.
+    given message ID.
     
-    @param message the message ID (string)
-    @return translated and formatted message (string)
+    @param message the message ID
+    @type str
+    @return translated and formatted message
+    @rtype str
     """
     if isinstance(message, list):
         message, args = message
@@ -1095,7 +1098,7 @@
             # Retranslate with correct plural form
             return _messages[message](args)
         else:
-            if message.startswith(('FD', 'FE', 'FN', 'FW')):
+            if message.startswith(('FIXD', 'FIXE', 'FIXN', 'FIXW')):
                 prefix = ''
             else:
                 prefix = message + ' '

eric ide

mercurial