SEC-1545: Missing I18N Keys in messages.properties #1787

Closed
spring-issuemaster opened this Issue Aug 20, 2010 · 3 comments

2 participants

@spring-issuemaster

Rob Winch (Migrated from SEC-1545) said:

spring-security-core's default message.properties is missing at least one i18n key (LdapAuthenticationProvider.badCredentials).

I haven't gotten time to look for others, and it would be nice to address other potentials. Unless the bug assignee beats me to it, in the next couple days I can write a quick script that will get all the missing ones. I will then post a patch for the messages that I can do (i.e. if there isn't already a translation I probably cannot submit a fix for that language).

Anyone viewing this bug can easily work around this issue by providing their own message.properties as outlined in the spring security reference [1].

[1] http://static.springsource.org/spring-security/site/docs/3.0.x/reference/technical-overview.html#localization

@spring-issuemaster

Rob Winch said:

I have attached a zip file containing a unit test (I18nTests.groovy) that I wrote that determines missing i18n keys, and i18n keys that are not following the naming convention (i.e. the key starts with the name of the class it is in or a superclass of the file it is in). For convenience, I have also attached results from each of these tests. It also contains a patch with a fix for everything I could fix. Some of the missing keys I could not add since I do not speak the language it was translated to. This means that even after the patch is applied one of the tests fails. Lastly there is a file that states all the i18n keys that are still missing after applying the patch.

A few notes:

  • I think I did something wrong when creating the patch because it contains ? in it. However, when viewing the files that created the patch no ? were displayed. Any advice on what I am doing wrong would be appreciated (I used "git format-patch --stdout" to create it).
  • I did not put the test in the patch because it requires the entire source tree be checked out (in order to find the defined keys) and wasn't sure if that was acceptable (thus it may not be added as a test).
  • I am not certain how helpful the patch is so let me know if there is some way i could/should alter it to make it more usable
@spring-issuemaster

Rob Winch said:

Updated I18nTests.groovy that was used to produce/verify the fixes. Not checked in because requires the entire source tree to be checked out.

@spring-issuemaster

Rob Winch said:

Checked into 3.0.x and master

@spring-issuemaster spring-issuemaster added this to the 3.1.0.RC1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment