Localize anonymous and non member roles names (#8072).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5333 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
5823481d6e
commit
44214ed1aa
46 files changed
+107
-4
No files matched your search
+10
-2
@@ -1,5 +1,5 @@
|
||||
# redMine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2011 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@@ -84,6 +84,14 @@ class Role < ActiveRecord::Base
|
||||
name
|
||||
end
|
||||
|
||||
def name
|
||||
case builtin
|
||||
when 1; l(:label_role_non_member, :default => read_attribute(:name))
|
||||
when 2; l(:label_role_anonymous, :default => read_attribute(:name))
|
||||
else; read_attribute(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# Return true if the role is a builtin role
|
||||
def builtin?
|
||||
self.builtin != 0
|
||||
|
||||
Reference in new issue
Block a user