diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-05-28 09:44:10 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-05-28 09:50:07 -0700 |
commit | 072ad087ff274ed8e0bee2fc941ced3d82ff6f4f (patch) | |
tree | 35ce7c6e96f40ad0bdedaaab0dc583a5388573c1 /org.eclipse.jgit.pgm/src | |
parent | 16419dad35792bd4f9c8cc6eaff38faa7c9cd522 (diff) | |
download | jgit-072ad087ff274ed8e0bee2fc941ced3d82ff6f4f.tar.gz jgit-072ad087ff274ed8e0bee2fc941ced3d82ff6f4f.zip |
Externalize strings in Commit command
Change-Id: I08b2cdd147ad6f3c67795f2e75a5b5d2ce2fb20f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java | 1 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java index 8c811d4ef7..bae895cc76 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java @@ -63,6 +63,7 @@ public class CLIText extends TranslationBundle { /***/ public String averageMSPerRead; /***/ public String branchAlreadyExists; /***/ public String branchCreatedFrom; + /***/ public String branchDetachedHEAD; /***/ public String branchIsNotAnAncestorOfYourCurrentHEAD; /***/ public String branchNotFound; /***/ public String cacheTreePathInfo; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java index 36e1a73392..b26dde3a4a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java @@ -49,15 +49,15 @@ import org.eclipse.jgit.lib.Ref; 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 @@ class Commit extends TextBuiltin { String branchName; if (!head.isSymbolic()) - branchName="detached HEAD"; + branchName = CLIText.get().branchDetachedHEAD; else { branchName = head.getTarget().getName(); if (branchName.startsWith(Constants.R_HEADS)) |