gitlab: Fix creating new projects
offlate/systems/gitlab.py
| 90 | 90 | @staticmethod | |
| 91 | 91 | def getProjectConfigSpec(): | |
| 92 | 92 | return [StringConfigSpec('repo', Project.tr('Repository'), | |
| 93 | - | Project.tr('Full clone URL for the repository'), | |
| 94 | - | Project.tr('https://...')), | |
| 93 | + | Project.tr('Full clone URL for the repository'), | |
| 94 | + | 'https://...'), | |
| 95 | 95 | StringConfigSpec('branch', Project.tr('Branch'), | |
| 96 | 96 | Project.tr('Name of the branch to translate'), | |
| 97 | 97 | Project.tr('master'))] | |
… | |||
| 108 | 108 | [ | |
| 109 | 109 | StringConfigSpec('server', Project.tr('Server'), | |
| 110 | 110 | Project.tr('Server name'), | |
| 111 | - | placeholder = Project.tr('https://gitlab.com')), | |
| 111 | + | placeholder = 'gitlab.com'), | |
| 112 | 112 | StringConfigSpec('token', Project.tr('Token'), | |
| 113 | 113 | Project.tr('The token you created from your account'), | |
| 114 | - | placeholder = Project.tr('Lynid8y56urst-TdlUs6')) | |
| 114 | + | placeholder = 'Lynid8y56urst-TdlUs6') | |
| 115 | 115 | ], | |
| 116 | 116 | 'server', | |
| 117 | 117 | GitlabProject.hasRequiredRow)) | |
… | |||
| 123 | 123 | Method used by the configuration system: it checks that the configuration | |
| 124 | 124 | refers to a server whose configuration is valid. | |
| 125 | 125 | """ | |
| 126 | - | server = urlparse(self.uri).hostname | |
| 126 | + | server = urlparse(conf['repo']).hostname | |
| 127 | 127 | ||
| 128 | 128 | for serv in servers: | |
| 129 | 129 | if serv["server"] == server: | |