| Summary: | NLS not done cirrectly in JGit | ||
|---|---|---|---|
| Product: | [Technology] JGit | Reporter: | Robin Rosenberg <robin.rosenberg> |
| Component: | JGit | Assignee: | 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: | |||
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)); Fixed with 990498b75d3d3955b629a48e5f39dd09bc7a3116. |
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.