Externalize strings
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / UriWithLabelElement.java
index 02b61f5412b4e93561abcf8f35b0add06243798e..31486b409b4788876b0f697593e6c9dc7a7dbf6d 100644 (file)
@@ -17,6 +17,8 @@ import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 
+import eu.etaxonomy.taxeditor.Messages;
+
 /**
  * @author n.hoffmann
  * @created Dec 20, 2010
@@ -31,7 +33,7 @@ public class UriWithLabelElement extends TextWithLabelElement {
                        URI initialUri, Integer textHeight, int style) {
                super(formFactory, parentElement, labelString, null, textHeight, style);
 
-               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP);
+               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP); //$NON-NLS-1$
                labelException.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
                addControl(labelException);
                setUri(initialUri);
@@ -47,12 +49,12 @@ public class UriWithLabelElement extends TextWithLabelElement {
         try {
             labelException.setFont(JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT));
             labelException.setForeground(getPersistentBackground());
-            labelException.setText("");
+            labelException.setText(""); //$NON-NLS-1$
             return new URI(super.getText());
         } catch (Exception e) {
             labelException.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT));
             labelException.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
-            labelException.setText("URL won't be saved! "+e.getMessage());
+            labelException.setText(Messages.UriWithLabelElement_URL_NOT_SAVED+e.getMessage());
             return null;
         }
        }