src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/DocStyle/translations.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9576
be9f8e7e42e0
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
11 11
12 from PyQt6.QtCore import QCoreApplication 12 from PyQt6.QtCore import QCoreApplication
13 13
14 _docStyleMessages = { 14 _docStyleMessages = {
15 "D101": QCoreApplication.translate( 15 "D101": QCoreApplication.translate(
16 "DocStyleChecker", "module is missing a docstring"), 16 "DocStyleChecker", "module is missing a docstring"
17 ),
17 "D102": QCoreApplication.translate( 18 "D102": QCoreApplication.translate(
18 "DocStyleChecker", 19 "DocStyleChecker", "public function/method is missing a docstring"
19 "public function/method is missing a docstring"), 20 ),
20 "D103": QCoreApplication.translate( 21 "D103": QCoreApplication.translate(
21 "DocStyleChecker", 22 "DocStyleChecker", "private function/method may be missing a docstring"
22 "private function/method may be missing a docstring"), 23 ),
23 "D104": QCoreApplication.translate( 24 "D104": QCoreApplication.translate(
24 "DocStyleChecker", "public class is missing a docstring"), 25 "DocStyleChecker", "public class is missing a docstring"
26 ),
25 "D105": QCoreApplication.translate( 27 "D105": QCoreApplication.translate(
26 "DocStyleChecker", "private class may be missing a docstring"), 28 "DocStyleChecker", "private class may be missing a docstring"
29 ),
27 "D111": QCoreApplication.translate( 30 "D111": QCoreApplication.translate(
28 "DocStyleChecker", 'docstring not surrounded by """'), 31 "DocStyleChecker", 'docstring not surrounded by """'
32 ),
29 "D112": QCoreApplication.translate( 33 "D112": QCoreApplication.translate(
30 "DocStyleChecker", 34 "DocStyleChecker", 'docstring containing \\ not surrounded by r"""'
31 'docstring containing \\ not surrounded by r"""'), 35 ),
32 "D121": QCoreApplication.translate( 36 "D121": QCoreApplication.translate(
33 "DocStyleChecker", "one-liner docstring on multiple lines"), 37 "DocStyleChecker", "one-liner docstring on multiple lines"
38 ),
34 "D122": QCoreApplication.translate( 39 "D122": QCoreApplication.translate(
35 "DocStyleChecker", "docstring has wrong indentation"), 40 "DocStyleChecker", "docstring has wrong indentation"
41 ),
36 "D130": QCoreApplication.translate( 42 "D130": QCoreApplication.translate(
37 "DocStyleChecker", "docstring does not contain a summary"), 43 "DocStyleChecker", "docstring does not contain a summary"
44 ),
38 "D131": QCoreApplication.translate( 45 "D131": QCoreApplication.translate(
39 "DocStyleChecker", "docstring summary does not end with a period"), 46 "DocStyleChecker", "docstring summary does not end with a period"
47 ),
40 "D132": QCoreApplication.translate( 48 "D132": QCoreApplication.translate(
41 "DocStyleChecker", 49 "DocStyleChecker",
42 "docstring summary is not in imperative mood" 50 "docstring summary is not in imperative mood" " (Does instead of Do)",
43 " (Does instead of Do)"), 51 ),
44 "D133": QCoreApplication.translate( 52 "D133": QCoreApplication.translate(
45 "DocStyleChecker", 53 "DocStyleChecker",
46 "docstring summary looks like a function's/method's signature"), 54 "docstring summary looks like a function's/method's signature",
55 ),
47 "D134": QCoreApplication.translate( 56 "D134": QCoreApplication.translate(
48 "DocStyleChecker", 57 "DocStyleChecker", "docstring does not mention the return value type"
49 "docstring does not mention the return value type"), 58 ),
50 "D141": QCoreApplication.translate( 59 "D141": QCoreApplication.translate(
51 "DocStyleChecker", 60 "DocStyleChecker", "function/method docstring is separated by a blank line"
52 "function/method docstring is separated by a blank line"), 61 ),
53 "D142": QCoreApplication.translate( 62 "D142": QCoreApplication.translate(
54 "DocStyleChecker", 63 "DocStyleChecker", "class docstring is not preceded by a blank line"
55 "class docstring is not preceded by a blank line"), 64 ),
56 "D143": QCoreApplication.translate( 65 "D143": QCoreApplication.translate(
57 "DocStyleChecker", 66 "DocStyleChecker", "class docstring is not followed by a blank line"
58 "class docstring is not followed by a blank line"), 67 ),
59 "D144": QCoreApplication.translate( 68 "D144": QCoreApplication.translate(
60 "DocStyleChecker", 69 "DocStyleChecker", "docstring summary is not followed by a blank line"
61 "docstring summary is not followed by a blank line"), 70 ),
62 "D145": QCoreApplication.translate( 71 "D145": QCoreApplication.translate(
63 "DocStyleChecker", 72 "DocStyleChecker", "last paragraph of docstring is not followed by a blank line"
64 "last paragraph of docstring is not followed by a blank line"), 73 ),
65
66 "D201": QCoreApplication.translate( 74 "D201": QCoreApplication.translate(
67 "DocStyleChecker", "module docstring is still a default string"), 75 "DocStyleChecker", "module docstring is still a default string"
76 ),
68 "D202.1": QCoreApplication.translate( 77 "D202.1": QCoreApplication.translate(
69 "DocStyleChecker", "function docstring is still a default string"), 78 "DocStyleChecker", "function docstring is still a default string"
79 ),
70 "D202.2": QCoreApplication.translate( 80 "D202.2": QCoreApplication.translate(
71 "DocStyleChecker", 81 "DocStyleChecker", "function docstring still contains some placeholders"
72 "function docstring still contains some placeholders"), 82 ),
73 "D203": QCoreApplication.translate( 83 "D203": QCoreApplication.translate(
74 "DocStyleChecker", 84 "DocStyleChecker", "private function/method is missing a docstring"
75 "private function/method is missing a docstring"), 85 ),
76 "D205": QCoreApplication.translate( 86 "D205": QCoreApplication.translate(
77 "DocStyleChecker", "private class is missing a docstring"), 87 "DocStyleChecker", "private class is missing a docstring"
88 ),
78 "D206": QCoreApplication.translate( 89 "D206": QCoreApplication.translate(
79 "DocStyleChecker", "class docstring is still a default string"), 90 "DocStyleChecker", "class docstring is still a default string"
91 ),
80 "D221": QCoreApplication.translate( 92 "D221": QCoreApplication.translate(
81 "DocStyleChecker", 93 "DocStyleChecker", "leading quotes of docstring not on separate line"
82 "leading quotes of docstring not on separate line"), 94 ),
83 "D222": QCoreApplication.translate( 95 "D222": QCoreApplication.translate(
84 "DocStyleChecker", 96 "DocStyleChecker", "trailing quotes of docstring not on separate line"
85 "trailing quotes of docstring not on separate line"), 97 ),
86 "D231": QCoreApplication.translate( 98 "D231": QCoreApplication.translate(
87 "DocStyleChecker", "docstring summary does not end with a period"), 99 "DocStyleChecker", "docstring summary does not end with a period"
100 ),
88 "D232": QCoreApplication.translate( 101 "D232": QCoreApplication.translate(
89 "DocStyleChecker", "docstring summary does not start with '{0}'"), 102 "DocStyleChecker", "docstring summary does not start with '{0}'"
103 ),
90 "D234r": QCoreApplication.translate( 104 "D234r": QCoreApplication.translate(
91 "DocStyleChecker", 105 "DocStyleChecker",
92 "docstring does not contain a @return line but function/method" 106 "docstring does not contain a @return line but function/method"
93 " returns something"), 107 " returns something",
108 ),
94 "D235r": QCoreApplication.translate( 109 "D235r": QCoreApplication.translate(
95 "DocStyleChecker", 110 "DocStyleChecker",
96 "docstring contains a @return line but function/method doesn't" 111 "docstring contains a @return line but function/method doesn't"
97 " return anything"), 112 " return anything",
113 ),
98 "D234y": QCoreApplication.translate( 114 "D234y": QCoreApplication.translate(
99 "DocStyleChecker", 115 "DocStyleChecker",
100 "docstring does not contain a @yield line but function/method" 116 "docstring does not contain a @yield line but function/method"
101 " yields something"), 117 " yields something",
118 ),
102 "D235y": QCoreApplication.translate( 119 "D235y": QCoreApplication.translate(
103 "DocStyleChecker", 120 "DocStyleChecker",
104 "docstring contains a @yield line but function/method doesn't" 121 "docstring contains a @yield line but function/method doesn't"
105 " yield anything"), 122 " yield anything",
123 ),
106 "D236": QCoreApplication.translate( 124 "D236": QCoreApplication.translate(
107 "DocStyleChecker", 125 "DocStyleChecker", "docstring does not contain enough @param/@keyparam lines"
108 "docstring does not contain enough @param/@keyparam lines"), 126 ),
109 "D237": QCoreApplication.translate( 127 "D237": QCoreApplication.translate(
110 "DocStyleChecker", 128 "DocStyleChecker", "docstring contains too many @param/@keyparam lines"
111 "docstring contains too many @param/@keyparam lines"), 129 ),
112 "D238": QCoreApplication.translate( 130 "D238": QCoreApplication.translate(
113 "DocStyleChecker", 131 "DocStyleChecker",
114 "keyword only arguments must be documented with @keyparam lines"), 132 "keyword only arguments must be documented with @keyparam lines",
133 ),
115 "D239": QCoreApplication.translate( 134 "D239": QCoreApplication.translate(
116 "DocStyleChecker", "order of @param/@keyparam lines does" 135 "DocStyleChecker",
117 " not match the function/method signature"), 136 "order of @param/@keyparam lines does"
137 " not match the function/method signature",
138 ),
118 "D242": QCoreApplication.translate( 139 "D242": QCoreApplication.translate(
119 "DocStyleChecker", "class docstring is preceded by a blank line"), 140 "DocStyleChecker", "class docstring is preceded by a blank line"
141 ),
120 "D243": QCoreApplication.translate( 142 "D243": QCoreApplication.translate(
121 "DocStyleChecker", "class docstring is followed by a blank line"), 143 "DocStyleChecker", "class docstring is followed by a blank line"
144 ),
122 "D244": QCoreApplication.translate( 145 "D244": QCoreApplication.translate(
123 "DocStyleChecker", 146 "DocStyleChecker", "function/method docstring is preceded by a blank line"
124 "function/method docstring is preceded by a blank line"), 147 ),
125 "D245": QCoreApplication.translate( 148 "D245": QCoreApplication.translate(
126 "DocStyleChecker", 149 "DocStyleChecker", "function/method docstring is followed by a blank line"
127 "function/method docstring is followed by a blank line"), 150 ),
128 "D246": QCoreApplication.translate( 151 "D246": QCoreApplication.translate(
129 "DocStyleChecker", 152 "DocStyleChecker", "docstring summary is not followed by a blank line"
130 "docstring summary is not followed by a blank line"), 153 ),
131 "D247": QCoreApplication.translate( 154 "D247": QCoreApplication.translate(
132 "DocStyleChecker", 155 "DocStyleChecker", "last paragraph of docstring is followed by a blank line"
133 "last paragraph of docstring is followed by a blank line"), 156 ),
134 "D250": QCoreApplication.translate( 157 "D250": QCoreApplication.translate(
135 "DocStyleChecker", 158 "DocStyleChecker",
136 "docstring does not contain a @exception line but function/method" 159 "docstring does not contain a @exception line but function/method"
137 " raises an exception"), 160 " raises an exception",
161 ),
138 "D251": QCoreApplication.translate( 162 "D251": QCoreApplication.translate(
139 "DocStyleChecker", 163 "DocStyleChecker",
140 "docstring contains a @exception line but function/method doesn't" 164 "docstring contains a @exception line but function/method doesn't"
141 " raise an exception"), 165 " raise an exception",
166 ),
142 "D252": QCoreApplication.translate( 167 "D252": QCoreApplication.translate(
143 "DocStyleChecker", 168 "DocStyleChecker", "raised exception '{0}' is not documented in docstring"
144 "raised exception '{0}' is not documented in docstring"), 169 ),
145 "D253": QCoreApplication.translate( 170 "D253": QCoreApplication.translate(
146 "DocStyleChecker", 171 "DocStyleChecker", "documented exception '{0}' is not raised"
147 "documented exception '{0}' is not raised"), 172 ),
148 "D260": QCoreApplication.translate( 173 "D260": QCoreApplication.translate(
149 "DocStyleChecker", 174 "DocStyleChecker",
150 "docstring does not contain a @signal line but class defines signals"), 175 "docstring does not contain a @signal line but class defines signals",
176 ),
151 "D261": QCoreApplication.translate( 177 "D261": QCoreApplication.translate(
152 "DocStyleChecker", 178 "DocStyleChecker",
153 "docstring contains a @signal line but class doesn't define signals"), 179 "docstring contains a @signal line but class doesn't define signals",
180 ),
154 "D262": QCoreApplication.translate( 181 "D262": QCoreApplication.translate(
155 "DocStyleChecker", 182 "DocStyleChecker", "defined signal '{0}' is not documented in docstring"
156 "defined signal '{0}' is not documented in docstring"), 183 ),
157 "D263": QCoreApplication.translate( 184 "D263": QCoreApplication.translate(
158 "DocStyleChecker", 185 "DocStyleChecker", "documented signal '{0}' is not defined"
159 "documented signal '{0}' is not defined"), 186 ),
160 } 187 }
161 188
162 _docStyleMessagesSampleArgs = { 189 _docStyleMessagesSampleArgs = {
163 "D232": ["public"], 190 "D232": ["public"],
164 "D252": ["RuntimeError"], 191 "D252": ["RuntimeError"],

eric ide

mercurial