Revision f9fbd38a
Added by Patrick Plitzner about 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java | ||
---|---|---|
31 | 31 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
32 | 32 |
import eu.etaxonomy.cdm.model.name.TypeDesignationBase; |
33 | 33 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
34 |
import eu.etaxonomy.taxeditor.l10n.Messages; |
|
34 | 35 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
35 | 36 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
36 | 37 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
... | ... | |
53 | 54 |
|
54 | 55 |
public TypeDesignationSection(CdmFormFactory formFactory, ConversationHolder conversation, |
55 | 56 |
ICdmFormElement parentElement, int style) { |
56 |
super(formFactory, conversation, parentElement, "Type Designations", style);
|
|
57 |
super(formFactory, conversation, parentElement, Messages.TypeDesignationSection_TYPE_DESIGNATIONS, style);
|
|
57 | 58 |
} |
58 | 59 |
|
59 | 60 |
@Override |
... | ... | |
63 | 64 |
|| getEntity().getTypeDesignations().stream().noneMatch(designation->designation instanceof SpecimenTypeDesignation)){ |
64 | 65 |
return; |
65 | 66 |
} |
66 |
Action addAction = new Action("Create type duplicate", IAction.AS_PUSH_BUTTON){
|
|
67 |
Action addAction = new Action(Messages.TypeDesignationSection_CREATE_DUPLICATE, IAction.AS_PUSH_BUTTON){
|
|
67 | 68 |
@Override |
68 | 69 |
public void run() { |
69 | 70 |
CloneTypeWizard wizard = new CloneTypeWizard(getEntity()); |
... | ... | |
78 | 79 |
wizard.getCollection(), |
79 | 80 |
wizard.getTypeStatus()); |
80 | 81 |
if(!result.isOk()){ |
81 |
MessagingUtils.warningDialog("Duplicating type failed", this, result.getExceptions().toString());
|
|
82 |
MessagingUtils.warningDialog(Messages.TypeDesignationSection_DUPLICATE_FAILED, this, result.getExceptions().toString());
|
|
82 | 83 |
} |
83 | 84 |
StoreUtil.reflowParentScrolledForm(getLayoutComposite(), true); |
84 | 85 |
internalUpdateSection(true); |
... | ... | |
92 | 93 |
return ImageResources.getImage(ImageResources.COPY_ICON).getImageData(); |
93 | 94 |
} |
94 | 95 |
}); |
95 |
addAction.setToolTipText("Create type duplicate");
|
|
96 |
addAction.setToolTipText(Messages.TypeDesignationSection_CREATE_DUPLICATE);
|
|
96 | 97 |
|
97 | 98 |
toolBarManager.add(addAction); |
98 | 99 |
} |
... | ... | |
126 | 127 |
|
127 | 128 |
@Override |
128 | 129 |
public String getEmptyString() { |
129 |
return "No type designations yet.";
|
|
130 |
return Messages.TypeDesignationSection_NO_TYPES_YET;
|
|
130 | 131 |
} |
131 | 132 |
|
132 | 133 |
@Override |
133 | 134 |
protected String getTooltipString() { |
134 |
return "Add a type designation";
|
|
135 |
return Messages.TypeDesignationSection_ADD_TYPE;
|
|
135 | 136 |
} |
136 | 137 |
|
137 | 138 |
@Override |
Also available in: Unified diff
ref #6413 i18n