Version: 0.8rc5
I had to change line 31 in pogrep.py to:
self.searchstring = searchstring
For the search facility to work correctly in Pootle
However there is still a problem with pogrep on the command line:
pogrep “ضضط” —errorlevel=traceback po duh
Produces the following traceback:
pogrep: warning: Error processing: input po/highlight/xh/html.po, output
duh/highlight/xh/html.po, template None: Traceback (most recent call last):
File “/usr/lib/python2.4/site-packages/translate/misc/optrecurse.py”, line
418, in recursiveprocess
success = self.processfile(fileprocessor, options, fullinputpath,
fulloutputpath, fulltemplatepath)
File “/usr/lib/python2.4/site-packages/translate/misc/optrecurse.py”, line
471, in processfile
if fileprocessor(inputfile, outputfile, templatefile, **passthroughoptions):
File “/usr/lib/python2.4/site-packages/translate/tools/pogrep.py”, line 142,
in runpogrep
tofile = checkfilter.filterfile(fromfile)
File “/usr/lib/python2.4/site-packages/translate/tools/pogrep.py”, line 91, in
filterfile
matches = self.filterelement(thepo)
File “/usr/lib/python2.4/site-packages/translate/tools/pogrep.py”, line 81, in
filterelement
if self.matches(unquotedid): return True
File “/usr/lib/python2.4/site-packages/translate/tools/pogrep.py”, line 56, in
matches
found = teststr.find(self.searchstring) != -1
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xd8 in position 0: ordinal
not in range(128)
With the -e option it works correcly.