From 66be81326d429ba572d995e582f6f744cb17d030 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 14 Dec 2008 03:13:25 +0000 Subject: [PATCH] ENHANCEMENT Improved display of class permissions in /admin/security by using the menu title in addition to the classname (users won't necessarily know which classname an admin area corresponds to). Also using "Access to all CMS interfaces" as a permission description for CMS_ACCESS_LeftAndMain MINOR Updated language tables git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68771 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 17 ++++++++++++++++- lang/de_DE.php | 7 ++++++- lang/en_US.php | 7 ++++++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 60c704b2..96afaebb 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -1265,10 +1265,25 @@ JS $classes = ClassInfo::subclassesFor('LeftAndMain'); foreach($classes as $class) { - $perms["CMS_ACCESS_" . $class] = sprintf(_t('CMSMain.ACCESS', "Access to %s in CMS"), $class); + $title = _t("{$class}.MENUTITLE", LeftAndMain::menu_title_for_class($class)); + $perms["CMS_ACCESS_" . $class] = sprintf( + _t( + 'CMSMain.ACCESS', + "Access to '%s' (%s)", + PR_MEDIUM, + "Item in permission selection identifying the admin section, with title and classname. Example: Access to 'Files & Images' (AssetAdmin)" + ), + $title, + $class + ); } + $perms["CMS_ACCESS_LeftAndMain"] = _t( + 'CMSMain.ACCESSALLINTERFACES', + 'Access to all CMS interfaces' + ); return $perms; } + /** * Return a dropdown with existing languages */ diff --git a/lang/de_DE.php b/lang/de_DE.php index 36054935..79345739 100644 --- a/lang/de_DE.php +++ b/lang/de_DE.php @@ -79,7 +79,7 @@ $lang['de_DE']['CMSLeft.ss']['GO'] = 'Los'; $lang['de_DE']['CMSLeft.ss']['NEWPAGE'] = 'Neue Seite...'; $lang['de_DE']['CMSLeft.ss']['SELECTPAGESDEL'] = 'Markieren Sie die Ordner aus die Sie löschen möchten und drücken dann die nachstehende Schaltfläche '; $lang['de_DE']['CMSLeft.ss']['SITECONT'] = 'Seiten Inhalt'; -$lang['de_DE']['CMSMain']['ACCESS'] = 'Zugriff auf %s im CMS'; +$lang['de_DE']['CMSMain']['ACCESS'] = 'Zugriff auf \'%s\' (%s)'; $lang['de_DE']['CMSMain']['CANCEL'] = 'Abbrechen'; $lang['de_DE']['CMSMain']['CHOOSEREPORT'] = '(Report wählen)'; $lang['de_DE']['CMSMain']['COMPARINGV'] = 'Sie vergleichen Versionen #%d und #%d'; @@ -213,6 +213,7 @@ $lang['de_DE']['CommentTableField.ss']['APPROVECOMMENT'] = 'Diesen Kommentar fre $lang['de_DE']['CommentTableField.ss']['DELETE'] = 'löschen'; $lang['de_DE']['CommentTableField.ss']['DELETEROW'] = 'Diese Zeile löschen'; $lang['de_DE']['CommentTableField.ss']['EDIT'] = 'editieren'; +$lang['de_DE']['CommentTableField.ss']['HAM'] = 'Nicht erkannt'; $lang['de_DE']['CommentTableField.ss']['MARKASSPAM'] = 'Die Kommentar als Spam markieren'; $lang['de_DE']['CommentTableField.ss']['MARKNOSPAM'] = 'Markierung als Spam für diesen Kommentar entfernen'; $lang['de_DE']['CommentTableField.ss']['NOITEMSFOUND'] = 'Keine Einträge gefunden'; @@ -349,7 +350,11 @@ $lang['de_DE']['ModelAdmin_left.ss']['IMPORT_TAB_HEADER'] = 'Importieren'; $lang['de_DE']['ModelAdmin_left.ss']['SEARCHLISTINGS'] = 'Suche'; $lang['de_DE']['ModelAdmin_right.ss']['WELCOME1'] = 'Willkommen zu %s'; $lang['de_DE']['ModelAdmin_right.ss']['WELCOME2'] = 'Bitte wählen Sie einen der Einträge auf der linken Seite.'; +$lang['de_DE']['PageComment']['Comment'] = 'Kommentar'; $lang['de_DE']['PageComment']['COMMENTBY'] = 'Kommentar von \'%s\' am %s'; +$lang['de_DE']['PageComment']['IsSpam'] = 'Spam?'; +$lang['de_DE']['PageComment']['Name'] = 'Name'; +$lang['de_DE']['PageComment']['NeedsModeration'] = 'Moderiert?'; $lang['de_DE']['PageComment']['PLURALNAME'] = 'Kommentare'; $lang['de_DE']['PageComment']['SINGULARNAME'] = 'Kommentar'; $lang['de_DE']['PageCommentInterface']['POST'] = 'Abschicken'; diff --git a/lang/en_US.php b/lang/en_US.php index a7db25cf..d6e32818 100755 --- a/lang/en_US.php +++ b/lang/en_US.php @@ -68,7 +68,12 @@ $lang['en_US']['CMSLeft.ss']['GO'] = 'Go'; $lang['en_US']['CMSLeft.ss']['NEWPAGE'] = 'New Page...'; $lang['en_US']['CMSLeft.ss']['SELECTPAGESDEL'] = 'Select the pages that you want to delete and then click the button below'; $lang['en_US']['CMSLeft.ss']['SITECONT'] = 'Site Content'; -$lang['en_US']['CMSMain']['ACCESS'] = 'Access to %s in CMS'; +$lang['en_US']['CMSMain']['ACCESS'] = array( + 'Access to \'%s\' (%s)', + PR_MEDIUM, + 'Item in permission selection identifying the admin section, with title and classname. Example: Access to \'Files & Images\' (AssetAdmin)' +); +$lang['en_US']['CMSMain']['ACCESSALLINTERFACES'] = 'Access to all CMS interfaces'; $lang['en_US']['CMSMain']['CANCEL'] = 'Cancel'; $lang['en_US']['CMSMain']['CHOOSEREPORT'] = '(Choose a report)'; $lang['en_US']['CMSMain']['COMPARINGV'] = 'You are comparing versions #%d and #%d';