Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Using localized name rather than model class for GridFieldAddNe…

…wButton UI (related to 74d444c and pull request #452)
  • Loading branch information...
commit 21beb86f8fb38ff44b9cfa4668c4e67f95d8b344 1 parent c3d8d82
@chillu chillu authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  forms/gridfield/GridFieldAddNewButton.php
View
2  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(
Please sign in to comment.
Something went wrong with that request. Please try again.