46 self.version = \ |
46 self.version = \ |
47 self.attribute("version", projectFileFormatVersion) |
47 self.attribute("version", projectFileFormatVersion) |
48 if self.version not in self.supportedVersions: |
48 if self.version not in self.supportedVersions: |
49 self.raiseUnsupportedFormatVersion(self.version) |
49 self.raiseUnsupportedFormatVersion(self.version) |
50 elif self.name() == "Language": |
50 elif self.name() == "Language": |
51 self.project.pdata["SPELLLANGUAGE"] = [ |
51 self.project.pdata["SPELLLANGUAGE"] = \ |
52 self.readElementText()] |
52 self.readElementText() |
53 elif self.name() == "ProjectWordList": |
53 elif self.name() == "ProjectWordList": |
54 self.project.pdata["SPELLWORDS"] = \ |
54 self.project.pdata["SPELLWORDS"] = \ |
55 Utilities.toNativeSeparators(self.readElementText()) |
55 Utilities.toNativeSeparators(self.readElementText()) |
56 elif self.name() == "ProjectExcludeList": |
56 elif self.name() == "ProjectExcludeList": |
57 self.project.pdata["SPELLEXCLUDES"] = \ |
57 self.project.pdata["SPELLEXCLUDES"] = \ |
58 Utilities.toNativeSeparators(self.readElementText()) |
58 Utilities.toNativeSeparators(self.readElementText()) |
59 elif self.name() == "Hash": |
59 elif self.name() == "Hash": |
60 self.project.pdata["HASH"] = [self.readElementText()] |
60 self.project.pdata["HASH"] = self.readElementText() |
61 elif self.name() == "ProgLanguage": |
61 elif self.name() == "ProgLanguage": |
62 self.project.pdata["MIXEDLANGUAGE"] = \ |
62 self.project.pdata["MIXEDLANGUAGE"] = \ |
63 [int(self.attribute("mixed", "0"))] |
63 int(self.attribute("mixed", "0")) |
64 self.project.pdata["PROGLANGUAGE"] = [ |
64 self.project.pdata["PROGLANGUAGE"] = self.readElementText() |
65 self.readElementText()] |
65 if self.project.pdata["PROGLANGUAGE"] == "Python": |
66 if self.project.pdata["PROGLANGUAGE"][0] == "Python": |
|
67 # convert Python to the more specific Python2 |
66 # convert Python to the more specific Python2 |
68 self.project.pdata["PROGLANGUAGE"][0] = "Python2" |
67 self.project.pdata["PROGLANGUAGE"] = "Python2" |
69 elif self.name() == "ProjectType": |
68 elif self.name() == "ProjectType": |
70 self.project.pdata["PROJECTTYPE"] = [ |
69 self.project.pdata["PROJECTTYPE"] = self.readElementText() |
71 self.readElementText()] |
|
72 elif self.name() == "Description": |
70 elif self.name() == "Description": |
73 self.project.pdata["DESCRIPTION"] = self.readElementText() |
71 self.project.pdata["DESCRIPTION"] = self.readElementText() |
74 elif self.name() == "Version": |
72 elif self.name() == "Version": |
75 self.project.pdata["VERSION"] = self.readElementText() |
73 self.project.pdata["VERSION"] = self.readElementText() |
76 elif self.name() == "Author": |
74 elif self.name() == "Author": |
77 self.project.pdata["AUTHOR"] = [self.readElementText()] |
75 self.project.pdata["AUTHOR"] = self.readElementText() |
78 elif self.name() == "Email": |
76 elif self.name() == "Email": |
79 self.project.pdata["EMAIL"] = [self.readElementText()] |
77 self.project.pdata["EMAIL"] = self.readElementText() |
80 elif self.name() == "TranslationPattern": |
78 elif self.name() == "TranslationPattern": |
81 self.project.pdata["TRANSLATIONPATTERN"] = \ |
79 self.project.pdata["TRANSLATIONPATTERN"] = \ |
82 Utilities.toNativeSeparators(self.readElementText()) |
80 Utilities.toNativeSeparators(self.readElementText()) |
83 elif self.name() == "TranslationsBinPath": |
81 elif self.name() == "TranslationsBinPath": |
84 self.project.pdata["TRANSLATIONSBINPATH"] = \ |
82 self.project.pdata["TRANSLATIONSBINPATH"] = \ |