flavour/eden — pull request #945 by eimmirzi (2014-11-28 14:35:29+00:00)
Title: AssignedRolesTable

Hi,
these changes fix some problem encountered in User Role page ( /eden/org/organization//roles)during string translation in Italian language.
1.) In s3cfg.py file T function was not used for role list.
def get_auth_role_modules(self):
"""
Which modules are included in the Role Manager
- to assign discrete permissions to via UI
"""
T = current.T
return self.auth.get("role_modules", OrderedDict([
("staff", "Staff"),
("vol", "Volunteers"),
("member", "Members"),
("inv", "Warehouses"),
("asset", "Assets"),
("project", "Projects"),
("survey", "Assessments"),
("irs", "Incidents")
]))
changed with:
def get_auth_role_modules(self):
"""
Which modules are included in the Role Manager
- to assign discrete permissions to via UI
"""
T = current.T
return self.auth.get("role_modules", OrderedDict([
("staff", T("Staff")),
("vol", T("Volunteers")),
("member", T("Members")),
("inv", T("Warehouses")),
("asset", T("Assets")),
("project", T("Projects")),
("survey", T("Assessments")),
("irs", T("Incidents"))
]))
and
def get_auth_access_levels(self):
"""
Access levels for the Role Manager UI
"""
return self.auth.get("access_levels", OrderedDict([
("reader", "Reader"),
("data_entry", "Data Entry"),
("editor", "Editor"),
("super", "Super Editor")
]))
changed with:
def get_auth_access_levels(self):
"""
Access levels for the Role Manager UI
"""
T = current.T
return self.auth.get("access_levels", OrderedDict([
("reader", T("Reader")),
("data_entry", T("Data Entry")),
("editor", T("Editor")),
("super", T("Super Editor"))
]))
2.) In manage_roles.html file two strings were not translated.
rows
Module
Access Level
were changed with
{{=T("Module")}}
{{=T("Access Level")}}
3.) In it.py some strings were missing:
Access Level
Assign Roles
Assigned Roles
Branches
User Roles
Note:
it.py file has been enhanced providing more string translation.