Skip to content

Commit ce58fac

Browse files
committed
Add test for loading russian properties
1 parent f368107 commit ce58fac

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/main/java/com/gitblit/wicket/GitBlitWebApp_ru.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,3 +785,6 @@ gb.deletePatchsetFailure = \u041E\u0448\u0438\u0431\u043A\u0430 \u0443\u0434\u04
785785
gb.referencedByCommit = \u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043A\u043E\u043C\u043C\u0438\u0442.
786786
gb.referencedByTicket = \u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0437\u0430\u044F\u0432\u043A\u0443.
787787
gb.emailClientCertificateSubject = \u0412\u0430\u0448 \u043A\u043B\u0438\u0435\u043D\u0442\u0441\u043A\u0438\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442 Gitblit \u0434\u043B\u044F {0}
788+
789+
# This last property for unit tests to test successful loading of the resource file
790+
gb.loadLang = \u0420\u0443\u0441\u0441\u043a\u0438\u0439

src/test/java/com/gitblit/wicket/GitBlitWebAppResourceBundleTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,16 @@ public void testPtBrResource() throws Exception
126126
assertEquals("Português", bundle.getString("gb.loadLang"));
127127
}
128128

129+
130+
@Test
131+
public void testRuResource() throws Exception
132+
{
133+
Locale l = Locale.forLanguageTag("ru");
134+
ResourceBundle bundle = ResourceBundle.getBundle("com.gitblit.wicket.GitBlitWebApp", l);
135+
assertNotNull(bundle);
136+
assertEquals("Русский", bundle.getString("gb.loadLang"));
137+
}
138+
129139
@Test
130140
public void testZhCnResource() throws Exception
131141
{

0 commit comments

Comments
 (0)