Update TP and git configuration needs
offlate/systems/git.py
| 87 | 87 | 'format': GettextFormat({'file': path + popath, | |
| 88 | 88 | 'pot': path + potpath, | |
| 89 | 89 | 'version': self.conf['offlate_version'], | |
| 90 | - | 'fullname': self.conf['fullname'], | |
| 90 | + | 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>', | |
| 91 | 91 | 'lang': self.lang})}) | |
| 92 | 92 | elif resource['file_format'] == 'yaml': | |
| 93 | 93 | yamlpath = resource['filemask'].replace('*', self.lang) |
offlate/systems/tp.py
| 102 | 102 | {'file': self.popath, | |
| 103 | 103 | 'pot': self.potpath, | |
| 104 | 104 | 'version': self.conf['offlate_version'], | |
| 105 | - | 'fullname': self.conf['fullname'], | |
| 105 | + | 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>', | |
| 106 | 106 | 'lang': self.lang}) | |
| 107 | 107 | content = GettextFormat( | |
| 108 | 108 | {'file': oldpath, | |
| 109 | 109 | 'pot': self.potpath, | |
| 110 | 110 | 'version': self.conf['offlate_version'], | |
| 111 | - | 'fullname': self.conf['fullname'], | |
| 111 | + | 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>', | |
| 112 | 112 | 'lang': self.lang}) | |
| 113 | 113 | newcontent.merge(content, askmerge) | |
| 114 | 114 | self.po = newcontent | |
… | |||
| 138 | 138 | {'file': self.popath, | |
| 139 | 139 | 'pot': self.potpath, | |
| 140 | 140 | 'version': self.conf['offlate_version'], | |
| 141 | - | 'fullname': self.conf['fullname'], | |
| 141 | + | 'fullname': self.conf['name'] + ' <' + self.conf['email'] + '>', | |
| 142 | 142 | 'lang': self.lang}) | |
| 143 | 143 | return {'default': self.po.content()} | |
| 144 | 144 | ||
| 145 | 145 | @staticmethod | |
| 146 | 146 | def isConfigured(conf): | |
| 147 | 147 | 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 | |
| 150 | 150 | res = res and 'server' in conf and conf['server'] != '' and \ | |
| 151 | 151 | conf['server'] != None | |
| 152 | 152 | res = res and 'user' in conf and conf['user'] != '' and \ | |
… | |||
| 167 | 167 | ||
| 168 | 168 | @staticmethod | |
| 169 | 169 | 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'), | |
| 179 | 171 | Project.tr('To send your work to the translation project on \ | |
| 180 | 172 | your behalf, we need to know the email server you are going to use (usually \ | |
| 181 | 173 | the part on the right of the `@` in your email address).'), | |