mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG #7768 - add-button and breadcrumb translation in Security, ModelAdmin
The classnames on the add-new button and breadcrumbs were not translated due to the use of singular_name() instead of i18n-singular_name() in GridFieldAddNewButton and GridFieldDetailForm.
This commit is contained in:
parent
61ea58d030
commit
deb3780a45
@ -23,7 +23,7 @@ class GridFieldAddNewButton implements GridField_HTMLProvider {
|
|||||||
public function getHTMLFragments($gridField) {
|
public function getHTMLFragments($gridField) {
|
||||||
if(!$this->buttonName) {
|
if(!$this->buttonName) {
|
||||||
// provide a default button name, can be changed by calling {@link setButtonName()} on this component
|
// 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(
|
$data = new ArrayData(array(
|
||||||
|
@ -464,7 +464,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
|
|||||||
)));
|
)));
|
||||||
} else {
|
} else {
|
||||||
$items->push(new ArrayData(array(
|
$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
|
'Link' => false
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user