|
|
|
@ -3233,8 +3233,13 @@ gettext -d cl_template "$*"
|
|
|
|
|
|
|
|
|
|
def getTitle(self, comment, commentList, configPath=""):
|
|
|
|
|
"""Выдает заголовок шаблона ( версия и.т.д)"""
|
|
|
|
|
origConfigPath = PkgContents.reCfg.sub("/", configPath)
|
|
|
|
|
if self._baseDir != "/":
|
|
|
|
|
lenBaseDir = len(self._baseDir)
|
|
|
|
|
commentList = [x[lenBaseDir:]
|
|
|
|
|
if x.startswith(self._baseDir)
|
|
|
|
|
else x for x in commentList]
|
|
|
|
|
if configPath and self.protectPaths:
|
|
|
|
|
flagFoundPath = False
|
|
|
|
|
for protectPath in self.protectPaths:
|
|
|
|
|
if self._baseDir != "/":
|
|
|
|
|
lenBaseDir = len(self._baseDir)
|
|
|
|
@ -3242,19 +3247,11 @@ gettext -d cl_template "$*"
|
|
|
|
|
configPath[:lenBaseDir] == self._baseDir:
|
|
|
|
|
configPath = configPath[lenBaseDir:]
|
|
|
|
|
if configPath.startswith(protectPath + "/"):
|
|
|
|
|
flagFoundPath = True
|
|
|
|
|
if not any(origConfigPath.endswith(x) for x in
|
|
|
|
|
("/calculate.env", "/ini.env", "/custom")):
|
|
|
|
|
commentList = commentList + \
|
|
|
|
|
[self.titleEnd % {'conf_path': origConfigPath}]
|
|
|
|
|
break
|
|
|
|
|
if flagFoundPath:
|
|
|
|
|
origConfigPath = PkgContents.reCfg.sub("/", configPath)
|
|
|
|
|
if self._baseDir != "/":
|
|
|
|
|
lenBaseDir = len(self._baseDir)
|
|
|
|
|
commentList = [x[lenBaseDir:]
|
|
|
|
|
if x.startswith(self._baseDir)
|
|
|
|
|
else x for x in commentList]
|
|
|
|
|
if not any(origConfigPath.endswith(x) for x in
|
|
|
|
|
("/calculate.env", "/ini.env", "/custom")):
|
|
|
|
|
commentList = commentList + \
|
|
|
|
|
[self.titleEnd % {'conf_path': origConfigPath}]
|
|
|
|
|
if comment:
|
|
|
|
|
commentFirst = comment
|
|
|
|
|
commentInsert = comment
|
|
|
|
|