Update TP and git configuration needs

Julien LepillerSat Dec 12 21:53:56+0100 2020

2aa3398

Update TP and git configuration needs

offlate/systems/git.py

8787
                    'format': GettextFormat({'file': path + popath,
8888
                        'pot': path + potpath,
8989
                        'version': self.conf['offlate_version'],
90-
                        'fullname': self.conf['fullname'],
90+
                        'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>',
9191
                        'lang': self.lang})})
9292
            elif resource['file_format'] == 'yaml':
9393
                yamlpath = resource['filemask'].replace('*', self.lang)

offlate/systems/tp.py

102102
                {'file': self.popath,
103103
                 'pot': self.potpath,
104104
                 'version': self.conf['offlate_version'],
105-
                 'fullname': self.conf['fullname'],
105+
                 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>',
106106
                 'lang': self.lang})
107107
        content = GettextFormat(
108108
                {'file': oldpath,
109109
                 'pot': self.potpath,
110110
                 'version': self.conf['offlate_version'],
111-
                 'fullname': self.conf['fullname'],
111+
                 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>',
112112
                 'lang': self.lang})
113113
        newcontent.merge(content, askmerge)
114114
        self.po = newcontent

138138
                {'file': self.popath,
139139
                 'pot': self.potpath,
140140
                 'version': self.conf['offlate_version'],
141-
                 'fullname': self.conf['fullname'],
141+
                 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>',
142142
                 'lang': self.lang})
143143
        return {'default': self.po.content()}
144144
145145
    @staticmethod
146146
    def isConfigured(conf):
147147
        res = 'email' in conf and conf['email'] != '' and conf['email'] != None
148-
        res = res and 'fullname' in conf and conf['fullname'] != '' and \
149-
                conf['fullname'] != None
148+
        res = res and 'name' in conf and conf['name'] != '' and \
149+
                conf['name'] != None
150150
        res = res and 'server' in conf and conf['server'] != '' and \
151151
                conf['server'] != None
152152
        res = res and 'user' in conf and conf['user'] != '' and \

167167
168168
    @staticmethod
169169
    def getSystemConfigSpec():
170-
        return [StringConfigSpec('email', Project.tr('Your email address'),
171-
            Project.tr('This is saved in the file before sending it to the \
172-
translation project, for copyright assignment and the robot policy.'),
173-
            placeholder=Project.tr('john@example.com')),
174-
            StringConfigSpec('fullname', Project.tr('Your full name'),
175-
                Project.tr('This is saved in the file before sending it to the \
176-
translation project, for copyright assignment and used as Last-Translator.'),
177-
                placeholder=Project.tr("John Doe <john@example.com>")),
178-
            StringConfigSpec('server', Project.tr('Mail server'),
170+
        return [StringConfigSpec('server', Project.tr('Mail server'),
179171
                Project.tr('To send your work to the translation project on \
180172
your behalf, we need to know the email server you are going to use (usually \
181173
the part on the right of the `@` in your email address).'),