explanationList
This commit is contained in:
		
							parent
							
								
									964dc3f788
								
							
						
					
					
						commit
						ad83665b0d
					
				| @ -153,7 +153,6 @@ def export_translation(doc, translation): | |||||||
|     explanationList = doc.createElement("explanationList") |     explanationList = doc.createElement("explanationList") | ||||||
| 
 | 
 | ||||||
|     for explanation in translation.explanationList: |     for explanation in translation.explanationList: | ||||||
|         console.log(explanation) |  | ||||||
|         el = doc.createElement("explanation") |         el = doc.createElement("explanation") | ||||||
|         el.textContent = explanation |         el.textContent = explanation | ||||||
|         explanationList.appendChild(el) |         explanationList.appendChild(el) | ||||||
|  | |||||||
| @ -13,7 +13,8 @@ class EditTranslation(DataChgClickMessage): | |||||||
|         self.old_cluster_idx = self.get_arg(1, int) |         self.old_cluster_idx = self.get_arg(1, int) | ||||||
| 
 | 
 | ||||||
|         self.translation.translation = document.getElementById("etv").value |         self.translation.translation = document.getElementById("etv").value | ||||||
|         self.translation.explanation = document.getElementById("ete").value | #         This could be dangerous if generic_list_getter is getting data from any other list as well. | ||||||
|  |         self.translation.explanationList = common_accessors.generic_list_getter() | ||||||
| 
 | 
 | ||||||
|         # common_accessors.label_list_getter() |         # common_accessors.label_list_getter() | ||||||
|         self.translation.tags = common_accessors.label_list_getter() |         self.translation.tags = common_accessors.label_list_getter() | ||||||
|  | |||||||
| @ -19,10 +19,9 @@ def edit_translation(translation, parent, cluster_idx, num_clusters, cls): | |||||||
| 
 | 
 | ||||||
|     # first line: transalation itself |     # first line: transalation itself | ||||||
|     content.extend([ |     content.extend([ | ||||||
|         split_line2("Prevedek:", |         split_line2("Prevedek:", h("textarea#etv", {"props": {"value": translation.translation}}, ""))]) | ||||||
|                     h("textarea#etv", {"props": {"value": translation.translation}}, "")), | 
 | ||||||
|         split_line2("Razlaga:", |     content.extend(generic_list_editor("Razlage:", lambda: translation.explanationList)) | ||||||
|                     h("textarea#ete", {"props": {"value": translation.explanation}}, ""))]) |  | ||||||
| 
 | 
 | ||||||
|     # cluster number |     # cluster number | ||||||
|     options = [h("option", {"props": {"selected": idx == cluster_idx}}, str(idx + 1)) for idx in range(num_clusters + 1)] |     options = [h("option", {"props": {"selected": idx == cluster_idx}}, str(idx + 1)) for idx in range(num_clusters + 1)] | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user