FEATURE Sapphire files are now also scanned for _t calls

ENHANCEMENT Revised locale list
ENHANCEMENT Updated en_US generated files (and created for sapphire)
BUGFIX Fixed some _t() calls in the cms module

(merged from patch #1476 by bfojcapell)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43654 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-10-20 23:49:14 +00:00
parent 9277c49640
commit 2befee113b
4 changed files with 24 additions and 20 deletions

View File

@ -215,9 +215,9 @@ abstract class LeftAndMain extends Controller {
// array[2]: The controller class for this menu, used to check permisssions. If blank, it's assumed that this is public, and always shown to // array[2]: The controller class for this menu, used to check permisssions. If blank, it's assumed that this is public, and always shown to
// users who have the rights to access some other part of the admin area. // users who have the rights to access some other part of the admin area.
$menuSrc = array( $menuSrc = array(
_t('LeftAndMain.HELLO', "Site content",100,"Menu title") => array("content", "admin/", "CMSMain"), _t('LeftAndMain.SITECONTENT',"Site Content",PR_HIGH,"Menu title") => array("content", "admin/", "CMSMain"),
_t('LeftAndMain.FILESIMAGES',"Files & Images",100) => array("files", "admin/assets/", "AssetAdmin"), _t('LeftAndMain.FILESIMAGES',"Files & Images",PR_HIGH,"Menu title") => array("files", "admin/assets/", "AssetAdmin"),
_t('LeftAndMain.NEWSLETTERS',"Newsletters") => array("newsletter", "admin/newsletter/", "NewsletterAdmin"), _t('LeftAndMain.NEWSLETTERS',"Newsletters",PR_HIGH,"Menu title") => array("newsletter", "admin/newsletter/", "NewsletterAdmin"),
_t('LeftAndMain.REPORTS',"Reports",PR_HIGH,'Menu title') => array("report", "admin/reports/", "ReportAdmin"), _t('LeftAndMain.REPORTS',"Reports",PR_HIGH,'Menu title') => array("report", "admin/reports/", "ReportAdmin"),
_t('LeftAndMain.SECURITY',"Security",PR_HIGH,'Menu title') => array("security", "admin/security/", "SecurityAdmin"), _t('LeftAndMain.SECURITY',"Security",PR_HIGH,'Menu title') => array("security", "admin/security/", "SecurityAdmin"),
_t('LeftAndMain.COMMENTS',"Comments",PR_HIGH,'Menu title') => array("comments", "admin/comments/", "CommentAdmin"), _t('LeftAndMain.COMMENTS',"Comments",PR_HIGH,'Menu title') => array("comments", "admin/comments/", "CommentAdmin"),
@ -364,7 +364,7 @@ abstract class LeftAndMain extends Controller {
// This lets us override the tree title with an extension // This lets us override the tree title with an extension
if($this->hasMethod('getCMSTreeTitle')) $treeTitle = $this->getCMSTreeTitle(); if($this->hasMethod('getCMSTreeTitle')) $treeTitle = $this->getCMSTreeTitle();
else $treeTitle = _t('LeftAndMain.SITECONTENT',"Site Content",PR_HIGH,'Root node on left'); else $treeTitle = _t('LeftAndMain.SITECONTENTLEFT',"Site Content",PR_HIGH,'Root node on left');
$siteTree = "<ul id=\"sitetree\" class=\"tree unformatted\"><li id=\"record-0\" class=\"Root nodelete\"><a href=\"$rootLink\">$treeTitle</a>" $siteTree = "<ul id=\"sitetree\" class=\"tree unformatted\"><li id=\"record-0\" class=\"Root nodelete\"><a href=\"$rootLink\">$treeTitle</a>"
. $siteTree . "</li></ul>"; . $siteTree . "</li></ul>";

View File

@ -26,16 +26,16 @@ class StaticExporter extends Controller {
} }
function index() { function index() {
echo "<h1>Static exporter</h1>"; echo "<h1>"._t('StaticExporter.NAME','Static exporter')."</h1>";
echo $this->StaticExportForm()->forTemplate(); echo $this->StaticExportForm()->forTemplate();
} }
function StaticExportForm() { function StaticExportForm() {
return new Form($this, 'StaticExportForm', new FieldSet( return new Form($this, 'StaticExportForm', new FieldSet(
// new TextField('folder', 'Folder to export to'), // new TextField('folder', _t('StaticExporter.FOLDEREXPORT','Folder to export to')),
new TextField('baseurl', 'Base URL') new TextField('baseurl', _t('StaticExporter.BASEURL','Base URL'))
), new FieldSet( ), new FieldSet(
new FormAction('export', 'Export to that folder') new FormAction('export', _t('StaticExporter.EXPORTTO','Export to that folder'))
)); ));
} }
@ -95,7 +95,7 @@ class StaticExporter extends Controller {
return null; return null;
} else { } else {
echo "Please specify a folder that exists"; echo _t('StaticExporter.ONETHATEXISTS',"Please specify a folder that exists");
} }
} }

View File

@ -37,11 +37,6 @@ $lang['en_US']['BulkLoaderAdmin']['PREVIEW'] = 'Preview';
$lang['en_US']['BulkLoaderAdmin']['PRESSCNT'] = 'Press continue to load this data in'; $lang['en_US']['BulkLoaderAdmin']['PRESSCNT'] = 'Press continue to load this data in';
$lang['en_US']['BulkLoaderAdmin']['CONFIRMBULK'] = 'Confirm bulk load'; $lang['en_US']['BulkLoaderAdmin']['CONFIRMBULK'] = 'Confirm bulk load';
$lang['en_US']['BulkLoaderAdmin']['DATALOADED'] = 'This data has been loaded in'; $lang['en_US']['BulkLoaderAdmin']['DATALOADED'] = 'This data has been loaded in';
$lang['en_US']['LeftAndMain']['SITECONTENT'] = array(
'Site Content',
PR_HIGH,
'Root node on left'
);
$lang['en_US']['CMSMain']['CREATE'] = array( $lang['en_US']['CMSMain']['CREATE'] = array(
'Create ', 'Create ',
PR_MEDIUM, PR_MEDIUM,
@ -97,7 +92,6 @@ $lang['en_US']['CMSMain']['GO'] = 'Go';
$lang['en_US']['CMSMain']['NOCONTENT'] = 'no content'; $lang['en_US']['CMSMain']['NOCONTENT'] = 'no content';
$lang['en_US']['CMSMain']['TOTALPAGES'] = 'Total pages: '; $lang['en_US']['CMSMain']['TOTALPAGES'] = 'Total pages: ';
$lang['en_US']['CMSMain']['PUBPAGES'] = 'Done: Published %d pages'; $lang['en_US']['CMSMain']['PUBPAGES'] = 'Done: Published %d pages';
$lang['en_US']['CMSMain']['REFRESHLANG'] = 'You have changed the interface language. Please refresh your browser window for the changes to take effect';
$lang['en_US']['CMSMain']['PUBALLFUN'] = '"Publish All" functionality'; $lang['en_US']['CMSMain']['PUBALLFUN'] = '"Publish All" functionality';
$lang['en_US']['CMSMain']['PUBALLFUN2'] = 'Pressing this button will do the equivalent of going to every page and pressing "publish". It\'s $lang['en_US']['CMSMain']['PUBALLFUN2'] = 'Pressing this button will do the equivalent of going to every page and pressing "publish". It\'s
intended to be used after there have been massive edits of the content, such as when the site was intended to be used after there have been massive edits of the content, such as when the site was
@ -115,7 +109,7 @@ $lang['en_US']['CMSMain']['VISITRESTORE'] = array(
$lang['en_US']['LeftAndMain']['PERMDEFAULT'] = 'Please choose an authentication method and enter your credentials to access the CMS.'; $lang['en_US']['LeftAndMain']['PERMDEFAULT'] = 'Please choose an authentication method and enter your credentials to access the CMS.';
$lang['en_US']['LeftAndMain']['PERMALREADY'] = 'I\'m sorry, but you can\'t access that part of the CMS. If you want to log in as someone else, do so below'; $lang['en_US']['LeftAndMain']['PERMALREADY'] = 'I\'m sorry, but you can\'t access that part of the CMS. If you want to log in as someone else, do so below';
$lang['en_US']['LeftAndMain']['PERMAGAIN'] = 'You have been logged out of the CMS. If you would like to log in again, enter a username and password below.'; $lang['en_US']['LeftAndMain']['PERMAGAIN'] = 'You have been logged out of the CMS. If you would like to log in again, enter a username and password below.';
$lang['en_US']['LeftAndMain']['HELLO'] = array( $lang['en_US']['LeftAndMain']['SITECONTENT'] = array(
'Site Content', 'Site Content',
PR_HIGH, PR_HIGH,
'Menu title' 'Menu title'
@ -142,7 +136,7 @@ $lang['en_US']['LeftAndMain']['SECURITY'] = array(
); );
$lang['en_US']['LeftAndMain']['COMMENTS'] = array( $lang['en_US']['LeftAndMain']['COMMENTS'] = array(
'Comments', 'Comments',
PR_HIGH, PR_HIGH,
'Menu title' 'Menu title'
); );
$lang['en_US']['LeftAndMain']['STATISTICS'] = array( $lang['en_US']['LeftAndMain']['STATISTICS'] = array(
@ -156,6 +150,11 @@ $lang['en_US']['LeftAndMain']['HELP'] = array(
'Menu title' 'Menu title'
); );
$lang['en_US']['LeftAndMain']['PAGETYPE'] = 'Page type: '; $lang['en_US']['LeftAndMain']['PAGETYPE'] = 'Page type: ';
$lang['en_US']['LeftAndMain']['SITECONTENTLEFT'] = array(
'Site Content',
PR_HIGH,
'Root node on left'
);
$lang['en_US']['LeftAndMain']['SAVEDUP'] = 'Saved'; $lang['en_US']['LeftAndMain']['SAVEDUP'] = 'Saved';
$lang['en_US']['LeftAndMain']['CHANGEDURL'] = ' Changed URL to \'%s\''; $lang['en_US']['LeftAndMain']['CHANGEDURL'] = ' Changed URL to \'%s\'';
$lang['en_US']['LeftAndMain']['STATUSTO'] = ' Status changed to \'%s\''; $lang['en_US']['LeftAndMain']['STATUSTO'] = ' Status changed to \'%s\'';
@ -201,7 +200,7 @@ $lang['en_US']['SideReport']['LAST2WEEKS'] = 'Pages edited in the last 2 weeks';
$lang['en_US']['StaticExporter']['NAME'] = 'Static exporter'; $lang['en_US']['StaticExporter']['NAME'] = 'Static exporter';
$lang['en_US']['StaticExporter']['FOLDEREXPORT'] = 'Folder to export to'; $lang['en_US']['StaticExporter']['FOLDEREXPORT'] = 'Folder to export to';
$lang['en_US']['StaticExporter']['BASEURL'] = 'Base URL'; $lang['en_US']['StaticExporter']['BASEURL'] = 'Base URL';
$lang['en_US']['StaticExporter']['EXPORTTOTHAT'] = 'Export to that folder'; $lang['en_US']['StaticExporter']['EXPORTTO'] = 'Export to that folder';
$lang['en_US']['StaticExporter']['ONETHATEXISTS'] = 'Please specify a folder that exists'; $lang['en_US']['StaticExporter']['ONETHATEXISTS'] = 'Please specify a folder that exists';
$lang['en_US']['ThumbnailStripField']['NOTAFOLDER'] = 'This is not a folder'; $lang['en_US']['ThumbnailStripField']['NOTAFOLDER'] = 'This is not a folder';
$lang['en_US']['AssetAdmin_uploadiframe.ss']['PERMFAILED'] = 'You do not have permission to upload files into this folder.'; $lang['en_US']['AssetAdmin_uploadiframe.ss']['PERMFAILED'] = 'You do not have permission to upload files into this folder.';
@ -385,8 +384,8 @@ $lang['en_US']['LeftAndMain.ss']['SSWEB'] = 'Silverstripe Website';
$lang['en_US']['LeftAndMain.ss']['APPVERSIONTEXT1'] = 'This is the'; $lang['en_US']['LeftAndMain.ss']['APPVERSIONTEXT1'] = 'This is the';
$lang['en_US']['LeftAndMain.ss']['APPVERSIONTEXT2'] = 'version that you are currently running, technically it\'s the CVS branch'; $lang['en_US']['LeftAndMain.ss']['APPVERSIONTEXT2'] = 'version that you are currently running, technically it\'s the CVS branch';
$lang['en_US']['LeftAndMain.ss']['LOGGEDINAS'] = 'Logged in as'; $lang['en_US']['LeftAndMain.ss']['LOGGEDINAS'] = 'Logged in as';
$lang['en_US']['LeftAndMain.ss']['LOGOUT'] = 'log out';
$lang['en_US']['LeftAndMain.ss']['EDITPROFILE'] = 'Profile'; $lang['en_US']['LeftAndMain.ss']['EDITPROFILE'] = 'Profile';
$lang['en_US']['LeftAndMain.ss']['LOGOUT'] = 'log out';
$lang['en_US']['LeftAndMain.ss']['VIEWPAGEIN'] = 'Page view:'; $lang['en_US']['LeftAndMain.ss']['VIEWPAGEIN'] = 'Page view:';
$lang['en_US']['LeftAndMain.ss']['SWITCHTO'] = 'Switch to:'; $lang['en_US']['LeftAndMain.ss']['SWITCHTO'] = 'Switch to:';
$lang['en_US']['LeftAndMain.ss']['EDIT'] = 'Edit'; $lang['en_US']['LeftAndMain.ss']['EDIT'] = 'Edit';
@ -441,4 +440,9 @@ $lang['en_US']['ViewArchivedEmail.ss']['HAVEASKED'] = array(
); );
$lang['en_US']['ViewArchivedEmail.ss']['CANACCESS'] = 'You can access the archived site at this link:'; $lang['en_US']['ViewArchivedEmail.ss']['CANACCESS'] = 'You can access the archived site at this link:';
$lang['en_US']['NewsletterAdmin_left.ss'] = array_merge($lang['en_US']['NewsletterAdmin_left.ss'], $lang['en_US']['NewsletterAdmin_SiteTree.ss']);
$lang['en_US']['ReportAdmin_left.ss'] = array_merge($lang['en_US']['ReportAdmin_left.ss'], $lang['en_US']['ReportAdmin_SiteTree.ss']);
$lang['en_US']['MemberList.ss'] = array_merge($lang['en_US']['MemberList.ss'], $lang['en_US']['MemberList_Table.ss']);
$lang['en_US']['PageCommentInterface.ss'] = array_merge($lang['en_US']['PageCommentInterface.ss'], $lang['en_US']['PageCommentInterface_singlecomment.ss']);
?> ?>

View File

@ -39,7 +39,7 @@
<a href="http://www.silverstripe.com" title="<% _t('SSWEB','Silverstripe Website') %>">Silverstripe CMS</a>&nbsp;-&nbsp; <a href="http://www.silverstripe.com" title="<% _t('SSWEB','Silverstripe Website') %>">Silverstripe CMS</a>&nbsp;-&nbsp;
<abbr style="border-style: none" title="<% _t('APPVERSIONTEXT1',"This is the") %> $ApplicationName <% _t('APPVERSIONTEXT2',"version that you are currently running, technically it's the CVS branch") %>">$CMSVersion</abbr> &nbsp; &nbsp; &nbsp; <abbr style="border-style: none" title="<% _t('APPVERSIONTEXT1',"This is the") %> $ApplicationName <% _t('APPVERSIONTEXT2',"version that you are currently running, technically it's the CVS branch") %>">$CMSVersion</abbr> &nbsp; &nbsp; &nbsp;
<% control CurrentMember %> <% control CurrentMember %>
<% _t('LOGGEDINAS','Logged in as') %> $FirstName $Surname - <a href="{$BaseHref}admin/myprofile" id="EditMemberProfile"><% _t('EDITPROFILE') %></a> - <a href="Security/logout"><% _t('LOGOUT','log out') %></a> <% _t('LOGGEDINAS','Logged in as') %> $FirstName $Surname - <a href="{$BaseHref}admin/myprofile" id="EditMemberProfile"><% _t('EDITPROFILE','Profile') %></a> - <a href="Security/logout"><% _t('LOGOUT','log out') %></a>
<% end_control %> <% end_control %>
</div> </div>