Permalink
Browse files

MINOR Using localized name rather than model class for GridFieldAddNe…

…wButton UI (related to 74d444c and pull request #452)
  • Loading branch information...
chillu committed May 29, 2012
1 parent c3d8d82 commit 21beb86f8fb38ff44b9cfa4668c4e67f95d8b344
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/gridfield/GridFieldAddNewButton.php
@@ -23,7 +23,7 @@ public function __construct($targetFragment = 'before') {
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(

0 comments on commit 21beb86

Please sign in to comment.