diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 7aa96ece5d4..2ce2d4fccf2 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -152,8 +152,12 @@ _ = GettextAlias() # class to handle po files class TinyPoFile(object): def __init__(self, buffer): + self.logger = netsvc.Logger() self.buffer = buffer + def warn(self, msg): + self.logger.notifyChannel("i18n", netsvc.LOG_WARNING, msg) + def __iter__(self): self.buffer.seek(0) self.lines = self._get_lines() @@ -228,6 +232,10 @@ class TinyPoFile(object): self.tnrs.append((t, n, r, source, trad)) self.first = False + + if name is None: + self.warn('Missing "#:" formated comment for the following source:\n\t%s' % (source,)) + return self.next() return type, name, res_id, source, trad def write_infos(self, modules):