@ -41,33 +41,50 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
* /
* /
package org.eclipse.jgit.stringext ;
package org.eclipse.jgit.nls ;
import org.eclipse.jgit.JGitText ;
import org.eclipse.jgit.JGitText ;
import org.eclipse.jgit.awtui.UIText ;
import org.eclipse.jgit.awtui.UIText ;
import org.eclipse.jgit.console.ConsoleText ;
import org.eclipse.jgit.console.ConsoleText ;
import org.eclipse.jgit.http.server.HttpServerText ;
import org.eclipse.jgit.http.server.HttpServerText ;
import org.eclipse.jgit.iplog.IpLogText ;
import org.eclipse.jgit.iplog.IpLogText ;
import org.eclipse.jgit.nls.NLS ;
import org.eclipse.jgit.pgm.CLIText ;
import org.eclipse.jgit.pgm.CLIText ;
import org.junit.Before ;
import org.junit.Test ;
public class TestStringExternalization {
public class RootLocaleTest {
@Before
public void setUp ( ) {
NLS . setLocale ( NLS . ROOT_LOCALE ) ;
}
@Test
public void testJGitText ( ) {
NLS . getBundleFor ( JGitText . class ) ;
}
private static Class [ ] translationBundleClasses = new Class [ ] {
@Test
ConsoleText . class , HttpServerText . class , IpLogText . class , CLIText . class ,
public void testHttpServerText ( ) {
UIText . class , JGitText . class ,
NLS . getBundleFor ( HttpServerText . class ) ;
} ;
}
/ * *
@Test
* Verifies that all translation keys are defined in the root resource bundle .
public void testConsoleText ( ) {
* < p >
NLS . getBundleFor ( ConsoleText . class ) ;
* This makes sure that all translation bundles will get all strings populated
}
* since the string will be found at last in the root resource bundle .
* /
@Test
public void testAllTranslationKeysDefinedInRoot ( ) {
public void testCLIText ( ) {
NLS . setLocale ( NLS . ROOT_LOCALE ) ;
NLS . getBundleFor ( CLIText . class ) ;
for ( Class c : translationBundleClasses ) {
}
NLS . getBundleFor ( c ) ;
}
@Test
public void testUIText ( ) {
NLS . getBundleFor ( UIText . class ) ;
}
@Test
public void testIpLogText ( ) {
NLS . getBundleFor ( IpLogText . class ) ;
}
}
}
}