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"] = [self.readElementText()] |
51 self.project.pdata["SPELLLANGUAGE"] = [ |
|
52 self.readElementText()] |
52 elif self.name() == "ProjectWordList": |
53 elif self.name() == "ProjectWordList": |
53 self.project.pdata["SPELLWORDS"] = \ |
54 self.project.pdata["SPELLWORDS"] = \ |
54 [Utilities.toNativeSeparators(self.readElementText())] |
55 [Utilities.toNativeSeparators(self.readElementText())] |
55 elif self.name() == "ProjectExcludeList": |
56 elif self.name() == "ProjectExcludeList": |
56 self.project.pdata["SPELLEXCLUDES"] = \ |
57 self.project.pdata["SPELLEXCLUDES"] = \ |
58 elif self.name() == "Hash": |
59 elif self.name() == "Hash": |
59 self.project.pdata["HASH"] = [self.readElementText()] |
60 self.project.pdata["HASH"] = [self.readElementText()] |
60 elif self.name() == "ProgLanguage": |
61 elif self.name() == "ProgLanguage": |
61 self.project.pdata["MIXEDLANGUAGE"] = \ |
62 self.project.pdata["MIXEDLANGUAGE"] = \ |
62 [int(self.attribute("mixed", "0"))] |
63 [int(self.attribute("mixed", "0"))] |
63 self.project.pdata["PROGLANGUAGE"] = [self.readElementText()] |
64 self.project.pdata["PROGLANGUAGE"] = [ |
|
65 self.readElementText()] |
64 if self.project.pdata["PROGLANGUAGE"][0] == "Python": |
66 if self.project.pdata["PROGLANGUAGE"][0] == "Python": |
65 # convert Python to the more specific Python2 |
67 # convert Python to the more specific Python2 |
66 self.project.pdata["PROGLANGUAGE"][0] = "Python2" |
68 self.project.pdata["PROGLANGUAGE"][0] = "Python2" |
67 elif self.name() == "ProjectType": |
69 elif self.name() == "ProjectType": |
68 self.project.pdata["PROJECTTYPE"] = [self.readElementText()] |
70 self.project.pdata["PROJECTTYPE"] = [ |
|
71 self.readElementText()] |
69 elif self.name() == "Description": |
72 elif self.name() == "Description": |
70 self.project.pdata["DESCRIPTION"] = [self.readElementText()] |
73 self.project.pdata["DESCRIPTION"] = [ |
|
74 self.readElementText()] |
71 elif self.name() == "Version": |
75 elif self.name() == "Version": |
72 self.project.pdata["VERSION"] = [self.readElementText()] |
76 self.project.pdata["VERSION"] = [self.readElementText()] |
73 elif self.name() == "Author": |
77 elif self.name() == "Author": |
74 self.project.pdata["AUTHOR"] = [self.readElementText()] |
78 self.project.pdata["AUTHOR"] = [self.readElementText()] |
75 elif self.name() == "Email": |
79 elif self.name() == "Email": |
79 [Utilities.toNativeSeparators(self.readElementText())] |
83 [Utilities.toNativeSeparators(self.readElementText())] |
80 elif self.name() == "TranslationsBinPath": |
84 elif self.name() == "TranslationsBinPath": |
81 self.project.pdata["TRANSLATIONSBINPATH"] = \ |
85 self.project.pdata["TRANSLATIONSBINPATH"] = \ |
82 [Utilities.toNativeSeparators(self.readElementText())] |
86 [Utilities.toNativeSeparators(self.readElementText())] |
83 elif self.name() == "Eol": |
87 elif self.name() == "Eol": |
84 self.project.pdata["EOL"] = [int(self.attribute("index", "0"))] |
88 self.project.pdata["EOL"] = [ |
|
89 int(self.attribute("index", "0"))] |
85 elif self.name() == "Sources": |
90 elif self.name() == "Sources": |
86 self.__readFiles("Sources", "Source", "SOURCES") |
91 self.__readFiles("Sources", "Source", "SOURCES") |
87 elif self.name() == "Forms": |
92 elif self.name() == "Forms": |
88 self.__readFiles("Forms", "Form", "FORMS") |
93 self.__readFiles("Forms", "Form", "FORMS") |
89 elif self.name() == "Translations": |
94 elif self.name() == "Translations": |
90 self.__readFiles("Translations", "Translation", "TRANSLATIONS") |
95 self.__readFiles( |
|
96 "Translations", "Translation", "TRANSLATIONS") |
91 elif self.name() == "TranslationExceptions": |
97 elif self.name() == "TranslationExceptions": |
92 self.__readFiles("TranslationExceptions", "TranslationException", |
98 self.__readFiles( |
93 "TRANSLATIONEXCEPTIONS") |
99 "TranslationExceptions", "TranslationException", |
|
100 "TRANSLATIONEXCEPTIONS") |
94 elif self.name() == "Resources": |
101 elif self.name() == "Resources": |
95 self.__readFiles("Resources", "Resource", "RESOURCES") |
102 self.__readFiles("Resources", "Resource", "RESOURCES") |
96 elif self.name() == "Interfaces": |
103 elif self.name() == "Interfaces": |
97 self.__readFiles("Interfaces", "Interface", "INTERFACES") |
104 self.__readFiles("Interfaces", "Interface", "INTERFACES") |
98 elif self.name() == "Others": |
105 elif self.name() == "Others": |