diff options
author | Richard Hughes <richard@hughsie.com> | 2016-08-10 10:51:37 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-08-10 10:51:37 +0100 |
commit | 72f5fe62566a81b53789d864750edcad1d5804d7 (patch) | |
tree | ca02eafbe0b038197c864a597f347865acd8a2b6 | |
parent | 7912ac9593940ff461e7ee6801565df106077369 (diff) | |
download | appstream-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.c | 8 |
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, |