Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BUG #7768 - add-button and breadcrumb translation in Security, ModelA…

…dmin

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.
  • Loading branch information...
commit deb3780a451461b3d9879eafe1377dfdd1024812 1 parent 61ea58d
@Martimiz Martimiz authored chillu committed
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' => singleton($gridField->getModelClass())->singular_name()));
+ $this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->i18n_singular_name()));
}
$data = new ArrayData(array(
View
2  forms/gridfield/GridFieldDetailForm.php
@@ -464,7 +464,7 @@ function Breadcrumbs($unlinked = false) {
)));
} else {
$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
)));
}
Please sign in to comment.
Something went wrong with that request. Please try again.