diff options
author | Sasa Zivkov <sasa.zivkov@sap.com> | 2010-05-19 16:59:28 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-05-19 14:37:16 -0700 |
commit | f3d8a8ecad614906a2c4ec0077cdb24129da6c6d (patch) | |
tree | 34d041692beff0f392c27869f49b76c0fc2053e6 /org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java | |
parent | 2e961989e42b1fe7e8bd9eaa7a3d2e88a0d1d001 (diff) | |
download | jgit-f3d8a8ecad614906a2c4ec0077cdb24129da6c6d.tar.gz jgit-f3d8a8ecad614906a2c4ec0077cdb24129da6c6d.zip |
Externalize strings from JGit
The strings are externalized into the root resource bundles.
The resource bundles are stored under the new "resources" source
folder to get proper maven build.
Strings from tests are, in general, not externalized. Only in
cases where it was necessary to make the test pass the strings
were externalized. This was typically necessary in cases where
e.getMessage() was used in assert and the exception message was
slightly changed due to reuse of the externalized strings.
Change-Id: Ic0f29c80b9a54fcec8320d8539a3e112852a1f7b
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java index 4df5b4437b..ece467aa07 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java @@ -37,8 +37,10 @@ */ package org.eclipse.jgit.api; +import java.text.MessageFormat; import java.util.concurrent.Callable; +import org.eclipse.jgit.JGitText; import org.eclipse.jgit.lib.Repository; /** @@ -110,8 +112,8 @@ public abstract class GitCommand<T> implements Callable<T> { */ protected void checkCallable() { if (!callable) - throw new IllegalStateException("Command " - + this.getClass().getName() - + " was called in the wrong state"); + throw new IllegalStateException(MessageFormat.format( + JGitText.get().commandWasCalledInTheWrongState + , this.getClass().getName())); } } |