Example #1
0
    def extractTxt(self, lang):
        current_menup = Parser(
            resourceManager.getResource(self.langdir + '/' + lang + '.var'))
        data = current_menup.get()  # lista di coppie es: MN_PLAY gioca

        #ciclo per l associazione dei titoli
        for coppia in data:
            for menu in self.current_menu:
                for index, value in enumerate(self.current_menu[menu]):
                    if coppia[0] == value:
                        self.current_menu[menu][index] = coppia[1]

        versionM = Parser(
            resourceManager.getResource("config/" + self.pc_name +
                                        "Config.var"))
        data2 = versionM.get()

        for coppia in data2:
            for menu in self.current_menu:
                for index, value in enumerate(self.current_menu[menu]):
                    if coppia[0] == value:
                        self.current_menu[menu][index] = coppia[1]
Example #2
0
 def extractText(self, key):
     fileLoaded = Parser(key)
     data = fileLoaded.get()  # list of couples
     return data