Skip to content

Commit

Permalink
added localization test, fixed one translation key
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Nov 2, 2017
1 parent 174e971 commit eaff472
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Expand Up @@ -3095,7 +3095,7 @@ LdapAuthenticationProvider.badCredentials=Invalid username and/or password.
LdapAuthenticationProvider.emptyUsername=Empty username.
LdapAuthentication.incorrect.value=MidPoint principal type doesn't match.
LdapAuthentication.bad.user=Unknown user.
UserProfileServiceImpl.unknownUser=Couldn't find user with name {0}, reason: {1}.
UserProfileServiceImpl.unknownUser=Couldn''t find user with name ''{0}'', reason: {1}.
AbstractLdapAuthenticationProvider.emptyPassword=Empty password.
BindAuthenticator.badCredentials=Invalid username and/or password.
WfDeltasPanel.label.deltaIn=Process input: delta(s) to be approved
Expand Down
Expand Up @@ -65,6 +65,18 @@ public void localization() throws Exception {
assertTranslation(service, "ObjectType.description", "Popis");
}

@Test
public void localizationParams2() throws Exception {
Object[] params = new Object[2];
params[0] = "John";
params[1] = "Couldn't find user with name 'John'";

String real = service.translate("UserProfileServiceImpl.unknownUser", params, new Locale("sk"));
String expected = "Couldn't find user with name '" + params[0] + "', reason: " + params[1] + ".";

AssertJUnit.assertEquals(expected, real);
}

@Test
public void localizationDefaults() throws Exception {
assertTranslation(service, "unknownKey", "expectedValues", "expectedValues");
Expand Down
Expand Up @@ -16,4 +16,5 @@

standardKey=standardValue
otherKey=otherValue
joekey=User {2} with id {0, number, integer} tried to translate {1}
joekey=User {2} with id {0, number, integer} tried to translate {1}
UserProfileServiceImpl.unknownUser=Couldn''t find user with name ''{0}'', reason: {1}.

0 comments on commit eaff472

Please sign in to comment.