Externalize Strings
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 25 Aug 2015 06:36:27 +0000 (08:36 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 25 Aug 2015 06:36:51 +0000 (08:36 +0200)
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/element/UriWithLabelElement.java

index 3c21795a881653ad9f600e5db57caf48d5f776c0..f7a01268f93f05b428b927c4244e5289f704b165 100644 (file)
@@ -17,3 +17,6 @@ LanguageEditorPreferencePage_RestartRequired=After changing the default language
 OrderPreferencePage_NewNavigatorWindowRequired=After changing the order of the taxon nodes, closing and reopen of the taxon navigator is required.\r
 OrderPreferencePage_PleaseReopenNavigator=Please close and reopen the taxon navigator.\r
 UriWithLabelElement_URL_NOT_SAVED=URL won't be saved\! \r
+UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Could not open external browser. URL is invalid.\r
+UriWithLabelElement_INVALID_URL=Invalid URL\r
+UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Open in external browser\r
index d03d93e3212ec61a52ba2a967485ccbf75d2d28f..51409eb7ab32f33627d760f932108590391f33eb 100644 (file)
@@ -15,4 +15,7 @@ LanguageEditorPreferencePage_EditorHasToRestart=Der Anwendung muss neu gestartet
 LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten\r
 LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.\r
 OrderPreferencePage_NewNavigatorWindowRequired=Nach dem Ändern der Taxon Sortierung, ist das Schließen und erneute Öffnen des taxon Navigators erforderlich.\r
-UriWithLabelElement_URL_NOT_SAVED=URL wird nicht gespeichert\! 
\ No newline at end of file
+UriWithLabelElement_URL_NOT_SAVED=URL wird nicht gespeichert\!\r
+UriWithLabelElement_COULD_NOT_OPEN_BROWSER=Externer Browser konnt nicht geöffnet werden. URL is ung\u00FCtlig.\r
+UriWithLabelElement_INVALID_URL=Ung\u00FCltiger URL\r
+UriWithLabelElement_OPEN_EXTERNAL_BROWSER=Im Browser öffnen 
\ No newline at end of file
index b583632dc67d605b13f78c2873294140b1f4b386..0aa1e9c64bf59c75a92f0ac8e4439478b7219c74 100644 (file)
@@ -36,6 +36,9 @@ public class Messages extends NLS {
     public static String CdmDataSourceViewPart_7;
     public static String CdmDataSourceViewPart_8;
     public static String CdmDataSourceViewPart_9;
+    public static String UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
+    public static String UriWithLabelElement_INVALID_URL;
+    public static String UriWithLabelElement_OPEN_EXTERNAL_BROWSER;
     public static String UriWithLabelElement_URL_NOT_SAVED;
     static {
         // initialize resource bundle
index e7c1e2e7bcf37ee9deae59855b122b143ef26f6e..40a55fa89e2dedeffbd42715786802e66a2a43d4 100644 (file)
@@ -59,14 +59,14 @@ public class UriWithLabelElement extends TextWithLabelElement {
         initText(formFactory, null, textHeight, null, false, style, textAndButton);
 
         //button
-               btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE);
+               btnOpenBrowser = formFactory.createButton(textAndButton, "", SWT.NONE); //$NON-NLS-1$
                btnOpenBrowser.setImage(ImageResources.getImage(ImageResources.WEB));
-               btnOpenBrowser.setToolTipText("Open in external browser");
+               btnOpenBrowser.setToolTipText(Messages.UriWithLabelElement_OPEN_EXTERNAL_BROWSER);
                btnOpenBrowser.addSelectionListener(new SelectionAdapter() {
                    @Override
                    public void widgetSelected(SelectionEvent e) {
-                       String errorTitle = "Invalid URL";
-                       String errorText = "Could not open external browser. URL is invalid";
+                       String errorTitle = Messages.UriWithLabelElement_INVALID_URL;
+                       String errorText = Messages.UriWithLabelElement_COULD_NOT_OPEN_BROWSER;
 
                        URI uri = getUri();
                        if(uri!=null){
@@ -80,11 +80,14 @@ public class UriWithLabelElement extends TextWithLabelElement {
                         MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, iae));
                     }
                        }
+                       else{
+                           MessagingUtils.informationDialog(errorTitle, new Status(IStatus.WARNING, TaxeditorStorePlugin.PLUGIN_ID, errorText, null));
+                       }
                    }
         });
                btnOpenBrowser.setLayoutData(LayoutConstants.RIGHT());
 
-               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP);
+               labelException = formFactory.createLabel(getLayoutComposite(), "", SWT.WRAP); //$NON-NLS-1$
                int numColumns = AbstractFormSection.DEFAULT_NUM_COLUMNS;
                if(getLayoutComposite().getLayout() instanceof TableWrapLayout){
                    numColumns = ((TableWrapLayout)getLayoutComposite().getLayout()).numColumns;