MINOR i18n'd a whole bunch of the new permission codes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90493 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2009-10-30 01:43:34 +00:00
parent 3dfa7a2103
commit 33489cdc7f
4 changed files with 18 additions and 12 deletions

View File

@ -155,9 +155,9 @@ class SiteConfig extends DataObject implements PermissionProvider {
function providePermissions() {
return array(
'EDIT_SITECONFIG' => array(
'name' => 'Manage site configuration',
'category' => 'Roles and access permissions',
'help' => 'Ability to edit global access settings/top-level page permissions.',
'name' => _t('SiteConfig.EDIT_PERMISSION', 'Manage site configuration'),
'category' => _t('Permissions.PERMISSIONS_CATEGORY', 'Roles and access permissions'),
'help' => _t('SiteConfig.EDIT_PERMISSION_HELP', 'Ability to edit global access settings/top-level page permissions.'),
'sort' => 400
)
);

View File

@ -2333,24 +2333,24 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return array(
'SITETREE_GRANT_ACCESS' => array(
'name' => _t('SiteTree.PERMISSION_GRANTACCESS_DESCRIPTION', 'Manage access rights for content'),
'category' => 'Roles and access permissions',
'category' => _t('Permissions.PERMISSIONS_CATEGORY', 'Roles and access permissions'),
'sort' => 100
),
'SITETREE_VIEW_ALL' => array(
'name' => _t('SiteTree.VIEW_ALL_DESCRIPTION', 'View any page'),
'category' => 'Content permissions',
'category' => _t('Permissions.CONTENT_CATEGORY', 'Content permissions'),
'sort' => -100,
'help' => 'Ability to view any page on the site, regardless of the settings on the Access tab. Requires "Access to Site Content."'
'help' => _t('SiteTree.VIEW_ALL_HELP', 'Ability to view any page on the site, regardless of the settings on the Access tab. Requires "Access to Site Content."')
),
'SITETREE_EDIT_ALL' => array(
'name' => _t('SiteTree.EDIT_ALL_DESCRIPTION', 'Edit any page'),
'category' => 'Content permissions',
'category' => _t('Permissions.CONTENT_CATEGORY', 'Content permissions'),
'sort' => -50,
'help' => 'Ability to edit any page on the site, regardless of the settings on the Access tab. Requires "Access to Site Content."'
'help' => _t('SiteTree.EDIT_ALL_HELP', 'Ability to edit any page on the site, regardless of the settings on the Access tab. Requires "Access to Site Content."')
),
'SITETREE_REORGANISE' => array(
'name' => _t('SiteTree.REORGANISE_DESCRIPTION', 'Change site structure'),
'category' => 'Content permissions',
'category' => _t('Permissions.CONTENT_CATEGORY', 'Content permissions'),
'sort' => 100
)
);

View File

@ -555,6 +555,8 @@ $lang['en_US']['PermissionRoleCode']['SINGULARNAME'] = array(
50,
'Singular name of the object, used in dropdowns and to generally identify a single object in the interface'
);
$lang['en_US']['Permissions']['CONTENT_CATEGORY'] = 'Content permissions';
$lang['en_US']['Permissions']['PERMISSIONS_CATEGORY'] = 'Roles and access permissions';
$lang['en_US']['PhoneNumberField']['VALIDATION'] = 'Please enter a valid phone number';
$lang['en_US']['QueuedEmail']['PLURALNAME'] = array(
'Queued Emails',
@ -649,6 +651,8 @@ $lang['en_US']['SecurityAdmin']['ROLES'] = 'Roles';
$lang['en_US']['SecurityAdmin']['ROLESDESCRIPTION'] = 'This section allows you to add roles to this group. Roles are logical groupings of permissions, which can be editied in the Roles tab';
$lang['en_US']['SecurityAdmin']['VIEWUSER'] = 'View User';
$lang['en_US']['SimpleImageField']['NOUPLOAD'] = 'No Image Uploaded';
$lang['en_US']['SiteConfig']['EDIT_PERMISSION'] = 'Manage site configuration';
$lang['en_US']['SiteConfig']['EDIT_PERMISSION_HELP'] = 'Ability to edit global access settings/top-level page permissions.';
$lang['en_US']['SiteConfig']['PLURALNAME'] = array(
'Site Configs',
50,
@ -694,6 +698,7 @@ $lang['en_US']['SiteTree']['EDITHEADER'] = 'Who can edit this page?';
$lang['en_US']['SiteTree']['EDITONLYTHESE'] = 'Only these people (choose from list)';
$lang['en_US']['SiteTree']['EDITORGROUPS'] = 'Editor Groups';
$lang['en_US']['SiteTree']['EDIT_ALL_DESCRIPTION'] = 'Edit any page';
$lang['en_US']['SiteTree']['EDIT_ALL_HELP'] = 'Ability to edit any page on the site, regardless of the settings on the Access tab. Requires "Access to Site Content."';
$lang['en_US']['SiteTree']['Editors'] = 'Editors Groups';
$lang['en_US']['SiteTree']['HASBROKENLINKS'] = 'This page has broken links.';
$lang['en_US']['SiteTree']['HOMEPAGEFORDOMAIN'] = array(
@ -770,6 +775,7 @@ $lang['en_US']['SiteTree']['VALIDATIONURLSEGMENT1'] = 'Another page is using tha
$lang['en_US']['SiteTree']['VALIDATIONURLSEGMENT2'] = 'URLs can only be made up of letters, digits and hyphens.';
$lang['en_US']['SiteTree']['VIEWERGROUPS'] = 'Viewer Groups';
$lang['en_US']['SiteTree']['VIEW_ALL_DESCRIPTION'] = 'View any page';
$lang['en_US']['SiteTree']['VIEW_ALL_HELP'] = 'Ability to view any page on the site, regardless of the settings on the Access tab. Requires "Access to Site Content."';
$lang['en_US']['SiteTree']['Viewers'] = 'Viewers Groups';
$lang['en_US']['SiteTree']['has_one_Parent'] = array(
'Parent Page',

View File

@ -501,12 +501,12 @@ class Permission extends DataObject {
foreach($someCodes as $k => $v) {
if (is_array($v)) {
// There must be a category and name key.
if (!isset($v['category'])) user_error("The permission $k must have a category key", E_USER_WARNING);
if (!isset($v[Two])) user_error("The permission $k must have a category key", E_USER_WARNING);
if (!isset($v['name'])) user_error("The permission $k must have a name key", E_USER_WARNING);
if (!isset($allCodes[$v['category']])) $allCodes[$v['category']] = array();
if (!isset($allCodes[$v[Two]])) $allCodes[$v[Two]] = array();
$allCodes[$v['category']][$k] = array(
$allCodes[$v[Two]][$k] = array(
'name' => $v['name'],
'help' => isset($v['help']) ? $v['help'] : null,
'sort' => isset($v['sort']) ? $v['sort'] : 0