Merge branch '3.0'

This commit is contained in:
Ingo Schommer 2012-08-10 00:19:00 +02:00
commit cac540d252
7 changed files with 19 additions and 18 deletions

View File

@ -1165,7 +1165,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
),
new FieldList(
// TODO i18n
new FormAction('submit', "Go")
new FormAction('submit', _t('Form.SubmitBtnLabel', "Go"))
)
);
$form->addExtraClass('cms-batch-actions nostyle');

View File

@ -109,7 +109,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
)
)
),
$groupsTab = new Tab('Groups', singleton('Group')->plural_name(),
$groupsTab = new Tab('Groups', singleton('Group')->i18n_plural_name(),
$groupList,
new HeaderField(_t('SecurityAdmin.IMPORTGROUPS', 'Import groups'), 3),
new LiteralField(

View File

@ -1,22 +1,19 @@
<div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
<% loop Breadcrumbs %>
<% if First %>
<% if ToplevelController %>
<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
<% else_if Controller %>
<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
<% else %>
<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
<% end_if %>
<% end_if %>
<% if ToplevelController %>
<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
<% else_if Controller %>
<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
<% else %>
<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
<% end_if %>
<% loop Breadcrumbs %>
<% if Last %>
<span class="cms-panel-link crumb last">$Title.XML</span>
<% else %>
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
<span class="sep">/</span>
<% end_if %>
<% end_loop %>
</div>

View File

@ -33,12 +33,12 @@
<ul>
<li class="first <% if Top.class == 'AssetAdmin' %>current<% end_if %>" id="Menu-AssetAdmin">
<a href="admin/assets/">
<span class="text">Edit &amp; organize</span>
<span class="text"><% _t('AssetAdmin.EditOrgMenu', 'Edit &amp; organize') %></span>
</a>
</li>
<li class="last <% if Top.class == 'CMSFileAddController' %>current<% end_if %>" id="Menu-CMSFileAddController">
<a href="admin/assets/add">
<span class="text">Add files</span>
<span class="text"><% _t('AssetAdmin.ADDFILES', 'Add files') %></span>
</a>
</li>
</ul>

View File

@ -23,7 +23,7 @@ class GridFieldAddNewButton implements GridField_HTMLProvider {
public function getHTMLFragments($gridField) {
if(!$this->buttonName) {
// provide a default button name, can be changed by calling {@link setButtonName()} on this component
$this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->singular_name()));
$this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->i18n_singular_name()));
}
$data = new ArrayData(array(

View File

@ -464,7 +464,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
)));
} else {
$items->push(new ArrayData(array(
'Title' => sprintf(_t('GridField.NewRecord', 'New %s'), $this->record->singular_name()),
'Title' => sprintf(_t('GridField.NewRecord', 'New %s'), $this->record->i18n_singular_name()),
'Link' => false
)));
}

View File

@ -3156,6 +3156,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
// Final fail-over, just list ID field
if(!$fields) $fields['ID'] = 'ID';
// Localize fields (if possible)
$labels = $this->fieldLabels(false);
$fields = array_intersect_key($labels, $fields);
return $fields;
}