]> source.dussan.org Git - jgit.git/commitdiff
UntrackedFilesHandler: Fix non-localized string 44/104344/2
authorDavid Pursehouse <david.pursehouse@gmail.com>
Tue, 5 Sep 2017 11:26:21 +0000 (20:26 +0900)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 5 Sep 2017 22:28:19 +0000 (00:28 +0200)
Change-Id: Ida7b9ddc991515ab233763f2cb985853c9143a3c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java

index 7c9816cf7b7ef1349a241cf4cd2fff80e17a351d..55ce3e7d1332982bf637cffe42ceca776aa2fd87 100644 (file)
@@ -75,6 +75,7 @@ fromURI=From {0}
 initializedEmptyGitRepositoryIn=Initialized empty Git repository in {0}
 invalidHttpProxyOnlyHttpSupported=Invalid http_proxy: {0}: Only http supported.
 invalidRecurseSubmodulesMode=Invalid recurse submodules mode: {0}
+invalidUntrackedFilesMode=Invalid untracked files mode ''{0}''
 jgitVersion=jgit version {0}
 lineFormat={0}
 listeningOn=Listening on {0}
index 1424dab05befde897521aace95d620f3d8fca58a..7d304bc1c18759087551b9f4f5241c6f27bd4ee1 100644 (file)
@@ -151,6 +151,7 @@ public class CLIText extends TranslationBundle {
        /***/ public String initializedEmptyGitRepositoryIn;
        /***/ public String invalidHttpProxyOnlyHttpSupported;
        /***/ public String invalidRecurseSubmodulesMode;
+       /***/ public String invalidUntrackedFilesMode;
        /***/ public String jgitVersion;
        /***/ public String lfsNoAccessKey;
        /***/ public String lfsNoSecretKey;
index d6ff5f0bdc14ed3a46feaa0fe2a40be4545e8d02..3edd0ddbe0e5c67911bb112dad3c45f7b6154ead 100644 (file)
@@ -42,6 +42,9 @@
  */
 package org.eclipse.jgit.pgm.opt;
 
+import java.text.MessageFormat;
+
+import org.eclipse.jgit.pgm.internal.CLIText;
 import org.kohsuke.args4j.CmdLineException;
 import org.kohsuke.args4j.CmdLineParser;
 import org.kohsuke.args4j.OptionDef;
@@ -102,8 +105,8 @@ public class UntrackedFilesHandler extends StringOptionHandler {
                        if ("no".equals(mode) || "all".equals(mode)) { //$NON-NLS-1$ //$NON-NLS-2$
                                setter.addValue(mode);
                        } else {
-                               throw new CmdLineException(owner, String.format(
-                                               "Invalid untracked files mode '%s'", mode)); //$NON-NLS-1$
+                               throw new CmdLineException(owner, MessageFormat
+                                               .format(CLIText.get().invalidUntrackedFilesMode, mode));
                        }
                        return 1;
                } else {