MINOR Using localized name rather than model class for GridFieldAddNewButton UI (related to 74d444cf and pull request #452)

This commit is contained in:
Ingo Schommer 2012-05-29 15:22:28 +02:00
parent c3d8d82d52
commit 21beb86f8f

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' => $gridField->getModelClass()));
$this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->singular_name()));
}
$data = new ArrayData(array(