Get application version from manager in git systems

Julien LepillerSun Aug 25 12:08:33+0200 2019

ddace90

Get application version from manager in git systems

offlate/manager.py

7979
        projectpath = self.basedir + '/' + name
8080
        Path(projectpath).mkdir(parents=True)
8181
        try:
82+
            data["version"] = "0.3"
8283
            proj = self.loadProject(name, lang, system, data)
8384
            proj.initialize(projectpath, callback)
84-
            data["version"] = "0.3"
8585
            self.projects.append({"name": name, "lang": lang, "system": system,
8686
                "info": data})
8787
        except UnsupportedFormatException:

offlate/systems/git.py

8383
                translationfiles.append({'filename': popath,
8484
                    'format': GettextFormat({'file': path + popath,
8585
                        'pot': path + potpath,
86-
                        'version': '0.1',
86+
                        'version': self.data['version'],
8787
                        'fullname': self.conf['fullname'],
8888
                        'lang': self.lang})})
8989
            elif resource['file_format'] == 'yaml':