Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-22506

User notification preferences page is not i18n supported

    XMLWordPrintable

    Details

      Description

      Reproduce the bug:
      1. create a user on the sakai server.
      2. go to "My Workspace" - "Preferences" - "Notifications", there is a list of notification preferences in the default locale (defined with the start Java options)
      3. change user's language to another language with "My Workspace" - "Preferences" - "Language"
      4. go to "My Workspace" - "Preferences" - "Notifications" again, and this page is not i18n supported, no matter if there is a l10n properties file.

      Reason:
      In /kernel/kernel-util/src/main/java/org/sakaiproject/util/UserNotificationPreferencesRegistrationImpl.java, the title text shown in Notification page is loaded only once when the instance is initializing and only default language text is stored.
      In /user/user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/UserPrefsTool.java, the option text shown in Notification page is also loaded only once in the constructor method and only default language text is stored.

      Solution:
      Change the code of the 2 files mentioned before. Load the text dynamically. And some never used setter method should be removed to avoid confusion.

      Attachments:
      The screen shot of this bug: After changing the language to Chinese, the preference is still in English. (Capture from 2.8.x nightly build server)
      Two files modified to fix this bug (based on 2.8.2 code):
      /kernel/kernel-util/src/main/java/org/sakaiproject/util/UserNotificationPreferencesRegistrationImpl.java
      /user/user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/UserPrefsTool.java
      Diff file of these 2 files

        Gliffy Diagrams

          Attachments

          1. change.diff
            7 kB
          2. screen.png
            screen.png
            64 kB
          3. UserNotificationPreferencesRegistrationImpl.java
            10 kB
          4. UserPrefsTool.java
            76 kB

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  gaojun Gao Jun
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code