diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2014-11-27 18:03:27 +0100 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2014-11-27 18:03:27 +0100 |
commit | 09b51b97b224273ad8e437417ac09bdbf12a123d (patch) | |
tree | 01d8ff0ec4538a9e9580d0b1a0e462946fafa5de /src/net/java/sip/communicator/service | |
parent | aac17386e13ae0cde52021c085ea16964801c243 (diff) | |
download | jitsi-09b51b97b224273ad8e437417ac09bdbf12a123d.zip jitsi-09b51b97b224273ad8e437417ac09bdbf12a123d.tar.gz jitsi-09b51b97b224273ad8e437417ac09bdbf12a123d.tar.bz2 |
Localize chat room member roles
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/ChatRoomMemberRole.java | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/ChatRoomMemberRole.java b/src/net/java/sip/communicator/service/protocol/ChatRoomMemberRole.java index 6486ae3..1212bb2 100644 --- a/src/net/java/sip/communicator/service/protocol/ChatRoomMemberRole.java +++ b/src/net/java/sip/communicator/service/protocol/ChatRoomMemberRole.java @@ -19,38 +19,38 @@ public enum ChatRoomMemberRole /** * A role implying the full set of chat room permissions */ - OWNER("Owner", 70), + OWNER("Owner", "service.gui.chat.role.OWNER", 70), /** * A role implying administrative permissions. */ - ADMINISTRATOR("Administrator", 60), + ADMINISTRATOR("Administrator", "service.gui.chat.role.ADMINISTRATOR", 60), /** * A role implying moderator permissions. */ - MODERATOR("Moderator", 50), + MODERATOR("Moderator", "service.gui.chat.role.MODERATOR", 50), /** * A role implying standard participant permissions. */ - MEMBER("Member", 40), + MEMBER("Member", "service.gui.chat.role.MEMBER", 40), /** * A role implying standard participant permissions. */ - GUEST("Guest", 30), + GUEST("Guest", "service.gui.chat.role.GUEST", 30), /** * A role implying standard participant permissions without the right to * send messages/speak. */ - SILENT_MEMBER("SilentMember", 20), + SILENT_MEMBER("SilentMember", "service.gui.chat.role.SILENT_MEMBER", 20), /** * A role implying an explicit ban for the user to join the room. */ - OUTCAST("Outcast", 10); + OUTCAST("Outcast", "service.gui.chat.role.OUTCAST", 10); /** * the name of this role. @@ -66,24 +66,31 @@ public enum ChatRoomMemberRole private final int roleIndex; /** + * Resource name for localization. + */ + private final String resourceName; + + /** * Creates a role with the specified <tt>roleName</tt>. The constructor * is protected in case protocol implementations need to add extra roles * (this should only be done when absolutely necessary in order to assert * smooth interoperability with the user interface). * * @param roleName the name of this role. + * @param resource the resource name to localize the enum. * @param roleIndex an int that would allow to compare this role to others * according to the set of permissions that it implies. * * @throws java.lang.NullPointerException if roleName is null. */ - private ChatRoomMemberRole(String roleName, int roleIndex) + private ChatRoomMemberRole(String roleName, String resource, int roleIndex) throws NullPointerException { if(roleName == null) throw new NullPointerException("Role Name can't be null."); this.roleName = roleName; + this.resourceName = resource; this.roleIndex = roleIndex; } @@ -104,7 +111,7 @@ public enum ChatRoomMemberRole */ public String getLocalizedRoleName() { - return this.roleName; + return this.resourceName; } /** |