mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 22:28:37 +02:00
MINOR Using localized name rather than model class for GridFieldAddNewButton UI (related to 74d444cf
and pull request #452)
This commit is contained in:
parent
c3d8d82d52
commit
21beb86f8f
@ -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' => $gridField->getModelClass()));
|
$this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->singular_name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = new ArrayData(array(
|
$data = new ArrayData(array(
|
||||||
|
Loading…
Reference in New Issue
Block a user