Skip to content
Snippets Groups Projects
Commit 072ad087 authored by Shawn Pearce's avatar Shawn Pearce
Browse files

Externalize strings in Commit command


Change-Id: I08b2cdd147ad6f3c67795f2e75a5b5d2ce2fb20f
Signed-off-by: default avatarShawn O. Pearce <spearce@spearce.org>
parent 16419dad
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ N=N
IPZillaPasswordPrompt=IPZilla Password
authorInfo=Author: {0} <{1}>
averageMSPerRead=average {0} ms/read
branchDetachedHEAD=detached HEAD
branchAlreadyExists=branch {0} already exists
branchCreatedFrom =branch: Created from {0}
branchIsNotAnAncestorOfYourCurrentHEAD=The branch '{0}' is not an ancestor of your current HEAD.\nIf you are sure you want to delete it, run 'jgit branch -D {0}'.
......@@ -54,6 +55,7 @@ listeningOn=Listening on {0}
metaVar_DAG=DAG
metaVar_KEY=KEY
metaVar_arg=ARG
metaVar_author=AUTHOR
metaVar_base=base
metaVar_bucket=BUCKET
metaVar_command=command
......@@ -110,6 +112,8 @@ skippingObject=skipping {0} {1}
timeInMilliSeconds={0} ms
tooManyRefsGiven=Too many refs given
unsupportedOperation=Unsupported operation: {0}
usage_CommitAuthor=Override the author name used in the commit. You can use the standard A U Thor <author@example.com> format.
usage_CommitMessage=Use the given <msg> as the commit message
usage_CommandLineClientForamazonsS3Service=Command line client for Amazon's S3 service
usage_CreateABareRepository=Create a bare repository
usage_CreateATag=Create a tag
......@@ -163,6 +167,7 @@ usage_portNumberToListenOn=port number to listen on
usage_produceAnEclipseIPLog=Produce an Eclipse IP log
usage_pruneStaleTrackingRefs=prune stale tracking refs
usage_recurseIntoSubtrees=recurse into subtrees
usage_recordChangesToRepository=Record changes to the repository
usage_setTheGitRepositoryToOperateOn=set the git repository to operate on
usage_showRefNamesMatchingCommits=Show ref names matching commits
usage_symbolicVersionForTheProject=Symbolic version for the project
......
......@@ -63,6 +63,7 @@ public static CLIText get() {
/***/ public String averageMSPerRead;
/***/ public String branchAlreadyExists;
/***/ public String branchCreatedFrom;
/***/ public String branchDetachedHEAD;
/***/ public String branchIsNotAnAncestorOfYourCurrentHEAD;
/***/ public String branchNotFound;
/***/ public String cacheTreePathInfo;
......
......@@ -49,15 +49,15 @@
import org.eclipse.jgit.revwalk.RevCommit;
import org.kohsuke.args4j.Option;
@Command(common = true, usage = "Record changes to the repository")
@Command(common = true, usage = "usage_recordChangesToRepository")
class Commit extends TextBuiltin {
// I don't support setting the committer, because also the native git
// command doesn't allow this.
@Option(name = "--author", metaVar="author", usage = "Override the author name used in the commit. You can use the standard A U Thor <author@example.com> format.")
@Option(name = "--author", metaVar="metaVar_author", usage = "usage_CommitAuthor")
private String author;
@Option(name = "--message", aliases = { "-m" }, metaVar="msg", usage="Use the given <msg> as the commit message", required=true)
@Option(name = "--message", aliases = { "-m" }, metaVar="metaVar_message", usage="usage_CommitMessage", required=true)
private String message;
@Override
......@@ -73,7 +73,7 @@ protected void run() throws NoHeadException, NoMessageException,
String branchName;
if (!head.isSymbolic())
branchName="detached HEAD";
branchName = CLIText.get().branchDetachedHEAD;
else {
branchName = head.getTarget().getName();
if (branchName.startsWith(Constants.R_HEADS))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment