FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit ed7e5718 authored by Silas S. Brown's avatar Silas S. Brown
Browse files

Gradint update

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/gradint@1210 29193198-4895-4776-b068-10539e920549
parent d0565486
No related branches found
No related tags found
No related merge requests found
......@@ -391,7 +391,7 @@ def denumber_filelists(r,x,y):
def denumber_synth(z,also_norm_extsep=0):
zf = z.find("!synth:")
if zf>-1:
z=z[zf:].lower() # so ignores the priority-number it had (because the vocab.txt file might have been re-organised hence changing all the numbers). Also a .lower() so case changes don't change progress. (Old versions of gradint said .lower() when parsing vocab.txt, but this can cause problems with things like Mc[A-Z].. in English espeak)
z=lower(z[zf:]) # so ignores the priority-number it had (because the vocab.txt file might have been re-organised hence changing all the numbers). Also a .lower() so case changes don't change progress. (Old versions of gradint said .lower() when parsing vocab.txt, but this can cause problems with things like Mc[A-Z].. in English espeak)
if z.endswith(dotwav) or z.endswith(dotmp3): return z[:z.rindex(extsep)] # remove legacy extensions from synth vocab
elif also_norm_extsep: return z.replace("\\","/").replace(".","/") # so compares equally across platforms with os.sep and extsep differences
return z
......
......@@ -522,9 +522,13 @@ except: pass
# make sure unusual locale settings don't make .lower() change utf-8 bytes by mistake:
try:
try: import locale
except: import _locale as locale # some S60s
import locale
locale.setlocale(locale.LC_ALL, 'C')
except: pass
if not '\xc4'.lower()=='\xc4': # buggy setlocale (e.g. S60) can create portability issues with progress files
lTrans="".join([chr(c) for c in range(ord('A'))]+[chr(c) for c in range(ord('a'),ord('z')+1)]+[chr(c) for c in range(ord('Z')+1,256)])
def lower(s): return s.translate(lTrans) # (may crash if Unicode)
else:
def lower(s): return s.lower()
# -------------------------------------------------------
......@@ -94,7 +94,7 @@ desktop_only = [ # Don't want these on either WinCE or S60:
"def setSoundCollector(sc):",
"def getAmplify(directory):",
"def doAmplify(directory,fileList,factor):",
"def gui_outputTo_end():",
"def gui_outputTo_end(openDir=True):",
"def gui_outputTo_start():",
"def warn_sox_decode():",
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment