Mon, 15 Aug 2016 19:34:33 +0200
Adjustments to eric changes.
ChangeLog | file | annotate | diff | comparison | revisions | |
PluginProjectPyramid.py | file | annotate | diff | comparison | revisions | |
PluginProjectPyramid.zip | file | annotate | diff | comparison | revisions | |
PluginPyramid.e4p | file | annotate | diff | comparison | revisions | |
ProjectPyramid/Project.py | file | annotate | diff | comparison | revisions |
--- a/ChangeLog Sun Jul 10 12:29:06 2016 +0200 +++ b/ChangeLog Mon Aug 15 19:34:33 2016 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 2.1.3: +- some adjustments to eric changes + Version 2.1.2: - updated Russian translations
--- a/PluginProjectPyramid.py Sun Jul 10 12:29:06 2016 +0200 +++ b/PluginProjectPyramid.py Mon Aug 15 19:34:33 2016 +0200 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.1.2" +version = "2.1.3" className = "ProjectPyramidPlugin" packageName = "ProjectPyramid" shortDescription = "Project support for Pyramid projects."
--- a/PluginPyramid.e4p Sun Jul 10 12:29:06 2016 +0200 +++ b/PluginPyramid.e4p Mon Aug 15 19:34:33 2016 +0200 @@ -266,6 +266,18 @@ <value> <dict> <key> + <string>CopyrightAuthor</string> + </key> + <value> + <string></string> + </value> + <key> + <string>CopyrightMinFileSize</string> + </key> + <value> + <int>0</int> + </value> + <key> <string>DocstringType</string> </key> <value> @@ -281,7 +293,7 @@ <string>ExcludeMessages</string> </key> <value> - <string>E24, W293, N802, N803, N807, N808, N821, E265</string> + <string>E24, E265, N802, N803, N807, N808, N821, W293, E266</string> </value> <key> <string>FixCodes</string> @@ -296,6 +308,12 @@ <bool>False</bool> </value> <key> + <string>FutureChecker</string> + </key> + <value> + <string></string> + </value> + <key> <string>HangClosing</string> </key> <value> @@ -308,6 +326,12 @@ <string></string> </value> <key> + <string>MaxCodeComplexity</string> + </key> + <value> + <int>10</int> + </value> + <key> <string>MaxLineLength</string> </key> <value> @@ -331,6 +355,12 @@ <value> <bool>False</bool> </value> + <key> + <string>ValidEncodings</string> + </key> + <value> + <string>latin-1, utf-8</string> + </value> </dict> </value> </dict>
--- a/ProjectPyramid/Project.py Sun Jul 10 12:29:06 2016 +0200 +++ b/ProjectPyramid/Project.py Mon Aug 15 19:34:33 2016 +0200 @@ -931,7 +931,11 @@ self.tr('&Current Pyramid Project ({0})').format(curProject)) if self.__currentProject is None: - self.__e5project.pdata["TRANSLATIONPATTERN"] = [] + try: + self.__e5project.setTranslationPattern("") + except AttributeError: + # backward compatibility + self.__e5project.pdata["TRANSLATIONPATTERN"] = [] else: lowerProject = self.__project().lower() config = configparser.ConfigParser() @@ -944,10 +948,17 @@ domain = config.get("init_catalog", "domain") except (configparser.NoOptionError, configparser.NoSectionError): domain = lowerProject - self.__e5project.pdata["TRANSLATIONPATTERN"] = [ - os.path.join(project, outputDir, "%language%", - "LC_MESSAGES", "{0}.po".format(domain)) - ] + try: + self.__e5project.setTranslationPattern( + os.path.join(project, outputDir, "%language%", + "LC_MESSAGES", "{0}.po".format(domain)) + ) + except AttributeError: + # backward compatibility + self.__e5project.pdata["TRANSLATIONPATTERN"] = [ + os.path.join(project, outputDir, "%language%", + "LC_MESSAGES", "{0}.po".format(domain)) + ] if self.__currentProject is None: self.initializeDbAct.setEnabled(False) @@ -1334,11 +1345,11 @@ @param filename name of the file used for extraction (string) @return extracted locale (string) or None """ - if self.__e5project.pdata["TRANSLATIONPATTERN"]: + if self.__e5project.getTranslationPattern(): # On Windows, path typically contains backslashes. This leads # to an invalid seach pattern '...\(' because the opening bracked # will be escaped. - pattern = self.__e5project.pdata["TRANSLATIONPATTERN"][0] + pattern = self.__e5project.getTranslationPattern() pattern = os.path.normpath(pattern) pattern = pattern.replace("%language%", "(.*?)") pattern = pattern.replace('\\', '\\\\') @@ -1469,7 +1480,7 @@ if res: dia.exec_() - langFile = self.__e5project.pdata["TRANSLATIONPATTERN"][0]\ + langFile = self.__e5project.getTranslationPattern()\ .replace("%language%", code) self.__e5project.appendFile(langFile)