Project

General

Profile

« Previous | Next » 

Revision 3bf355d6

Added by Andreas Müller almost 9 years ago

I18n for bulkeditor type #4553

View differences:

.gitattributes
47 47
eu.etaxonomy.taxeditor.bulkeditor/META-INF/MANIFEST.MF -text
48 48
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle.properties -text
49 49
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/bundle_de.properties -text
50
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties -text
51
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties -text
50 52
eu.etaxonomy.taxeditor.bulkeditor/build.properties -text
51 53
eu.etaxonomy.taxeditor.bulkeditor/icons/merge_candidate.gif -text
52 54
eu.etaxonomy.taxeditor.bulkeditor/icons/merge_target.gif -text
......
96 98
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/AgentEditorInput.java -text
97 99
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/BulkEditorInputType.java -text
98 100
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/GroupEditorInput.java -text
101
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java -text
99 102
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameEditorInput.java -text
100 103
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/NameRelationshipEditorInput.java -text
101 104
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/OccurrenceEditorInput.java -text
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages.properties
1
BulkEditorInputType_0=Person and Team
2
BulkEditorInputType_1=Reference
3
BulkEditorInputType_2=Name
4
BulkEditorInputType_3=Name Relationship
5
BulkEditorInputType_4=Specimen and Observation
6
BulkEditorInputType_5=User
7
BulkEditorInputType_6=Group
8
BulkEditorInputType_7=Taxon
eu.etaxonomy.taxeditor.bulkeditor/OSGI-INF/l10n/messages_de.properties
1
BulkEditorInputType_0=Person und Team 
2
BulkEditorInputType_1=Referenz
3
BulkEditorInputType_2=Name
4
BulkEditorInputType_3=Namensbeziehung
5
BulkEditorInputType_4=Beleg und Beobachtung
6
BulkEditorInputType_5=Nutzer
7
BulkEditorInputType_6=Nutzergruppe
8
BulkEditorInputType_7=Taxon
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/BulkEditorInputType.java
1 1
package eu.etaxonomy.taxeditor.bulkeditor.input;
2 2

  
3 3
import java.util.HashMap;
4
import java.util.Locale;
4 5
import java.util.Map;
6
import java.util.ResourceBundle;
5 7

  
6 8
import org.eclipse.jface.action.IContributionItem;
7 9
import org.eclipse.swt.SWT;
......
26 28
import eu.etaxonomy.cdm.model.reference.Reference;
27 29
import eu.etaxonomy.cdm.model.taxon.Taxon;
28 30
import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
31
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
32
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
29 33

  
30 34
public enum BulkEditorInputType {
31
	AGENT("Authors and Author Teams", AgentEditorInput.ID), 
32
	REFERENCE("Reference", ReferenceEditorInput.ID), 
33
	NAME("Name", NameEditorInput.ID), 
34
	NAME_RELATIONSHIP("Name Relationship", NameRelationshipEditorInput.ID), 
35
	OCCURRENCE("Specimens and Observations", OccurrenceEditorInput.ID), 
36
	USER("User", UserEditorInput.ID), 
37
	GROUP("Group", GroupEditorInput.ID),
38
	TAXON("Taxon", TaxonEditorInput.ID);
35
	AGENT(Messages.BulkEditorInputType_0, AgentEditorInput.ID), 
36
	REFERENCE(Messages.BulkEditorInputType_1, ReferenceEditorInput.ID), 
37
	NAME(Messages.BulkEditorInputType_2, NameEditorInput.ID), 
38
	NAME_RELATIONSHIP(Messages.BulkEditorInputType_3, NameRelationshipEditorInput.ID), 
39
	OCCURRENCE(Messages.BulkEditorInputType_4, OccurrenceEditorInput.ID), 
40
	USER(Messages.BulkEditorInputType_5, UserEditorInput.ID), 
41
	GROUP(Messages.BulkEditorInputType_6, GroupEditorInput.ID),
42
	TAXON(Messages.BulkEditorInputType_7, TaxonEditorInput.ID);
39 43

  
40 44
	public String id;
41 45
	public String label;
46
	public ResourceBundle resourceBundle; 
42 47

  
43 48
	BulkEditorInputType(String label, String id) {
44 49
		this.id = id;
......
143 148
			return new TaxonEditorInput();
144 149
		default:
145 150
			throw new IllegalStateException(
146
					"No input class for the given input type defined.");
151
					"No input class for the given input type defined."); //$NON-NLS-1$
147 152
		}
148 153
	}
149 154
	
......
168 173
			return ITaxonService.class;
169 174
		default:
170 175
			throw new IllegalStateException(
171
					"No input class for the given input type defined.");
176
					"No input class for the given input type defined."); //$NON-NLS-1$
172 177
		}
173 178
	}
174 179
}
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/Messages.java
1
package eu.etaxonomy.taxeditor.bulkeditor.input;
2

  
3
import org.eclipse.osgi.util.NLS;
4

  
5
public class Messages extends NLS {
6
	private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
7
	public static String BulkEditorInputType_0;
8
	public static String BulkEditorInputType_1;
9
	public static String BulkEditorInputType_2;
10
	public static String BulkEditorInputType_3;
11
	public static String BulkEditorInputType_4;
12
	public static String BulkEditorInputType_5;
13
	public static String BulkEditorInputType_6;
14
	public static String BulkEditorInputType_7;
15
	static {
16
		// initialize resource bundle
17
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
18
	}
19

  
20
	private Messages() {
21
	}
22
}

Also available in: Unified diff