UserGuidelines/Localisation: web2py2po.diff

File web2py2po.diff, 1.1 KB (added by Fran Boon, 13 years ago)
  • \po2web2py.py

    diff -u convert.orig\po2web2py.py convert\po2web2py.py
    old new  
    4040            if unit.istranslated() or (includefuzzy and unit.isfuzzy()):
    4141                mydict[unit.source] = unit.target
    4242            else:
    43                 mydict[unit.source] = '*** ' + unit.source
     43                mydict[unit.source] = unit.source
    4444       
    4545        str_obj.write('{\n')
    4646        for source_str in mydict:
  • \web2py2po.py

    diff -u convert.orig\web2py2po.py convert\web2py2po.py
    old new  
    4343
    4444        for source_str in mydict.keys():
    4545            target_str = mydict[source_str]
    46             if target_str.startswith('*** '):
     46            if target_str == source_str:
     47                target_str = ''
     48            elif target_str.startswith('*** '):
    4749                target_str = ''
    4850            pounit = self.convertunit(source_str, target_str)
    4951            self.mypofile.addunit(pounit)