l10n for PresenceAbsenceTermDetailElement
authorPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 24 Nov 2016 13:50:50 +0000 (14:50 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Thu, 24 Nov 2016 13:50:50 +0000 (14:50 +0100)
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/PresenceAbsenceTermDetailElement.java

index 852c474b78a3ee81bcf1e751317a2fbed37caac9..93bb1a95fd2538781bb03c1f29a420735977dedd 100644 (file)
@@ -115,4 +115,8 @@ SupplementalDataViewPart_VIEWER_NAME=Supplemental Data
 DetailsViewPart_VIEWER_NAME=Details
 
 AuthenticatedUserBar_LOGGED_IN_AS=Logged in as: %s         
-AuthenticatedUserBar_NOT_LOGGED_IN=Not logged in              
+AuthenticatedUserBar_NOT_LOGGED_IN=Not logged in   
+
+PresenceAbsenceTermDetailElement_CHOOSE_COLOR=Choose color
+PresenceAbsenceTermDetailElement_COLOR_NOT_SET=Color could not be set
+PresenceAbsenceTermDetailElement_LABEL_COLOR=Color           
index fd18c2e36c32cbac5c1ae1c40a7c70ce70fad1c0..88ae30acd523366944a6b108012fc2e29e17dc0c 100644 (file)
@@ -115,4 +115,8 @@ SupplementalDataViewPart_VIEWER_NAME=Zusatzdaten
 DetailsViewPart_VIEWER_NAME=Details
 
 AuthenticatedUserBar_LOGGED_IN_AS=Angemeldet als: %s         
-AuthenticatedUserBar_NOT_LOGGED_IN=Nicht angemeldet              
+AuthenticatedUserBar_NOT_LOGGED_IN=Nicht angemeldet     
+         
+PresenceAbsenceTermDetailElement_CHOOSE_COLOR=Farbe w√§hlen
+PresenceAbsenceTermDetailElement_COLOR_NOT_SET=Farbe konnte nicht gespeichert werden
+PresenceAbsenceTermDetailElement_LABEL_COLOR=Farbe
index ed80b87bcf0c80914726c334e105911e9bd083fa..3756992783d5fb4be9366dff6a7fbc44ffb4b09f 100644 (file)
@@ -84,6 +84,9 @@ public class Messages extends NLS {
     public static String PasswordWizardPage_PASSWORD_MIN_CHARACTER;
     public static String PasswordWizardPage_PASSWORDS_DO_NOT_MATCH;
     public static String PasswordWizardPage_REPEAT_PASSWORD;
+    public static String PresenceAbsenceTermDetailElement_CHOOSE_COLOR;
+    public static String PresenceAbsenceTermDetailElement_COLOR_NOT_SET;
+    public static String PresenceAbsenceTermDetailElement_LABEL_COLOR;
     public static String RemotingLoginDialog_CHOOSE_COMPATIBLE_CDM_SERVER;
        public static String RemotingLoginDialog_LABEL_ADVANCED;
        public static String RemotingLoginDialog_LABEL_CDM_INSTANCE;
index 08f6dc43f7b6faf3aa9db649402bb926521f2e16..5b6bfe095c954cf9ebf034136d99f4b1e855233e 100644 (file)
@@ -26,6 +26,7 @@ import org.eclipse.ui.forms.widgets.TableWrapData;
 
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
+import eu.etaxonomy.taxeditor.Messages;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
@@ -58,7 +59,7 @@ public class PresenceAbsenceTermDetailElement extends DefinedTermDetailElement<P
            super.createControls(formElement, entity, style);
 
            Label colorTextLabel = new Label(getLayoutComposite(), style);
-           colorTextLabel.setText("Color");
+           colorTextLabel.setText(Messages.PresenceAbsenceTermDetailElement_LABEL_COLOR);
            TableWrapData left = LayoutConstants.LEFT();
            left.valign = TableWrapData.MIDDLE;
            colorTextLabel.setLayoutData(left);
@@ -77,7 +78,7 @@ public class PresenceAbsenceTermDetailElement extends DefinedTermDetailElement<P
         String defaultColor = entity.getDefaultColor();
         if(defaultColor!=null){
             //TODO: Is there any utility method from SWT?
-            java.awt.Color awtColor = java.awt.Color.decode("#"+defaultColor);
+            java.awt.Color awtColor = java.awt.Color.decode("#"+defaultColor); //$NON-NLS-1$
             RGB rgb = new RGB(awtColor.getRed(), awtColor.getGreen(), awtColor.getBlue());
             color = new Color(AbstractUtility.getShell().getDisplay(), rgb);
             colorLabel.setBackground(color);
@@ -86,7 +87,7 @@ public class PresenceAbsenceTermDetailElement extends DefinedTermDetailElement<P
         //button
         btnColorChooser = formFactory.createButton(colorAndButton, "", SWT.NONE); //$NON-NLS-1$
         btnColorChooser.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
-        btnColorChooser.setToolTipText("Choose color");
+        btnColorChooser.setToolTipText(Messages.PresenceAbsenceTermDetailElement_CHOOSE_COLOR);
         btnColorChooser.addSelectionListener(this);
        }
 
@@ -117,10 +118,10 @@ public class PresenceAbsenceTermDetailElement extends DefinedTermDetailElement<P
             color = new Color(AbstractUtility.getShell().getDisplay(), rgb);
             colorLabel.setBackground(color);
             try {
-                String hexCode = String.format("%02x%02x%02x", rgb.red,rgb.green,rgb.blue);
+                String hexCode = String.format("%02x%02x%02x", rgb.red,rgb.green,rgb.blue); //$NON-NLS-1$
                 getEntity().setDefaultColor(hexCode);
             } catch (ParseException pe) {
-                MessagingUtils.error(PresenceAbsenceTermDetailElement.class, "Color could not be set", pe);
+                MessagingUtils.error(PresenceAbsenceTermDetailElement.class, Messages.PresenceAbsenceTermDetailElement_COLOR_NOT_SET, pe);
             }
         }
         firePropertyChangeEvent(new CdmPropertyChangeEvent(this, e));