add unicode domain name warning

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1970 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-11-13 23:30:14 +00:00
parent e6f93c913a
commit f0048d0345

View file

@ -245,7 +245,11 @@ class UrlBase (object):
"""
# norm base url
base_url, is_idn = linkcheck.url.url_norm(self.base_url)
if self.base_url != base_url:
if is_idn:
self.add_warning(_("""URL %s has a unicode domain name which
is not yet widely supported. You should use
the URL %s instead.""") % (self.base_url, base_url))
elif self.base_url != base_url:
self.add_warning(
_("Base URL is not properly normed. Normed url is %(url)s.") % \
{'url': base_url})