Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325025

Summary: NLS not done cirrectly in JGit
Product: [Technology] JGit Reporter: Robin Rosenberg <robin.rosenberg>
Component: JGitAssignee: Sasa Zivkov <sasa.zivkov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, stefan.lay
Version: 0.9.0   
Target Milestone: 0.11   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Robin Rosenberg CLA 2010-09-11 02:07:39 EDT
A number of messages like "remote: {0}", unexpanded parameters occurs when running the JGit command line.

The reason is that the NLS bundles use the {n} syntax for parameters, but
much of the code uses PrintWriter.format for formatting which requires %1$s syntax.

Suggestion: Use MessageFormat.format for formatting and the pass the formatted string to PrintWriter.write.
Comment 1 Sasa Zivkov CLA 2011-01-26 12:29:35 EST
Hmm.. I actually found only one place where the parameter substitution wasn't done. See [1].
http://egit.eclipse.org/r/#change,2348

Additionally, the text you mentioned "remote: {0}" is defined via the
CLIText.remoteMessage and I find no issue with its usage i.e. the parameter
substitution is done at all places where it is used, for example:
AbstractFetchCommand.java:107								writer.print(MessageFormat.format(CLIText.get().remoteMessage,
						pkt));
Comment 2 Chris Aniszczyk CLA 2011-01-26 12:35:19 EST
Fixed with 990498b75d3d3955b629a48e5f39dd09bc7a3116.