diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-01-21 23:30:51 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-01-21 23:30:51 +0100 |
commit | 23af4452e882e382c966b9d23e04a4b969a41773 (patch) | |
tree | 783420070740274484f6ecdcd5a1bbc2a23c7cd9 | |
parent | 7cee790173d59281778372eee9c982fd36e96342 (diff) | |
download | jgit-23af4452e882e382c966b9d23e04a4b969a41773.tar.gz jgit-23af4452e882e382c966b9d23e04a4b969a41773.zip |
pgm: Externalize error message
Change-Id: Id9e33104c9681dc9a57674c1648c994a503fa6b8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 418e59e480..7c4119fd0b 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -187,6 +187,7 @@ remoteRefObjectChangedIsNotExpectedOne=remote ref object changed - is not expect remoteSideDoesNotSupportDeletingRefs=remote side does not support deleting refs removing=Removing {0} repaint=Repaint +resetNoMode=no reset mode set s3InvalidBucket=Invalid S3 bucket ''{0}'' serviceNotSupported=Service ''{0}'' not supported skippingObject=skipping {0} {1} diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java index bb81ffbd38..b3e81c6d65 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java @@ -50,6 +50,7 @@ import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.ResetCommand; import org.eclipse.jgit.api.ResetCommand.ResetType; import org.eclipse.jgit.api.errors.GitAPIException; +import org.eclipse.jgit.pgm.internal.CLIText; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; import org.kohsuke.args4j.spi.RestOfArgumentsHandler; @@ -95,7 +96,7 @@ class Reset extends TextBuiltin { mode = selectMode(mode, ResetType.HARD); } if (mode == null) { - throw die("no reset mode set"); //$NON-NLS-1$ + throw die(CLIText.get().resetNoMode); } command.setMode(mode); } diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java index 6a8a03eaf7..d0288a809e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java @@ -290,6 +290,7 @@ public class CLIText extends TranslationBundle { /***/ public String remoteSideDoesNotSupportDeletingRefs; /***/ public String removing; /***/ public String repaint; + /***/ public String resetNoMode; /***/ public String s3InvalidBucket; /***/ public String serviceNotSupported; /***/ public String skippingObject; |