Ticket #1695: i18n-kid-strip-msg.diff
| File i18n-kid-strip-msg.diff, 1.3 kB (added by Chris Arndt, 2 years ago) |
|---|
-
turbogears/command/i18n.py
old new 326 326 key = None 327 327 s = _py_i18n_re.search(k) 328 328 if s: 329 key = s.group(1) or s.group(2)329 key = (s.group(1) or s.group(2) or '').strip() 330 330 elif not is_attribute: 331 331 # we don't have a kid expression in there, so it is 332 332 # "just" a text entry - which we want to be translated! … … 335 335 if isinstance(parts, list) and len(parts) > 1: 336 336 print "Warning: Mixed content in tag <%s>: %s" % (tag, k) 337 337 elif isinstance(parts, basestring): 338 key = k 338 key = k.strip() 339 339 if key and (key not in keys) and (tag not in tags_to_ignore): 340 340 messages.append((tag, fname, key)) 341 341 keys.append(key)