summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-04-03 15:07:45 (EDT)
committer pelder2006-04-03 15:07:45 (EDT)
commit5b6cc83f3c74503e884d171d23f3d6b3adc89fed (patch)
tree36135397ca51321750a8c7e2c614ec251814ef47
parent55fdf6139ceca0b71937b096bf451de56ed125a2 (diff)
downloadorg.eclipse.jet-5b6cc83f3c74503e884d171d23f3d6b3adc89fed.zip
org.eclipse.jet-5b6cc83f3c74503e884d171d23f3d6b3adc89fed.tar.gz
org.eclipse.jet-5b6cc83f3c74503e884d171d23f3d6b3adc89fed.tar.bz2
[134583] Externalize or mark non-NLS all strings.
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/extensionpoints/ModelLoaderExtManager.java3
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java20
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties10
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETParser.java12
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETReader.java14
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/model/LoaderManager.java5
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java7
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/taglib/MarkerHelper.java3
8 files changed, 54 insertions, 20 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/extensionpoints/ModelLoaderExtManager.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/extensionpoints/ModelLoaderExtManager.java
index 3494511..1cdc964 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/extensionpoints/ModelLoaderExtManager.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/extensionpoints/ModelLoaderExtManager.java
@@ -48,6 +48,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jet.internal.InternalJET2Platform;
import org.eclipse.jet.internal.JETActivatorWrapper;
+import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jet.internal.runtime.model.EclipseExtensionLoaderFactory;
import org.eclipse.jet.runtime.model.ILoaderManager;
@@ -174,7 +175,7 @@ public final class ModelLoaderExtManager implements IRegistryChangeListener
}
catch (IllegalStateException e)
{
- String msg = MessageFormat.format("The type {0} already has the default loader {1}. The default loader {2} will be ignored.", new Object[] {fileType, mgr.getDefaultModelLoaderId(fileType), id });
+ String msg = MessageFormat.format(JET2Messages.ModelLoaderExtManager_TypeAlreadyDefined, new Object[] {fileType, mgr.getDefaultModelLoaderId(fileType), id });
IStatus status = new Status(IStatus.WARNING, configElements[i].getDeclaringExtension().getNamespace(),IStatus.OK, msg, null );
InternalJET2Platform.getDefault().getLog().log(status);
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
index bd82315..635a433 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
@@ -37,8 +37,16 @@ public class JET2Messages extends NLS
NLS.initializeMessages(BUNDLE_NAME, JET2Messages.class);
}
+ public static String AbstractJavaFileTag_EmptyAttributeNotAllowed;
+
public static String AnyTag_IllegalParent;
+ public static String JavaActionsUtil_CannotFindSourceFolder;
+
+ public static String JavaActionsUtil_InvalidSourceFolder;
+
+ public static String JavaActionsUtil_RequiresAttrOrContainerTag;
+
public static String JET2Builder_CompilingChanged;
public static String JET2Builder_Compiling;
@@ -51,6 +59,18 @@ public class JET2Messages extends NLS
public static String JET2BundleBuildTool_CreatingJar;
+ public static String LoaderManager_CouldNotFindLoader;
+
+ public static String LoaderManager_MultipleLoaders;
+
+ public static String MarkerHelper_CouldNotCreateMarker;
+
+ public static String MergeTag_CouldNotCreateURL;
+
+ public static String MergeTag_CouldNotRead;
+
+ public static String ModelLoaderExtManager_TypeAlreadyDefined;
+
public static String XMLElementDelegate_DuplicateAttribute;
public static String XPath_NoElementSelected;
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
index 3a93d5d..ad9a139 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
@@ -132,3 +132,13 @@ TraceRuntimeTags_SetBodyContents=setting body content: {0}
TraceRuntimeTags_LoopInitialized=loop initialized
TraceRuntimeTags_SkippingBody=skipping
TraceRuntimeTags_LoopFinished=finished loop
+AbstractJavaFileTag_EmptyAttributeNotAllowed=The ''{0}'' attribute cannot be empty.
+JavaActionsUtil_InvalidSourceFolder=Invalid Java source folder: ''{0}''
+JavaActionsUtil_CannotFindSourceFolder=Unable to find Java source folder information for project {0} when searching for package {1}. This may not be a valid Java project.
+JavaActionsUtil_RequiresAttrOrContainerTag=Tag must have a ''{0}'' attribute or be contained withn a {1} tag
+ModelLoaderExtManager_TypeAlreadyDefined=The type {0} already has the default loader {1}. The default loader {2} will be ignored.
+LoaderManager_MultipleLoaders=Multiple loaders found for ''{0}'': {1}
+LoaderManager_CouldNotFindLoader=Could not find a loader for ''{0}''
+MergeTag_CouldNotRead=Unable to read file {0}
+MergeTag_CouldNotCreateURL=Could not create URL({0}, {1})
+MarkerHelper_CouldNotCreateMarker=Unable to create marker on file {0}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETParser.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETParser.java
index 9e2a452..b0db8b1 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETParser.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETParser.java
@@ -399,7 +399,7 @@ public class JETParser
if (!reader.matches(end_open))
{
throw new JETException(CodeGenPlugin.getPlugin().getString(
- "jet.error.unterminated",
+ "jet.error.unterminated", //$NON-NLS-1$
new Object []{ open, reader.mark().toString() }));
}
reader.advance(end_open.length());
@@ -411,7 +411,7 @@ public class JETParser
if (stop == null)
{
throw new JETException(CodeGenPlugin.getPlugin().getString(
- "jet.error.unterminated",
+ "jet.error.unterminated", //$NON-NLS-1$
new Object []{ open, reader.mark().toString() }));
}
listener.handleScriptlet(start, stop, attrs);
@@ -443,7 +443,7 @@ public class JETParser
if (stop == null)
{
throw new JETException(CodeGenPlugin.getPlugin().getString(
- "jet.error.unterminated",
+ "jet.error.unterminated", //$NON-NLS-1$
new Object []{ open, reader.mark().toString() }));
}
listener.handleExpression(start, stop, attrs);
@@ -527,8 +527,8 @@ public class JETParser
if (match == null)
{
throw new JETException(CodeGenPlugin.getPlugin().getString(
- "jet.error.bad.directive",
- new Object []{ start.format("jet.mark.file.line.column") }));
+ "jet.error.bad.directive", //$NON-NLS-1$
+ new Object []{ start.format("jet.mark.file.line.column") })); //$NON-NLS-1$
//reader.reset(start);
//return false;
}
@@ -544,7 +544,7 @@ public class JETParser
if (!reader.matches(parser.getCloseDirective()))
{
throw new JETException(CodeGenPlugin.getPlugin().getString(
- "jet.error.unterminated",
+ "jet.error.unterminated", //$NON-NLS-1$
new Object []{ parser.getOpenDirective(), reader.mark().toString() }));
}
else
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETReader.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETReader.java
index 94d99bd..77ce178 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETReader.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/parser/JETReader.java
@@ -94,7 +94,7 @@ public class JETReader
// we need to assume an encoding capable of working with any character set.
if (encoding == null)
{
- encoding = "UTF8";
+ encoding = "UTF8"; //$NON-NLS-1$
}
// Register the file, and read its content:
@@ -269,7 +269,7 @@ public class JETReader
int cur_cursor = current.cursor;
int len = current.stream.length;
if (cur_cursor == len)
- return "";
+ return ""; //$NON-NLS-1$
char ch;
// pure obsfuscated genius!
@@ -443,7 +443,7 @@ public class JETReader
skipSpaces();
if (peekChar() != '=')
{
- throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.attr.novalue", new Object []{ name, mark().toString() }));
+ throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.attr.novalue", new Object []{ name, mark().toString() })); //$NON-NLS-1$
}
nextChar();
@@ -515,7 +515,7 @@ public class JETReader
// Reached EOF:
//
- throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.tag.attr.unterminated", new Object []{ mark().toString() }));
+ throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.tag.attr.unterminated", new Object []{ mark().toString() })); //$NON-NLS-1$
}
public JETMark[] parseXmlAttribute() throws JETException
@@ -529,7 +529,7 @@ public class JETReader
skipSpaces();
if (peekChar() != '=')
{
- throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.attr.novalue", new Object []{ name, mark().toString() }));
+ throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.attr.novalue", new Object []{ name, mark().toString() })); //$NON-NLS-1$
}
attributeMarks[2] = mark(); // equals
nextChar();
@@ -727,12 +727,12 @@ public class JETReader
//
if (ch == -1)
{
- throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.quotes.unterminated", new Object []{ mark().toString() }));
+ throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.quotes.unterminated", new Object []{ mark().toString() })); //$NON-NLS-1$
}
}
else
{
- throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.attr.quoted", new Object []{ mark().toString() }));
+ throw new JETException(CodeGenPlugin.getPlugin().getString("jet.error.attr.quoted", new Object []{ mark().toString() })); //$NON-NLS-1$
}
}
else
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/model/LoaderManager.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/model/LoaderManager.java
index ecaf1d6..e3ba8fa 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/model/LoaderManager.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/runtime/model/LoaderManager.java
@@ -29,6 +29,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.jet.JET2Platform;
+import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jet.runtime.model.ILoaderFactory;
import org.eclipse.jet.runtime.model.ILoaderManager;
import org.eclipse.jet.runtime.model.IModelLoader;
@@ -266,7 +267,7 @@ public class LoaderManager implements ILoaderManager
}
else
{
- final String msg = MessageFormat.format("Multiple loaders found for ''{0}'': {1}",
+ final String msg = MessageFormat.format(JET2Messages.LoaderManager_MultipleLoaders,
new Object []{ url, candidateLoaders.toString() });
throw new CoreJETException(new BasicDiagnostic(Diagnostic.ERROR, JET2Platform.PLUGIN_ID, IStatus.OK, msg, null));
}
@@ -276,7 +277,7 @@ public class LoaderManager implements ILoaderManager
if(loader == null)
{
- final String msg = MessageFormat.format("Could not find a loader for ''{0}''", new Object []{ url });
+ final String msg = MessageFormat.format(JET2Messages.LoaderManager_CouldNotFindLoader, new Object []{ url });
throw new CoreJETException(new BasicDiagnostic(Diagnostic.ERROR, JET2Platform.PLUGIN_ID, IStatus.OK, msg, null));
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java
index 515af64..31ac84b 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/taglib/java/MergeTag.java
@@ -31,6 +31,7 @@ import org.eclipse.jdt.core.jdom.IDOMFactory;
import org.eclipse.jet.IWriterListener;
import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jet.taglib.AbstractEmptyTag;
import org.eclipse.jet.taglib.JET2TagException;
import org.eclipse.jet.taglib.TagInfo;
@@ -125,7 +126,7 @@ public class MergeTag extends AbstractEmptyTag
}
catch (CoreException e)
{
- final String msg = "Unable to read file {0}";
+ final String msg = JET2Messages.MergeTag_CouldNotRead;
throw new JET2TagException(MessageFormat.format(msg, new Object []{ file.getFullPath() }));
}
}
@@ -156,7 +157,7 @@ public class MergeTag extends AbstractEmptyTag
}
catch (CoreException e)
{
- final String msg = "Unable to read file {0}";
+ final String msg = JET2Messages.MergeTag_CouldNotRead;
throw new JET2TagException(MessageFormat.format(msg, new Object []{ iFile.getFullPath() }));
}
}
@@ -211,7 +212,7 @@ private static final String JMERGE_POSITION_CATEGORY = MergeTag.class.getName();
}
catch (MalformedURLException e)
{
- String msg = "Could not create URL({0}, {1})";
+ String msg = JET2Messages.MergeTag_CouldNotCreateURL;
throw new JET2TagException(MessageFormat.format(msg,
new Object[] {baseURL.toExternalForm(), rules}));
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/taglib/MarkerHelper.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/taglib/MarkerHelper.java
index 2090043..808f854 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/taglib/MarkerHelper.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/taglib/MarkerHelper.java
@@ -24,6 +24,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jet.IWriterListener;
import org.eclipse.jet.JET2Writer;
+import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Position;
@@ -107,7 +108,7 @@ public class MarkerHelper implements IWriterListener
}
catch (CoreException e)
{
- final String msg = "Unable to create marker on file {0}";
+ final String msg = JET2Messages.MarkerHelper_CouldNotCreateMarker;
throw new JET2TagException(MessageFormat.format(msg, new Object[] {iFile.getFullPath().toString()}), e);
}
catch (BadLocationException e)