Author: snjeza
Date: 2008-11-20 13:45:02 -0500 (Thu, 20 Nov 2008)
New Revision: 11925
Added:
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/plugin.properties
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/Messages.java
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/messages.properties
Modified:
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/build.properties
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java
Log:
JBIDE-3243 Internationalize the org.jboss.tools.xulrunner.initializer plugin
Modified: trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/META-INF/MANIFEST.MF
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/META-INF/MANIFEST.MF 2008-11-20
18:18:11 UTC (rev 11924)
+++
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/META-INF/MANIFEST.MF 2008-11-20
18:45:02 UTC (rev 11925)
@@ -1,8 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: XULRunner Initializer
+Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.xulrunner.initializer
Bundle-Version: 1.0.0
-Bundle-Vendor: Red Hat, Inc.
+Bundle-Vendor: %BundleVendor
Fragment-Host: org.eclipse.swt
Require-Bundle: org.eclipse.core.runtime
+Bundle-Localization: plugin
Modified: trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/build.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/build.properties 2008-11-20
18:18:11 UTC (rev 11924)
+++ trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/build.properties 2008-11-20
18:45:02 UTC (rev 11925)
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.properties
Added: trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/plugin.properties
(rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/plugin.properties 2008-11-20
18:45:02 UTC (rev 11925)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.xulrunner.initializer
+BundleVendor = JBoss, a division of Red Hat
+BundleName =XULRunner Initializer
\ No newline at end of file
Added:
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/Messages.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/Messages.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/Messages.java 2008-11-20
18:45:02 UTC (rev 11925)
@@ -0,0 +1,17 @@
+package org.eclipse.swt.browser;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.swt.browser.messages";
//$NON-NLS-1$
+ public static String XULRunnerInitializer_Bundle_doesnt_contain;
+ public static String XULRunnerInitializer_Bundle_is_not_found;
+ public static String XULRunnerInitializer_Cannot_get_path_to_XULRunner_from_bundle;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified:
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java 2008-11-20
18:18:11 UTC (rev 11924)
+++
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/XULRunnerInitializer.java 2008-11-20
18:45:02 UTC (rev 11925)
@@ -6,12 +6,13 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.util.NLS;
import org.osgi.framework.Bundle;
public class XULRunnerInitializer {
- private static final String XULRUNNER_PATH =
"org.eclipse.swt.browser.XULRunnerPath";
- private static final String XULRUNNER_ENTRY = "/xulrunner";
+ private static final String XULRUNNER_PATH =
"org.eclipse.swt.browser.XULRunnerPath"; //$NON-NLS-1$
+ private static final String XULRUNNER_ENTRY = "/xulrunner"; //$NON-NLS-1$
static {
String xulrunnerPath = System.getProperty(XULRUNNER_PATH);
@@ -22,20 +23,20 @@
}
}
if (xulrunnerPath == null) {
- String XULRUNNER_BUNDLE = (new StringBuffer("org.mozilla.xulrunner"))
- .append(".")
+ String XULRUNNER_BUNDLE = (new StringBuffer("org.mozilla.xulrunner"))
//$NON-NLS-1$
+ .append(".") //$NON-NLS-1$
.append(Platform.getWS())
- .append(".")
+ .append(".") //$NON-NLS-1$
.append(Platform.getOS())
- .append(Platform.OS_MACOSX.equals(Platform.getOS()) ? "" : (new
StringBuffer(".")).append(Platform.getOSArch()).toString())
+ .append(Platform.OS_MACOSX.equals(Platform.getOS()) ? "" : (new
StringBuffer(".")).append(Platform.getOSArch()).toString()) //$NON-NLS-1$
//$NON-NLS-2$
.toString();
Bundle xulRunnerBundle = Platform.getBundle(XULRUNNER_BUNDLE);
if (xulRunnerBundle == null) {
- System.out.println("Bundle " + XULRUNNER_BUNDLE + " is not
found.");
+ System.out.println(NLS.bind(Messages.XULRunnerInitializer_Bundle_is_not_found,
XULRUNNER_BUNDLE )); //$NON-NLS-2$
} else {
URL url = xulRunnerBundle.getEntry(XULRUNNER_ENTRY);
if (url == null) {
- System.out.println("Bundle " + XULRUNNER_BUNDLE + " doesn't
contain " + XULRUNNER_ENTRY);
+ System.out.println(NLS.bind(Messages.XULRunnerInitializer_Bundle_doesnt_contain, new
Object[] {XULRUNNER_BUNDLE,XULRUNNER_ENTRY})); //$NON-NLS-2$
} else {
File xulrunnerFile;
try {
@@ -45,7 +46,7 @@
xulrunnerPath = xulrunnerFile.getAbsolutePath();
System.setProperty(XULRUNNER_PATH, xulrunnerPath);
} catch (IOException ioe) {
- System.out.println("Cannot get path to XULRunner from bundle " +
XULRUNNER_BUNDLE);
+ System.out.println(NLS.bind(Messages.XULRunnerInitializer_Cannot_get_path_to_XULRunner_from_bundle,XULRUNNER_BUNDLE));
ioe.printStackTrace();
}
}
Added:
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/messages.properties
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/messages.properties
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.xulrunner.initializer/src/org/eclipse/swt/browser/messages.properties 2008-11-20
18:45:02 UTC (rev 11925)
@@ -0,0 +1,3 @@
+XULRunnerInitializer_Bundle_doesnt_contain=Bundle {0} doesn''t contain {1}.
+XULRunnerInitializer_Bundle_is_not_found=Bundle {0} is not found.
+XULRunnerInitializer_Cannot_get_path_to_XULRunner_from_bundle=Cannot get path to
XULRunner from bundle {0}.
Show replies by date