Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1695: i18n-kid-strip-msg.diff

File i18n-kid-strip-msg.diff, 1.3 KB (added by Chris Arndt, 4 years ago)
  • turbogears/command/i18n.py

    Eigenschaftsänderungen: thirdparty
    ___________________________________________________________________
    Name: svn:ignore
       - *.pyc
    
       + *.pyc
    cherrypy
    configobj
    elixir
    formencode
    genshi
    mochikit
    nose
    paste
    pastescript
    simplejson
    sqlalchemy
    sqlobject
    
    
     
    326326            key = None 
    327327            s = _py_i18n_re.search(k) 
    328328            if s: 
    329                 key = s.group(1) or s.group(2) 
     329                key = (s.group(1) or s.group(2) or '').strip() 
    330330            elif not is_attribute: 
    331331                # we don't have a kid expression in there, so it is 
    332332                # "just" a text entry - which we want to be translated! 
     
    335335                if isinstance(parts, list) and len(parts) > 1: 
    336336                    print "Warning: Mixed content in tag <%s>: %s" % (tag, k) 
    337337                elif isinstance(parts, basestring): 
    338                     key = k 
     338                    key = k.strip() 
    339339            if key and (key not in keys) and (tag not in tags_to_ignore): 
    340340                messages.append((tag, fname, key)) 
    341341                keys.append(key)