Browse Source

pgm: Externalize error message

Change-Id: Id9e33104c9681dc9a57674c1648c994a503fa6b8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.4
Matthias Sohn 6 years ago
parent
commit
23af4452e8
  1. 1
      org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
  2. 3
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
  3. 1
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java

1
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 remoteSideDoesNotSupportDeletingRefs=remote side does not support deleting refs
removing=Removing {0} removing=Removing {0}
repaint=Repaint repaint=Repaint
resetNoMode=no reset mode set
s3InvalidBucket=Invalid S3 bucket ''{0}'' s3InvalidBucket=Invalid S3 bucket ''{0}''
serviceNotSupported=Service ''{0}'' not supported serviceNotSupported=Service ''{0}'' not supported
skippingObject=skipping {0} {1} skippingObject=skipping {0} {1}

3
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;
import org.eclipse.jgit.api.ResetCommand.ResetType; import org.eclipse.jgit.api.ResetCommand.ResetType;
import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.pgm.internal.CLIText;
import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option; import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.spi.RestOfArgumentsHandler; import org.kohsuke.args4j.spi.RestOfArgumentsHandler;
@ -95,7 +96,7 @@ class Reset extends TextBuiltin {
mode = selectMode(mode, ResetType.HARD); mode = selectMode(mode, ResetType.HARD);
} }
if (mode == null) { if (mode == null) {
throw die("no reset mode set"); //$NON-NLS-1$ throw die(CLIText.get().resetNoMode);
} }
command.setMode(mode); command.setMode(mode);
} }

1
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 remoteSideDoesNotSupportDeletingRefs;
/***/ public String removing; /***/ public String removing;
/***/ public String repaint; /***/ public String repaint;
/***/ public String resetNoMode;
/***/ public String s3InvalidBucket; /***/ public String s3InvalidBucket;
/***/ public String serviceNotSupported; /***/ public String serviceNotSupported;
/***/ public String skippingObject; /***/ public String skippingObject;

Loading…
Cancel
Save