summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-08-10 10:51:37 +0100
committerRichard Hughes <richard@hughsie.com>2016-08-10 10:51:37 +0100
commit72f5fe62566a81b53789d864750edcad1d5804d7 (patch)
treeca02eafbe0b038197c864a597f347865acd8a2b6
parent7912ac9593940ff461e7ee6801565df106077369 (diff)
downloadappstream-glib-72f5fe62566a81b53789d864750edcad1d5804d7.tar.gz
Print max caption length when validating
Fixes: https://github.com/hughsie/appstream-glib/issues/110
-rw-r--r--libappstream-glib/as-app-validate.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index 0a63f56..24443d9 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -650,12 +650,16 @@ as_app_validate_screenshot (AsScreenshot *ss, AsAppValidateHelper *helper)
if (str_len < length_caption_min) {
ai_app_validate_add (helper,
AS_PROBLEM_KIND_STYLE_INCORRECT,
- "<caption> is too short [%s]", tmp);
+ "<caption> is too short [%s];"
+ "shortest allowed is %u chars",
+ tmp, length_caption_min);
}
if (str_len > length_caption_max) {
ai_app_validate_add (helper,
AS_PROBLEM_KIND_STYLE_INCORRECT,
- "<caption> is too long [%s]", tmp);
+ "<caption> is too long [%s];"
+ "longest allowed is %u chars",
+ tmp, length_caption_max);
}
if (ai_app_validate_fullstop_ending (tmp)) {
ai_app_validate_add (helper,