##// END OF EJS Templates
fileset: add i18n hints for keywords
Wagner Bruna -
r14785:0f0bd4d0 stable
parent child Browse files
Show More
@@ -114,6 +114,7 b' def modified(mctx, x):'
114 """``modified()``
114 """``modified()``
115 File that is modified according to status.
115 File that is modified according to status.
116 """
116 """
117 # i18n: "modified" is a keyword
117 getargs(x, 0, 0, _("modified takes no arguments"))
118 getargs(x, 0, 0, _("modified takes no arguments"))
118 s = mctx.status()[0]
119 s = mctx.status()[0]
119 return [f for f in mctx.subset if f in s]
120 return [f for f in mctx.subset if f in s]
@@ -122,6 +123,7 b' def added(mctx, x):'
122 """``added()``
123 """``added()``
123 File that is added according to status.
124 File that is added according to status.
124 """
125 """
126 # i18n: "added" is a keyword
125 getargs(x, 0, 0, _("added takes no arguments"))
127 getargs(x, 0, 0, _("added takes no arguments"))
126 s = mctx.status()[1]
128 s = mctx.status()[1]
127 return [f for f in mctx.subset if f in s]
129 return [f for f in mctx.subset if f in s]
@@ -130,6 +132,7 b' def removed(mctx, x):'
130 """``removed()``
132 """``removed()``
131 File that is removed according to status.
133 File that is removed according to status.
132 """
134 """
135 # i18n: "removed" is a keyword
133 getargs(x, 0, 0, _("removed takes no arguments"))
136 getargs(x, 0, 0, _("removed takes no arguments"))
134 s = mctx.status()[2]
137 s = mctx.status()[2]
135 return [f for f in mctx.subset if f in s]
138 return [f for f in mctx.subset if f in s]
@@ -138,6 +141,7 b' def deleted(mctx, x):'
138 """``deleted()``
141 """``deleted()``
139 File that is deleted according to status.
142 File that is deleted according to status.
140 """
143 """
144 # i18n: "deleted" is a keyword
141 getargs(x, 0, 0, _("deleted takes no arguments"))
145 getargs(x, 0, 0, _("deleted takes no arguments"))
142 s = mctx.status()[3]
146 s = mctx.status()[3]
143 return [f for f in mctx.subset if f in s]
147 return [f for f in mctx.subset if f in s]
@@ -147,6 +151,7 b' def unknown(mctx, x):'
147 File that is unknown according to status. These files will only be
151 File that is unknown according to status. These files will only be
148 considered if this predicate is used.
152 considered if this predicate is used.
149 """
153 """
154 # i18n: "unknown" is a keyword
150 getargs(x, 0, 0, _("unknown takes no arguments"))
155 getargs(x, 0, 0, _("unknown takes no arguments"))
151 s = mctx.status()[4]
156 s = mctx.status()[4]
152 return [f for f in mctx.subset if f in s]
157 return [f for f in mctx.subset if f in s]
@@ -156,6 +161,7 b' def ignored(mctx, x):'
156 File that is ignored according to status. These files will only be
161 File that is ignored according to status. These files will only be
157 considered if this predicate is used.
162 considered if this predicate is used.
158 """
163 """
164 # i18n: "ignored" is a keyword
159 getargs(x, 0, 0, _("ignored takes no arguments"))
165 getargs(x, 0, 0, _("ignored takes no arguments"))
160 s = mctx.status()[5]
166 s = mctx.status()[5]
161 return [f for f in mctx.subset if f in s]
167 return [f for f in mctx.subset if f in s]
@@ -164,6 +170,7 b' def clean(mctx, x):'
164 """``clean()``
170 """``clean()``
165 File that is clean according to status.
171 File that is clean according to status.
166 """
172 """
173 # i18n: "clean" is a keyword
167 getargs(x, 0, 0, _("clean takes no arguments"))
174 getargs(x, 0, 0, _("clean takes no arguments"))
168 s = mctx.status()[6]
175 s = mctx.status()[6]
169 return [f for f in mctx.subset if f in s]
176 return [f for f in mctx.subset if f in s]
@@ -190,6 +197,7 b' def binary(mctx, x):'
190 """``binary()``
197 """``binary()``
191 File that appears to be binary (contails NUL bytes).
198 File that appears to be binary (contails NUL bytes).
192 """
199 """
200 # i18n: "binary" is a keyword
193 getargs(x, 0, 0, _("binary takes no arguments"))
201 getargs(x, 0, 0, _("binary takes no arguments"))
194 return [f for f in mctx.subset if util.binary(mctx.ctx[f].data())]
202 return [f for f in mctx.subset if util.binary(mctx.ctx[f].data())]
195
203
@@ -197,6 +205,7 b' def exec_(mctx, x):'
197 """``exec()``
205 """``exec()``
198 File that is marked as executable.
206 File that is marked as executable.
199 """
207 """
208 # i18n: "exec" is a keyword
200 getargs(x, 0, 0, _("exec takes no arguments"))
209 getargs(x, 0, 0, _("exec takes no arguments"))
201 return [f for f in mctx.subset if mctx.ctx.flags(f) == 'x']
210 return [f for f in mctx.subset if mctx.ctx.flags(f) == 'x']
202
211
@@ -204,6 +213,7 b' def symlink(mctx, x):'
204 """``symlink()``
213 """``symlink()``
205 File that is marked as a symlink.
214 File that is marked as a symlink.
206 """
215 """
216 # i18n: "symlink" is a keyword
207 getargs(x, 0, 0, _("symlink takes no arguments"))
217 getargs(x, 0, 0, _("symlink takes no arguments"))
208 return [f for f in mctx.subset if mctx.ctx.flags(f) == 'l']
218 return [f for f in mctx.subset if mctx.ctx.flags(f) == 'l']
209
219
@@ -211,6 +221,7 b' def resolved(mctx, x):'
211 """``resolved()``
221 """``resolved()``
212 File that is marked resolved according to the resolve state.
222 File that is marked resolved according to the resolve state.
213 """
223 """
224 # i18n: "resolved" is a keyword
214 getargs(x, 0, 0, _("resolved takes no arguments"))
225 getargs(x, 0, 0, _("resolved takes no arguments"))
215 if mctx.ctx.rev() is not None:
226 if mctx.ctx.rev() is not None:
216 return []
227 return []
@@ -221,6 +232,7 b' def unresolved(mctx, x):'
221 """``unresolved()``
232 """``unresolved()``
222 File that is marked unresolved according to the resolve state.
233 File that is marked unresolved according to the resolve state.
223 """
234 """
235 # i18n: "unresolved" is a keyword
224 getargs(x, 0, 0, _("unresolved takes no arguments"))
236 getargs(x, 0, 0, _("unresolved takes no arguments"))
225 if mctx.ctx.rev() is not None:
237 if mctx.ctx.rev() is not None:
226 return []
238 return []
@@ -282,6 +294,7 b' def size(mctx, x):'
282 - 4k - 1MB (files from 4096 bytes to 1048576 bytes)
294 - 4k - 1MB (files from 4096 bytes to 1048576 bytes)
283 """
295 """
284
296
297 # i18n: "size" is a keyword
285 expr = getstring(x, _("size requires an expression")).strip()
298 expr = getstring(x, _("size requires an expression")).strip()
286 if '-' in expr: # do we have a range?
299 if '-' in expr: # do we have a range?
287 a, b = expr.split('-', 1)
300 a, b = expr.split('-', 1)
@@ -316,6 +329,7 b' def encoding(mctx, x):'
316 UTF-8.
329 UTF-8.
317 """
330 """
318
331
332 # i18n: "encoding" is a keyword
319 enc = getstring(x, _("encoding requires an encoding name"))
333 enc = getstring(x, _("encoding requires an encoding name"))
320
334
321 s = []
335 s = []
@@ -335,6 +349,7 b' def copied(mctx, x):'
335 """``copied()``
349 """``copied()``
336 File that is recorded as being copied.
350 File that is recorded as being copied.
337 """
351 """
352 # i18n: "copied" is a keyword
338 getargs(x, 0, 0, _("copied takes no arguments"))
353 getargs(x, 0, 0, _("copied takes no arguments"))
339 s = []
354 s = []
340 for f in mctx.subset:
355 for f in mctx.subset:
General Comments 0
You need to be logged in to leave comments. Login now