Use a single data field for gitlab repos
offlate/systems/git.py
55 | 55 | os.remove(self.basedir + "/old") | |
56 | 56 | ||
57 | 57 | def send(self, interface): | |
58 | - | pass | |
58 | + | raise Exception("Unimplemented method in concrete class: send") | |
59 | 59 | ||
60 | 60 | def save(self): | |
61 | - | pass | |
61 | + | raise Exception("Unimplemented method in concrete class: save") | |
62 | 62 | ||
63 | 63 | def content(self): | |
64 | 64 | return {'default': []} |
offlate/systems/gitlab.py
22 | 22 | GitProject.__init__(self, conf, name, lang, data) | |
23 | 23 | ||
24 | 24 | def updateURI(self): | |
25 | - | self.uri = self.data['site'] + "/" + self.data['project'] + ".git" | |
25 | + | self.uri = self.data['repo'] |
offlate/ui/new.py
100 | 100 | 'widget': self.transifexOrganisation}) | |
101 | 101 | ||
102 | 102 | # Gitlab | |
103 | - | self.gitlabSite = QLineEdit() | |
104 | - | self.gitlabSite.textChanged.connect(self.modify) | |
105 | - | gitlabSiteLabel = QLabel(self.tr('hosting website')) | |
106 | - | self.additionalFields[GITLAB].append({'label': gitlabSiteLabel, | |
107 | - | 'widget': self.gitlabSite}) | |
108 | - | self.gitlabProject = QLineEdit() | |
109 | - | self.gitlabProject.textChanged.connect(self.modify) | |
110 | - | gitlabProjectLabel = QLabel(self.tr('project part')) | |
111 | - | self.additionalFields[GITLAB].append({'label': gitlabProjectLabel, | |
112 | - | 'widget': self.gitlabProject}) | |
113 | - | self.gitlabFileTypeCombo = QComboBox() | |
114 | - | self.gitlabFileTypeCombo.addItem(format_list[0]) | |
115 | - | self.gitlabFileTypeCombo.addItem(format_list[1]) | |
116 | - | self.gitlabFileTypeCombo.addItem(format_list[2]) | |
117 | - | self.gitlabFileTypeCombo.currentIndexChanged.connect(self.modify) | |
118 | - | gitlabFileTypeLabel = QLabel(self.tr('Translation type')) | |
119 | - | self.additionalFields[GITLAB].append({'label': gitlabFileTypeLabel, | |
120 | - | 'widget': self.gitlabFileTypeCombo}) | |
121 | - | self.gitlabLocations = MultipleLineEdit() | |
122 | - | self.gitlabLocations.textChanged.connect(self.modify) | |
123 | - | gitlabLocationsLabel = QLabel(self.tr('Locations')) | |
124 | - | self.additionalFields[GITLAB].append({'label': gitlabLocationsLabel, | |
125 | - | 'widget': self.gitlabLocations}) | |
103 | + | self.gitlabRepo = QLineEdit() | |
104 | + | self.gitlabRepo.textChanged.connect(self.modify) | |
105 | + | gitlabRepoLabel = QLabel(self.tr('repository')) | |
106 | + | self.additionalFields[GITLAB].append({'label': gitlabRepoLabel, | |
107 | + | 'widget': self.gitlabRepo}) | |
126 | 108 | if self.system == GITLAB: | |
127 | - | self.gitlabSite.setText(self.info['site']) | |
128 | - | self.gitlabProject.setText(self.info['project']) | |
129 | - | self.gitlabFileTypeCombo.setCurrentIndex(self.info['format']) | |
130 | - | self.gitlabLocations.setText(self.info['locations']) | |
109 | + | self.gitlabRepo.setText(self.info['repo']) | |
131 | 110 | ||
132 | 111 | self.setLayout(hbox) | |
133 | 112 | ||
… | |||
150 | 129 | if data['system'] == TRANSIFEX: | |
151 | 130 | self.transifexOrganisation.setText(data['organisation']) | |
152 | 131 | if data['system'] == GITLAB: | |
153 | - | self.gitlabSite.setText(data['site']) | |
154 | - | self.gitlabProject.setText(data['project']) | |
155 | - | self.gitlabFileTypeCombo.setCurrentIndex(data['format']) | |
156 | - | self.gitlabLocations.setText(data['locations']) | |
132 | + | self.gitlabRepo.setText(data['repo']) | |
157 | 133 | ||
158 | 134 | def filter(self): | |
159 | 135 | search = self.searchfield.text() |