Project

General

Profile

« Previous | Next » 

Revision 150b624d

Added by Patrick Plitzner about 7 years ago

ref #4611 complete i18n for taxeditor.editor plugin

  • also created l10n package and moved Messages.java and teh messages.properties files there

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementDropAdapter.java
20 20
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
21 21
import eu.etaxonomy.cdm.model.description.TaxonDescription;
22 22
import eu.etaxonomy.taxeditor.editor.EditorUtil;
23
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
23 24
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionElementsOperation;
24 25
import eu.etaxonomy.taxeditor.model.MessagingUtils;
25 26
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
......
31 32
 */
32 33
public class DescriptionElementDropAdapter extends ViewerDropAdapter {
33 34

  
34
	/**
35
    private static final String OPERATION_NOT_SUPPORTED_YET = Messages.DescriptionElementDropAdapter_NOT_SUPPORTED;
36

  
37
    /**
35 38
	 * @param viewer
36 39
	 */
37 40
	public DescriptionElementDropAdapter(Viewer viewer) {
......
54 57
		if (droppedElements != null){
55 58
			for (Object droppedElement : droppedElements) {
56 59
				if (droppedElement == null){
57
					MessagingUtils.warningDialog("Operation not supported yet", this, "We are currently unable to drag and drop a newly created element. Please save the editor to make this work.");
60
					MessagingUtils.warningDialog(OPERATION_NOT_SUPPORTED_YET, this, Messages.DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT);
58 61
					return false;
59 62
				}
60 63
				if(! (droppedElement instanceof DescriptionElementBase)){
......
70 73
				}
71 74
			}
72 75

  
73
			AbstractPostOperation operation = new MoveDescriptionElementsOperation("Move Descriptions", EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
76
			AbstractPostOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
74 77

  
75 78
			EditorUtil.executeOperation(operation);
76 79
			return true;
77 80
		}
78
		MessagingUtils.warningDialog("Operation not supported yet", this, "We are unable to drag and drop empty descriptions");
81
		MessagingUtils.warningDialog(OPERATION_NOT_SUPPORTED_YET, this, Messages.DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT);
79 82

  
80 83
		return false;
81 84

  

Also available in: Unified diff