return false;
}
boolean result = false;
EnumWikipedia wiki = analysis.getWikipedia();
MagicWord magicWordImgAlt = wiki.getWikiConfiguration().getMagicWordByName(MagicWord.IMG_ALT);
for (PageElementImage image : analysis.getImages()) {
String description = image.getDescription();
if ((description == null) || (description.trim().length() == 0)) {
String alt = image.getAlternateDescription();
if ((alt == null) || (alt.trim().length() == 0)) {
if (errors == null) {
return true;
}
result = true;
CheckErrorResult errorResult = createCheckErrorResult(
analysis, image.getBeginIndex(), image.getEndIndex());
// Action: add a description
StringBuilder prefixFull = new StringBuilder();
prefixFull.append("[[");
prefixFull.append(image.getNamespace());
prefixFull.append(":");
prefixFull.append(image.getImage());
StringBuilder prefixShort = new StringBuilder(prefixFull);
if (image.getParameters() != null) {
for (PageElementImage.Parameter param : image.getParameters()) {
prefixFull.append("|");
prefixFull.append(param.getContents());
if (!magicWordImgAlt.isPossibleAlias(param.getContents())) {
prefixShort.append("|");
prefixShort.append(param.getContents());
}
}
}