aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/nls
Commit message (Collapse)AuthorAgeFilesLines
* Add missing newlines at ends of Java filesDavid Pursehouse2017-07-251-1/+1
| | | | | Change-Id: Iead36f53d57ead0eb3edd3f9efb63b6630c9c20c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse2017-02-202-3/+3
| | | | | | | | | | Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse2017-02-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Drop warnings about unchecked casts in a few stable select placesRobin Rosenberg2014-09-041-0/+1
| | | | Change-Id: Ie163a4940f0d13bbdefd8c4643c0944c71800544
* Enable NLS / TranslationBundle to be used in OSGiRĂ¼diger Herrmann2014-06-011-6/+10
| | | | | | | | | | | | | | | TranslationBundle#load() used to load resource bundles through ResourceBundle#getBundle() without explicitly specifying a class loader. In this case, the class laoder of the calling class (TranslationBundle here) is used. This approach fails in runtime environments like OSGi where there are multiple class loaders. This change enables loading resource bundles in multi class loaders environments. The fix is to pass the class loader of the TranslationBundle-derived class to ResourceBundle#getBundle(). Bug: 436232 Change-Id: I39db61e012dc93ebf388a71bf6088a3310a22bac Signed-off-by: RĂ¼diger Herrmann <ruediger.herrmann@gmx.de>
* Mark non-externalizable strings as suchRobin Rosenberg2012-12-271-1/+1
| | | | | | | | | | A few classes such as Constanrs are marked with @SuppressWarnings, as are toString() methods with many liternal, but otherwise $NLS-n$ is used for string containing text that should not be translated. A few literals may fall into the gray zone, but mostly I've tried to only tag the obvious ones. Change-Id: I22e50a77e2bf9e0b842a66bdf674e8fa1692f590
* Add Javadoc description for packagesRobin Stocker2012-10-311-0/+4
| | | | | | | | | These appear as descriptions in the index, see here (currently empty): http://download.eclipse.org/jgit/docs/latest/apidocs/ Change-Id: If7996deef30ae688bade8b3ad6b19547ca3d8b50 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Use only a single instance for NLS translation bundlesRobin Rosenberg2010-09-261-1/+6
| | | | | | | | As findbugs pointed out, there was a small risk for creating multiple instances of translation bundles. If that happens, drop the second instance. Change-Id: I3aacda86251d511f6bbc2ed7481d561449ce3b6c Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Externalize strings from JGitSasa Zivkov2010-05-192-7/+15
| | | | | | | | | | | | | | | The strings are externalized into the root resource bundles. The resource bundles are stored under the new "resources" source folder to get proper maven build. Strings from tests are, in general, not externalized. Only in cases where it was necessary to make the test pass the strings were externalized. This was typically necessary in cases where e.getMessage() was used in assert and the exception message was slightly changed due to reuse of the externalized strings. Change-Id: Ic0f29c80b9a54fcec8320d8539a3e112852a1f7b Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
* Fix NLS to build under Java 5Shawn O. Pearce2010-03-121-0/+1
| | | | | | | | | The tests were using a Locale.ROOT constant which was introduced in Java 6. However, we need to retain Java 5 support. Change-Id: I75c5648fcfc728a9aea2e839d2ad0320f5cf742f Signed-off-by: Shawn O. Pearce <spearce@spearce.org> CC: Sasa Zivkov <sasa.zivkov@sap.com>
* Provide NLS support in JGit.Sasa Zivkov2010-03-113-0/+415
The support for NLS relies on java.util API to load a standard ResourceBundle and then uses java reflection API to inject localized strings into public String fields of the corresponding instance of TranslationBundle. Locale setting is supported per thread to enable concurrent threads to use different locales. This is useful when JGit runs in a server context where (error) messages might need to differ per-request to suit the user's preference. Change-Id: Ie0e63a0d7bb74eaad495dbe8248595d8a3a76883 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>