wmllint: As requested, adding recognition of WebP image labels.
Extension of #7079.
This commit is contained in:
parent
c8a0f9b9ca
commit
26adbf4416
1 changed files with 2 additions and 2 deletions
|
@ -2480,9 +2480,9 @@ to be called on their own".format(filename, num))
|
|||
% (filename, i+1, key))
|
||||
lines[i] = lines[i].replace("=_","=")
|
||||
if markcheck and value and not value.startswith("$") and not value.startswith("{") and not has_tr_mark and not ("wmllint: ignore" in comment or "wmllint: noconvert" in comment):
|
||||
# [image] sometimes uses label to specify a reference to a PNG file
|
||||
# [image] sometimes uses label to specify a reference to a PNG or WebP file
|
||||
# so do not mark for translation in those cases
|
||||
if not (key == 'label' and '.png' in value):
|
||||
if not (key == 'label' and ('.png' in value or '.webp' in value)):
|
||||
print('"%s", line %d: %s needs translation mark' \
|
||||
% (filename, i+1, key))
|
||||
lines[i] = lines[i].replace('=', "=_ ", 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue