Spring Security
  1. Spring Security
  2. SEC-1545

Missing I18N Keys in messages.properties

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.1.0.RC1
    • Component/s: Core
    • Labels:
      None

      Description

      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

        Activity

        Hide
        Rob Winch added a comment -

        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
        Show
        Rob Winch added a comment - 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
        Hide
        Rob Winch added a comment -

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

        Show
        Rob Winch added a comment - Updated I18nTests.groovy that was used to produce/verify the fixes. Not checked in because requires the entire source tree to be checked out.
        Hide
        Rob Winch added a comment -

        Checked into 3.0.x and master

        Show
        Rob Winch added a comment - Checked into 3.0.x and master

          People

          • Assignee:
            Rob Winch
            Reporter:
            Rob Winch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: