Project

General

Profile

« Previous | Next » 

Revision 61c51c84

Added by Patrick Plitzner about 7 years ago

ref #4611 i18n for taxeditor.editor plugin

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateView.java
76 76
public class DerivateView extends EditorPart implements IPartContentHasFactualData, IConversationEnabled,
77 77
        ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
78 78
        IContextListener, ISelectionListener {
79
    public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"; //$NON-NLS-1$
79
    private static final String SPECIMEN_EDITOR = "Specimen Editor";
80

  
81
    public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView";
80 82

  
81 83
    public static final String YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION = Messages.DerivateView_YOU_NEED_TO_SAVE;
82 84
    public static final String VIEW_HAS_UNSAVED_CHANGES = Messages.DerivateView_UNSAVED_CHANGES;
......
323 325
            labelProvider.updateLabelCache(rootElements);
324 326
            viewer.setInput(rootElements);
325 327

  
326
            getEditorSite().getActionBars().getStatusLineManager().setMessage(rootElements.size() +" derivative hierarchies found");
328
            getEditorSite().getActionBars().getStatusLineManager().setMessage(String.format("%d derivative hierarchies found", rootElements.size()));
327 329

  
328 330
            //set selection to derivatives if the filter criteria
329 331
            //taxon assignment or derivative type are set
......
357 359
        conversation.commit(true);
358 360

  
359 361
        CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
360
        
362

  
361 363
        monitor.worked(1);
362 364

  
363 365
        this.setDirty(false);
......
558 560
                }
559 561
                checkWarnThreshold(uuids);
560 562
                updateRootEntities(uuids);
561
                setPartName("Derivative Editor: " + selectedTaxon.getName());
563
                setPartName(SPECIMEN_EDITOR+": " + selectedTaxon.getName());
562 564
            }
563 565
        }
564 566
    }
......
579 581

  
580 582
	private void checkWarnThreshold(Collection<UUID> uuids) {
581 583
		if(uuids!=null && uuids.size()>WARN_THRESHOLD){
582
			MessagingUtils.warningDialog("Performance warning", this.getClass(), String.format("Specimens will not be loaded!\n"
583
					+ "There are %d specimens associated with the current "
584
					+ "selection. If you really want to show all of them in the specimen editor please "
585
					+ "use the taxon filter in the search bar.", uuids.size()));
584
			MessagingUtils.warningDialog("Performance warning", this.getClass(), String.format("Specimens will not be loaded!\n There are %d specimens associated with the current selection. If you really want to show all of them in the specimen editor please use the taxon filter in the search bar.", uuids.size()));
586 585
			uuids.clear();
587 586
		}
588 587
	}
......
604 603
        derivateSearchCompositeController.setEnabled(!listenToSelectionChange);
605 604
        if(!listenToSelectionChange){
606 605
            selectedTaxon = null;
607
            setPartName("Derivative Editor");
606
            setPartName(SPECIMEN_EDITOR);
608 607
        }
609 608
        else if(selectedTaxon==null){
610
            setPartName("Derivative Editor [no taxon selected]");
609
            setPartName(SPECIMEN_EDITOR+" [no taxon selected]");
611 610
        }
612 611
    }
613 612

  

Also available in: Unified diff