Author: sflanigan
Date: 2009-04-07 21:27:43 -0400 (Tue, 07 Apr 2009)
New Revision: 14581
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/messages.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2xml/messages.properties
Log:
JBIDE-3557 Externalise English strings - converted some Eclipse message bundles to
new-style, replaced concatenated strings with NLS.bind() calls, marked apparently obsolete
messages as non-translatable.
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -21,19 +21,28 @@
SmooksGraphicalFormPage.TargetSelectLinkText=Target Select
SmooksNormalContentEditFormPage.ConfigurationPageText=Configuration Page
SmooksNormalContentEditFormPage.SmooksParseType=Other Configurations
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
SmooksResourceConfigFormBlock.BeanPopulator=BeanPopulator \:
+# END NON-TRANSLATABLE
SmooksResourceConfigFormBlock.DateType=Resource configurations
SmooksResourceConfigFormBlock.DeleteButton=Delete
SmooksResourceConfigFormBlock.DownButton=Down
SmooksResourceConfigFormBlock.NewButton=New
SmooksResourceConfigFormBlock.NULLString=<NULL>
SmooksResourceConfigFormBlock.TemplateFile=Template File:
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
SmooksResourceConfigFormBlock.UnknownResourceConfig=UnKnown ResourceConfig -
+# END NON-TRANSLATABLE
SmooksResourceConfigFormBlock.UpButton=Up
TypeIDSelectionWizard.TypeIDSelection=TypeID Selection
TypeIDSelectionWizardPage.NameColumn=Name
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
TypeIDSelectionWizardPage.SourceTypeIDTitle=Source Data Type ID List \:
TypeIDSelectionWizardPage.TargetTypeIDTitle=Target Data Type ID List \:
+# END NON-TRANSLATABLE
TypeIDSelectionWizardPage.TypeIDSelectionWizardPageDescription=Select the data type for
source/target data
TypeIDSelectionWizardPage.TypeIDSelectionWizardPageTitle=Select Source/Target Data Type
TypeIDSelectionWizardPage.WarningMessage=Please select the data type first
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -7,6 +7,7 @@
SmooksResourceChangeListener.ConverFileMsg2=\ already exists. Overwrite the file?
SmooksResourceChangeListener.CoverFile=Cover
# START NON-TRANSLATABLE
+# suspected OBSOLETE
SmooksResourceChangeListener.SmooksFileExtensionName=smooks
SmooksResourceChangeListener.SmooksGraphFileExtensionName=.graph
# END NON-TRANSLATABLE
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/Messages.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,23 +1,27 @@
-package org.jboss.tools.smooks.utils;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.utils.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-
-}
+package org.jboss.tools.smooks.utils;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.utils.messages";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ public static String UIUtils_ConnectAllConnections;
+ public static String UIUtils_ConnectNode;
+ public static String UIUtils_DisconnectAllConnections;
+ public static String UIUtils_InstanceClassResolveMessage1;
+ public static String UIUtils_InstanceClassResolveMessage2;
+ public static String UIUtils_InstanceLoadedErrorMessage;
+ public static String UIUtils_InstanceLoadedResolveMessage;
+ public static String UIUtils_JavaModelLoadedErrorMessage;
+ public static String UIUtils_ParentNodeConnectErrorMessage;
+ public static String UIUtils_SelectorCheckErrorMessage;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -147,8 +147,7 @@
if (selector.indexOf(splitString) != -1) {
throw new InvocationTargetException(
new Exception(
- NLS.bind(Messages
- .getString("UIUtils.SelectorCheckErrorMessage"), //$NON-NLS-1$
+ NLS.bind(Messages.UIUtils_SelectorCheckErrorMessage, //$NON-NLS-1$
splitString,
selector)));
}
@@ -275,10 +274,8 @@
context);
CompositeResolveCommand compositeCommand = new CompositeResolveCommand(
context);
- compositeCommand.setResolveDescription(Messages
- .getString("UIUtils.ConnectAllConnections")); //$NON-NLS-1$
- disconnectCommand.setResolveDescription(NLS.bind(Messages
- .getString("UIUtils.DisconnectAllConnections"), //$NON-NLS-1$
+ compositeCommand.setResolveDescription(Messages.UIUtils_ConnectAllConnections);
//$NON-NLS-1$
+ disconnectCommand.setResolveDescription(NLS.bind(Messages.UIUtils_DisconnectAllConnections,
//$NON-NLS-1$
currentNode.getName()));
AbstractStructuredDataModel targetNode = UIUtils.findGraphModel(root,
currentNode);
@@ -304,8 +301,7 @@
if (tempMap.get(sourceParentNode) == null) {
JavaModelConnectionResolveCommand connectParent = new
JavaModelConnectionResolveCommand(
context);
- String desc = NLS.bind(Messages
- .getString("UIUtils.ConnectNode"), //$NON-NLS-1$
+ String desc = NLS.bind(Messages.UIUtils_ConnectNode, //$NON-NLS-1$
context.getSourceViewerLabelProvider().getText(
sourceParent),
parentNode.getName());
@@ -351,8 +347,7 @@
if (pgm != null && pgm instanceof IConnectableModel) {
if (((IConnectableModel) pgm)
.getModelTargetConnections().isEmpty()) {
- String errorMessage = NLS.bind(Messages
- .getString("UIUtils.ParentNodeConnectErrorMessage"), //$NON-NLS-1$
+ String errorMessage = NLS.bind(Messages.UIUtils_ParentNodeConnectErrorMessage,
//$NON-NLS-1$
javaModel.getName(),
parent.getName());
DesignTimeAnalyzeResult dr = new DesignTimeAnalyzeResult();
@@ -398,15 +393,13 @@
if (instanceClazz == null) {
DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
result
- .setErrorMessage(NLS.bind(Messages
- .getString("UIUtils.InstanceLoadedErrorMessage"), //$NON-NLS-1$
+ .setErrorMessage(NLS.bind(Messages.UIUtils_InstanceLoadedErrorMessage,
//$NON-NLS-1$
((JavaBeanModel) refObj).getName(),
instanceName));
JavaModelResolveCommand command = new JavaModelResolveCommand(
context);
command
- .setResolveDescription(NLS.bind(Messages
- .getString("UIUtils.InstanceLoadedResolveMessage"), //$NON-NLS-1$
+ .setResolveDescription(NLS.bind(Messages.UIUtils_InstanceLoadedResolveMessage,
//$NON-NLS-1$
instanceName));
command.setInstanceName(instanceName);
command.setJavaBean((JavaBeanModel) refObj);
@@ -416,19 +409,16 @@
if (instanceClazz != null && instanceClazz.isInterface()) {
DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
result
- .setErrorMessage(NLS.bind(Messages
- .getString("UIUtils.JavaModelLoadedErrorMessage"), //$NON-NLS-1$
+ .setErrorMessage(NLS.bind(Messages.UIUtils_JavaModelLoadedErrorMessage,
//$NON-NLS-1$
((JavaBeanModel) refObj).getName(),
instanceName));
if (List.class.isAssignableFrom(instanceClazz)) {
JavaModelResolveCommand command = new JavaModelResolveCommand(
context);
command
- .setResolveDescription(Messages
- .getString("UIUtils.InstanceClassResolveMessage1")); //$NON-NLS-1$
+ .setResolveDescription(Messages.UIUtils_InstanceClassResolveMessage1);
//$NON-NLS-1$
command
- .setInstanceName(Messages
- .getString("UIUtils.InstanceClassResolveMessage2")); //$NON-NLS-1$
+ .setInstanceName(Messages.UIUtils_InstanceClassResolveMessage2); //$NON-NLS-1$
command.setJavaBean((JavaBeanModel) refObj);
result.addResolveCommand(command);
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,10 +1,10 @@
-UIUtils.ConnectAllConnections=Make all necessary connections
-UIUtils.ConnectNode=Connect the "{0}" to the "{1}"
-UIUtils.DisconnectAllConnections=Disconnect all connections of the current
"{0}"node
-UIUtils.InstanceClassResolveMessage1=Change the instance class to
"java.util.ArrayList"
-UIUtils.InstanceClassResolveMessage2=java.util.ArrayList
-UIUtils.InstanceLoadedErrorMessage=The instance class of "{0}" can not be
loaded. The instance name is "{1}"
-UIUtils.InstanceLoadedResolveMessage=Change the instance class to "{0}"
-UIUtils.JavaModelLoadedErrorMessage=Java model "{0}" can not be instantiated.
The instance name is "{1}"
-UIUtils.ParentNodeConnectErrorMessage=The parent of Java node "{0}" :
"{1}" is not connected to any source node
-UIUtils.SelectorCheckErrorMessage=The Selector string does not support "{0}"
character. Selector is "{1}"
+UIUtils_ConnectAllConnections=Make all necessary connections
+UIUtils_ConnectNode=Connect the "{0}" to the "{1}"
+UIUtils_DisconnectAllConnections=Disconnect all connections of the current
"{0}"node
+UIUtils_InstanceClassResolveMessage1=Change the instance class to
"java.util.ArrayList"
+UIUtils_InstanceClassResolveMessage2=java.util.ArrayList
+UIUtils_InstanceLoadedErrorMessage=The instance class of "{0}" can not be
loaded. The instance name is "{1}"
+UIUtils_InstanceLoadedResolveMessage=Change the instance class to "{0}"
+UIUtils_JavaModelLoadedErrorMessage=Java model "{0}" can not be instantiated.
The instance name is "{1}"
+UIUtils_ParentNodeConnectErrorMessage=The parent of Java node "{0}" :
"{1}" is not connected to any source node
+UIUtils_SelectorCheckErrorMessage=The Selector string does not support "{0}"
character. Selector is "{1}"
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -174,7 +174,7 @@
xsdComposite.setLayout(xsdLayout);
Label nfileLanel = new Label(xsdComposite, SWT.NONE);
- nfileLanel.setText(Messages.getString("AbstractFileSelectionWizardPage.XMLFilePathLabelText"));
//$NON-NLS-1$
+ nfileLanel.setText(Messages.AbstractFileSelectionWizardPage_XMLFilePathLabelText);
fileTextComposite = new Composite(xsdComposite, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.grabExcessHorizontalSpace = true;
@@ -223,10 +223,10 @@
browseButtonComposite.setLayout(bg);
fileSystemBrowseButton = new Button(browseButtonComposite, SWT.NONE);
- fileSystemBrowseButton.setText(Messages.getString("AbstractFileSelectionWizardPage.BrowseFileSystemButtonText"));
//$NON-NLS-1$
+ fileSystemBrowseButton.setText(Messages.AbstractFileSelectionWizardPage_BrowseFileSystemButtonText);
workspaceBrowseButton = new Button(browseButtonComposite, SWT.NONE);
- workspaceBrowseButton.setText(Messages.getString("AbstractFileSelectionWizardPage.BrowseWorkspaceButtonText"));
//$NON-NLS-1$
+ workspaceBrowseButton.setText(Messages.AbstractFileSelectionWizardPage_BrowseWorkspaceButtonText);
gd = new GridData();
gd.horizontalAlignment = GridData.END;
workspaceBrowseButton.setLayoutData(gd);
@@ -291,7 +291,7 @@
String text = this.fileText.getText();
String error = null;
if (text == null || "".equals(text)) //$NON-NLS-1$
- error = Messages.getString("AbstractFileSelectionWizardPage.Errormessage");
//$NON-NLS-1$
+ error = Messages.AbstractFileSelectionWizardPage_Errormessage;
// File tempFile = new File(text);
// if(!tempFile.exists()){
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/Messages.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/Messages.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,22 +1,21 @@
-package org.jboss.tools.smooks.xml;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.xml.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
+package org.jboss.tools.smooks.xml;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.xml.messages";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ public static String AbstractFileSelectionWizardPage_BrowseFileSystemButtonText;
+ public static String AbstractFileSelectionWizardPage_BrowseWorkspaceButtonText;
+ public static String AbstractFileSelectionWizardPage_Errormessage;
+ public static String AbstractFileSelectionWizardPage_XMLFilePathLabelText;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,4 +1,4 @@
-AbstractFileSelectionWizardPage.BrowseFileSystemButtonText=Browse File System...
-AbstractFileSelectionWizardPage.BrowseWorkspaceButtonText=Browse Workspace...
-AbstractFileSelectionWizardPage.Errormessage=Please select a file
-AbstractFileSelectionWizardPage.XMLFilePathLabelText=XML File Path:
+AbstractFileSelectionWizardPage_BrowseFileSystemButtonText=Browse File System...
+AbstractFileSelectionWizardPage_BrowseWorkspaceButtonText=Browse Workspace...
+AbstractFileSelectionWizardPage_Errormessage=Please select a file
+AbstractFileSelectionWizardPage_XMLFilePathLabelText=XML File Path:
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/Messages.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/Messages.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,22 +1,19 @@
-package org.jboss.tools.smooks.xml.ui;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.xml.ui.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
+package org.jboss.tools.smooks.xml.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.xml.ui.messages";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ public static String XMLStructuredDataWizardPage_XMLDataWizardPageDescription;
+ public static String XMLStructuredDataWizardPage_XMLDataWizardPageTitle;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/XMLStructuredDataWizardPage.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -20,8 +20,8 @@
}
private void setPageText() {
- this.setTitle(Messages.getString("XMLStructuredDataWizardPage.XMLDataWizardPageTitle"));
//$NON-NLS-1$
- this.setDescription(Messages.getString("XMLStructuredDataWizardPage.XMLDataWizardPageDescription"));
//$NON-NLS-1$
+ this.setTitle(Messages.XMLStructuredDataWizardPage_XMLDataWizardPageTitle);
+ this.setDescription(Messages.XMLStructuredDataWizardPage_XMLDataWizardPageDescription);
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/ui/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,2 +1,2 @@
-XMLStructuredDataWizardPage.XMLDataWizardPageDescription=Select a .xml file for
configuration data
-XMLStructuredDataWizardPage.XMLDataWizardPageTitle=Select a XML file
+XMLStructuredDataWizardPage_XMLDataWizardPageDescription=Select a .xml file for
configuration data
+XMLStructuredDataWizardPage_XMLDataWizardPageTitle=Select a XML file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/AbstractXMLModelAnalyzer.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -24,6 +24,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Path;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.smooks.analyzer.ISourceModelAnalyzer;
import org.jboss.tools.smooks.analyzer.ITargetModelAnalyzer;
import org.jboss.tools.smooks.graphical.GraphInformations;
@@ -49,9 +50,9 @@
public static final String WORKSPACE_PRIX = "Workspace:/"; //$NON-NLS-1$
- public static final String RESOURCE = "Resource:/";
+ public static final String RESOURCE = "Resource:/"; //$NON-NLS-1$
- public static final String XSL_NAMESPACE = "
xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" ";
+ public static final String XSL_NAMESPACE = "
xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" "; //$NON-NLS-1$
private String parmaKey = ""; //$NON-NLS-1$
@@ -77,14 +78,12 @@
} else {
throw new InvocationTargetException(
new Exception(
- Messages
- .getString("AbstractXMLModelAnalyzer.FileDosentExistErrorMessage1")
+ path +
Messages.getString("AbstractXMLModelAnalyzer.FileDosentExistErrorMessage2")));
//$NON-NLS-1$ //$NON-NLS-2$
+ NLS.bind(Messages.AbstractXMLModelAnalyzer_FileDosentExistErrorMessage, path)));
}
} else {
throw new InvocationTargetException(
new Exception(
- Messages
- .getString("AbstractXMLModelAnalyzer.IllegalPathErrorMessage1") +
path + ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ NLS.bind(Messages.AbstractXMLModelAnalyzer_IllegalPathErrorMessage, path)));
}
}
return path;
@@ -134,9 +133,9 @@
} else {
String sid = graphInfo.getMappingType().getSourceTypeID();
String tid = graphInfo.getMappingType().getTargetTypeID();
- if (sid.equals("org.jboss.tools.smooks.xml.viewerInitor.xml")
+ if (sid.equals("org.jboss.tools.smooks.xml.viewerInitor.xml") //$NON-NLS-1$
&& tid
- .equals("org.jboss.tools.smooks.xml.viewerInitor.xml")) {
+ .equals("org.jboss.tools.smooks.xml.viewerInitor.xml")) { //$NON-NLS-1$
List list = listType.getAbstractResourceConfig();
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
AbstractResourceConfig re = (AbstractResourceConfig) iterator
@@ -145,7 +144,7 @@
ResourceConfigType config = (ResourceConfigType) re;
ResourceType resource = config.getResource();
if (resource != null) {
- if ("xsl".equals(resource.getType())) {
+ if ("xsl".equals(resource.getType())) { //$NON-NLS-1$
String cdata = resource.getCDATAValue();
if (cdata != null) {
cdata = processXSLFragmentString(cdata);
@@ -157,8 +156,8 @@
cdata
.getBytes()),
new String[] {
- "value-of",
- "null_xsl" });
+ "value-of", //$NON-NLS-1$
+ "null_xsl" }); //$NON-NLS-1$
if (tag != null) {
if (viewer instanceof PropertyChangeListener) {
document
@@ -189,15 +188,15 @@
private String processXSLFragmentString(String cdata) {
// cdata = cdata.replaceAll(":", "-");
- int start_index = cdata.indexOf("<");
- int end_index = cdata.indexOf("/>");
+ int start_index = cdata.indexOf("<"); //$NON-NLS-1$
+ int end_index = cdata.indexOf("/>"); //$NON-NLS-1$
if (end_index == -1) {
- end_index = cdata.indexOf(">");
+ end_index = cdata.indexOf(">"); //$NON-NLS-1$
}
if (start_index == -1 || end_index == -1)
return cdata;
String contents = cdata.substring(start_index, end_index);
- if (
contents.indexOf("\"http://www.w3.org/1999/XSL/Transform\"... !=
-1) {
+ if (
contents.indexOf("\"http://www.w3.org/1999/XSL/Transform\"... !=
-1) { //$NON-NLS-1$
return cdata;
}
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/Messages.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/Messages.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/Messages.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,22 +1,23 @@
-package org.jboss.tools.smooks.xml2java.analyzer;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.xml2java.analyzer.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
+package org.jboss.tools.smooks.xml2java.analyzer;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME =
"org.jboss.tools.smooks.xml2java.analyzer.messages";//$NON-NLS-1$
+
+ private Messages() {
+ // Do not instantiate
+ }
+
+ public static String AbstractXMLModelAnalyzer_FileDosentExistErrorMessage;
+ public static String AbstractXMLModelAnalyzer_IllegalPathErrorMessage;
+ public static String XML2JavaAnalyzer_CantFindNodeErrorMessage;
+ public static String XML2JavaAnalyzer_CantFindRootNodeErrorMessage;
+ public static String XML2JavaAnalyzer_ConnectQDlgContent;
+ public static String XML2JavaAnalyzer_ConnectQDlgTitle;
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2009-04-08
01:27:43 UTC (rev 14581)
@@ -17,6 +17,7 @@
import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.analyzer.AbstractAnalyzer;
import org.jboss.tools.smooks.analyzer.DesignTimeAnalyzeResult;
@@ -349,8 +350,7 @@
// TODO if can't find the root , throw exception
// MODIFY by Dart 2008.11.17
throw new RuntimeException(
- Messages
- .getString("XML2JavaAnalyzer.CantFindRootNodeErrorMessage") + " :
" + selector); //$NON-NLS-1$
+ NLS.bind(Messages.XML2JavaAnalyzer_CantFindRootNodeErrorMessage, selector));
// return MappingResourceConfigList.createEmptyList();
}
JavaBeanModel target = findJavaBeanModel(((List) targetObject),
@@ -358,7 +358,7 @@
if (target == null) {
// TODO if can't find the root , throw exception
// MODIFY by Dart 2008.11.17
- String clazzName = SmooksModelUtils.getParmaText("beanClass",
+ String clazzName = SmooksModelUtils.getParmaText("beanClass",
//$NON-NLS-1$
resourceConfig);
if (clazzName != null)
throw new RuntimeException("Can't find the Java class"
@@ -380,7 +380,7 @@
JavaBeanModel bean = (JavaBeanModel) iterator.next();
Class clazz = bean.getBeanClass();
if (clazz != null) {
- String clazzName = SmooksModelUtils.getParmaText("beanClass",
+ String clazzName = SmooksModelUtils.getParmaText("beanClass",
//$NON-NLS-1$
resourceConfig);
if (clazzName != null)
clazzName = clazzName.trim();
@@ -473,7 +473,7 @@
String namespace = config.getSelectorNamespace();
if (namespace != null) {
PropertyModel np = new PropertyModel();
- np.setName("selector-namespace");
+ np.setName("selector-namespace"); //$NON-NLS-1$
np.setValue(namespace);
mapping.getProperties().add(np);
}
@@ -560,8 +560,7 @@
// TODO If can't find the element , throw exception
// MODIFY by Dart , 2008.11.07
throw new RuntimeException(
- Messages
- .getString("XML2JavaAnalyzer.CantFindNodeErrorMessage1") + newSelector
+ Messages.getString("XML2JavaAnalyzer.CantFindNodeErrorMessage2"));
//$NON-NLS-1$ //$NON-NLS-2$
+ NLS.bind(Messages.XML2JavaAnalyzer_CantFindNodeErrorMessage, newSelector));
}
createMappingResourceConfigList(configList, listType,
processingResourceConfig, newRoot, targetBean);
@@ -573,8 +572,7 @@
// TODO If can't find the element , throw exception
// MODIFY by Dart , 2008.11.07
throw new RuntimeException(
- Messages
- .getString("XML2JavaAnalyzer.CantFindNodeErrorMessage1") + selector +
Messages.getString("XML2JavaAnalyzer.CantFindNodeErrorMessage2")); //$NON-NLS-1$
//$NON-NLS-2$
+ NLS.bind(Messages.XML2JavaAnalyzer_CantFindNodeErrorMessage, selector));
}
if (source != null) {
MappingModel mapping = new MappingModel(source, targetBean);
@@ -620,7 +618,7 @@
}
public static boolean isXMLAttributeObject(String name) {
- if (name != null && name.startsWith("@"))
+ if (name != null && name.startsWith("@")) //$NON-NLS-1$
return true;
return false;
}
@@ -709,10 +707,8 @@
boolean connectAuto = MessageDialog
.openQuestion(
displayParent,
- Messages
- .getString("XML2JavaAnalyzer.ConnectQDlgTitle"), //$NON-NLS-1$
- Messages
- .getString("XML2JavaAnalyzer.ConnectQDlgContent")); //$NON-NLS-1$
+ Messages.XML2JavaAnalyzer_ConnectQDlgTitle,
+ Messages.XML2JavaAnalyzer_ConnectQDlgContent);
if (connectAuto) {
// connect root model
LineConnectionModel connectionModel = new LineConnectionModel();
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,8 +1,6 @@
-AbstractXMLModelAnalyzer.FileDosentExistErrorMessage1=File does not exist
-AbstractXMLModelAnalyzer.FileDosentExistErrorMessage2=\ in the workspace.
-AbstractXMLModelAnalyzer.IllegalPathErrorMessage1=Illegal file path:
-XML2JavaAnalyzer.CantFindNodeErrorMessage1=Can not find the "
-XML2JavaAnalyzer.CantFindNodeErrorMessage2=" node.
-XML2JavaAnalyzer.CantFindRootNodeErrorMessage=Can not find the root node.
-XML2JavaAnalyzer.ConnectQDlgContent=To ensure a correct mapping, the root nodes should be
connected.\nDo you want to connect them now?
-XML2JavaAnalyzer.ConnectQDlgTitle=Root Node Connection
+AbstractXMLModelAnalyzer_FileDosentExistErrorMessage=File {0} does not exist in the
workspace.
+AbstractXMLModelAnalyzer_IllegalPathErrorMessage=Illegal file path: {0}.
+XML2JavaAnalyzer_CantFindNodeErrorMessage=Can not find the "{0}" node.
+XML2JavaAnalyzer_CantFindRootNodeErrorMessage=Can not find the root node. : {0}
+XML2JavaAnalyzer_ConnectQDlgContent=To ensure a correct mapping, the root nodes should be
connected.\nDo you want to connect them now?
+XML2JavaAnalyzer_ConnectQDlgTitle=Root Node Connection
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2xml/messages.properties
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2xml/messages.properties 2009-04-08
00:21:47 UTC (rev 14580)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2xml/messages.properties 2009-04-08
01:27:43 UTC (rev 14581)
@@ -1,3 +1,6 @@
+# START NON-TRANSLATABLE
+# suspected OBSOLETE
XML2XMLAnalyzer.WarningDlgTitle=Warning
XML2XMLAnalyzer.XML2XMLGenerateErrorMessage=XML2XML is currently not supported
XML2XMLAnalyzer.XML2XMLParseErrorMessage=The Smooks editor currently does not support
parsing the XML2XML configuration files.
+# END NON-TRANSLATABLE