aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls
diff options
context:
space:
mode:
authorSasa Zivkov <sasa.zivkov@sap.com>2010-05-19 16:59:28 +0200
committerShawn O. Pearce <spearce@spearce.org>2010-05-19 14:37:16 -0700
commitf3d8a8ecad614906a2c4ec0077cdb24129da6c6d (patch)
tree34d041692beff0f392c27869f49b76c0fc2053e6 /org.eclipse.jgit.test/tst/org/eclipse/jgit/nls
parent2e961989e42b1fe7e8bd9eaa7a3d2e88a0d1d001 (diff)
downloadjgit-f3d8a8ecad614906a2c4ec0077cdb24129da6c6d.tar.gz
jgit-f3d8a8ecad614906a2c4ec0077cdb24129da6c6d.zip
Externalize strings from JGit
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>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/nls')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestNLS.java12
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestTranslationBundle.java10
2 files changed, 11 insertions, 11 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestNLS.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestNLS.java
index a01ed4e923..8b02f2f5e9 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestNLS.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestNLS.java
@@ -55,23 +55,23 @@ public class TestNLS extends TestCase {
public void testNLSLocale() {
NLS.setLocale(NLS.ROOT_LOCALE);
GermanTranslatedBundle bundle = GermanTranslatedBundle.get();
- assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, bundle.effectiveLocale());
NLS.setLocale(Locale.GERMAN);
bundle = GermanTranslatedBundle.get();
- assertEquals(Locale.GERMAN, bundle.getEffectiveLocale());
+ assertEquals(Locale.GERMAN, bundle.effectiveLocale());
}
public void testJVMDefaultLocale() {
Locale.setDefault(NLS.ROOT_LOCALE);
NLS.useJVMDefaultLocale();
GermanTranslatedBundle bundle = GermanTranslatedBundle.get();
- assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, bundle.effectiveLocale());
Locale.setDefault(Locale.GERMAN);
NLS.useJVMDefaultLocale();
bundle = GermanTranslatedBundle.get();
- assertEquals(Locale.GERMAN, bundle.getEffectiveLocale());
+ assertEquals(Locale.GERMAN, bundle.effectiveLocale());
}
public void testThreadTranslationBundleInheritance() throws InterruptedException {
@@ -135,7 +135,7 @@ public class TestNLS extends TestCase {
assertNull("t1 was interrupted or barrier was broken", t1.e);
assertNull("t2 was interrupted or barrier was broken", t2.e);
- assertEquals(NLS.ROOT_LOCALE, t1.bundle.getEffectiveLocale());
- assertEquals(Locale.GERMAN, t2.bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, t1.bundle.effectiveLocale());
+ assertEquals(Locale.GERMAN, t2.bundle.effectiveLocale());
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestTranslationBundle.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestTranslationBundle.java
index 7d713f2c1a..0b21bdbe0a 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestTranslationBundle.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/TestTranslationBundle.java
@@ -79,15 +79,15 @@ public class TestTranslationBundle extends TestCase {
NonTranslatedBundle bundle = new NonTranslatedBundle();
bundle.load(NLS.ROOT_LOCALE);
- assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, bundle.effectiveLocale());
assertEquals("Good morning {0}", bundle.goodMorning);
bundle.load(Locale.ENGLISH);
- assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, bundle.effectiveLocale());
assertEquals("Good morning {0}", bundle.goodMorning);
bundle.load(Locale.GERMAN);
- assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, bundle.effectiveLocale());
assertEquals("Good morning {0}", bundle.goodMorning);
}
@@ -95,11 +95,11 @@ public class TestTranslationBundle extends TestCase {
GermanTranslatedBundle bundle = new GermanTranslatedBundle();
bundle.load(NLS.ROOT_LOCALE);
- assertEquals(NLS.ROOT_LOCALE, bundle.getEffectiveLocale());
+ assertEquals(NLS.ROOT_LOCALE, bundle.effectiveLocale());
assertEquals("Good morning {0}", bundle.goodMorning);
bundle.load(Locale.GERMAN);
- assertEquals(Locale.GERMAN, bundle.getEffectiveLocale());
+ assertEquals(Locale.GERMAN, bundle.effectiveLocale());
assertEquals("Guten Morgen {0}", bundle.goodMorning);
}