From ebe5c0b2bf98fe621b604c0ae7c58534e6e4ff32 Mon Sep 17 00:00:00 2001 From: Alexis Metaireau Date: Sun, 1 Apr 2012 13:37:35 +0200 Subject: [PATCH] Enhance warnings. Fix #196 --- pelican/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pelican/utils.py b/pelican/utils.py index c74b36bd..18730e6c 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -195,7 +195,10 @@ def process_translations(content_list): default_lang_items = items[:1] if not slug: - logger.warning('empty slug for %r' % (default_lang_items[0].filename,)) + msg = 'empty slug for %r. ' % default_lang_items[0].filename\ + + 'You can fix this by adding a title or a slug to your '\ + + 'content' + logger.warning(msg) index.extend(default_lang_items) translations.extend(filter( lambda x: x not in default_lang_items,