f.write('\nDetails for translators (classes sorted alphabetically):\n')
cls=self.__translDic.keys()
cls=list(self.__translDic.keys())
cls.sort()
forcincls:
...
...
@@ -1753,7 +1720,7 @@ class TrManager:
self.lastModificationTime=tim
# Process the content of the maintainers file.
f=codecs.open(fname,'r','utf-8')
f=xopen(fname)
inside=False# inside the record for the language
lineReady=True
classId=None
...
...
@@ -1764,28 +1731,28 @@ class TrManager:
lineReady=line!=''# when eof, then line == ''
line=line.strip()# eof should also behave as separator
ifline!=u''andline[0]==u'%':# skip the comment line
ifline!=''andline[0]=='%':# skip the comment line
continue
ifnotinside:# if outside of the record
ifline!=u'':# should be language identifier
ifline!='':# should be language identifier
classId=line
maintainersLst=[]
inside=True
# Otherwise skip empty line that do not act as separator.
else:# if inside the record
ifline==u'':# separator found
ifline=='':# separator found
inside=False
else:
# If it is the first maintainer, create the empty list.
ifnotself.__maintainersDic.has_key(classId):
ifclassIdnotinself.__maintainersDic:
self.__maintainersDic[classId]=[]
# Split the information about the maintainer and append
# the tuple. The address may be prefixed '[unreachable]'
# or whatever '[xxx]'. This will be processed later.
lst=line.split(u':',1)
lst=line.split(':',1)
assert(len(lst)==2)
t=(lst[0].strip(),lst[1].strip())
self.__maintainersDic[classId].append(t)
...
...
@@ -1817,7 +1784,7 @@ class TrManager:
#
# Read the template of the documentation, and remove the first
# attention lines.
f=codecs.open(fTplName,'r','utf-8')
f=xopen(fTplName)
doctpl=f.read()
f.close()
...
...
@@ -1829,7 +1796,7 @@ class TrManager:
# document template.
tplDic={}
s=u'Do not edit this file. It was generated by the %s script.\n * Instead edit %s and %s'%(self.script_name,self.languageTplFileName,self.maintainersFileName)
s=u'Do not edit this file. It was generated by the %s script. * Instead edit %s and %s'%(self.script_name,self.languageTplFileName,self.maintainersFileName)