125 @param code message code (string) |
125 @param code message code (string) |
126 @param args arguments for a formatted message (list) |
126 @param args arguments for a formatted message (list) |
127 @return translated and formatted message (string) |
127 @return translated and formatted message (string) |
128 """ |
128 """ |
129 if code in cls.Messages: |
129 if code in cls.Messages: |
130 return code + " " + QCoreApplication.translate("NamingStyleChecker", |
130 return code + " " + QCoreApplication.translate( |
|
131 "NamingStyleChecker", |
131 cls.Messages[code]).format(*args) |
132 cls.Messages[code]).format(*args) |
132 else: |
133 else: |
133 return code + " " + QCoreApplication.translate("NamingStyleChecker", |
134 return code + " " + QCoreApplication.translate( |
|
135 "NamingStyleChecker", |
134 "no message for this code defined") |
136 "no message for this code defined") |
135 |
137 |
136 def __visitTree(self, node): |
138 def __visitTree(self, node): |
137 """ |
139 """ |
138 Private method to scan the given AST tree. |
140 Private method to scan the given AST tree. |