diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 7d775bb43..9f45ea6c0 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -1165,7 +1165,7 @@ class LeftAndMain extends Controller implements PermissionProvider { ), new FieldList( // TODO i18n - new FormAction('submit', "Go") + new FormAction('submit', _t('Form.SubmitBtnLabel', "Go")) ) ); $form->addExtraClass('cms-batch-actions nostyle'); diff --git a/admin/code/SecurityAdmin.php b/admin/code/SecurityAdmin.php index 0766c2ada..77c213a83 100755 --- a/admin/code/SecurityAdmin.php +++ b/admin/code/SecurityAdmin.php @@ -109,7 +109,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { ) ) ), - $groupsTab = new Tab('Groups', singleton('Group')->plural_name(), + $groupsTab = new Tab('Groups', singleton('Group')->i18n_plural_name(), $groupList, new HeaderField(_t('SecurityAdmin.IMPORTGROUPS', 'Import groups'), 3), new LiteralField( diff --git a/admin/templates/CMSBreadcrumbs.ss b/admin/templates/CMSBreadcrumbs.ss index 92ad8ea6a..e5ddd23bd 100644 --- a/admin/templates/CMSBreadcrumbs.ss +++ b/admin/templates/CMSBreadcrumbs.ss @@ -1,22 +1,19 @@
diff --git a/admin/templates/Includes/LeftAndMain_Menu.ss b/admin/templates/Includes/LeftAndMain_Menu.ss index e92190559..815c0a507 100644 --- a/admin/templates/Includes/LeftAndMain_Menu.ss +++ b/admin/templates/Includes/LeftAndMain_Menu.ss @@ -33,12 +33,12 @@ diff --git a/forms/gridfield/GridFieldAddNewButton.php b/forms/gridfield/GridFieldAddNewButton.php index 126cead36..fabd75146 100644 --- a/forms/gridfield/GridFieldAddNewButton.php +++ b/forms/gridfield/GridFieldAddNewButton.php @@ -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' => singleton($gridField->getModelClass())->singular_name())); + $this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->i18n_singular_name())); } $data = new ArrayData(array( diff --git a/forms/gridfield/GridFieldDetailForm.php b/forms/gridfield/GridFieldDetailForm.php index 28bfbb02f..f739514df 100644 --- a/forms/gridfield/GridFieldDetailForm.php +++ b/forms/gridfield/GridFieldDetailForm.php @@ -464,7 +464,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler { ))); } 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 ))); } diff --git a/model/DataObject.php b/model/DataObject.php index 6a1bed964..d7f5db288 100644 --- a/model/DataObject.php +++ b/model/DataObject.php @@ -3156,6 +3156,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity // Final fail-over, just list ID field if(!$fields) $fields['ID'] = 'ID'; + + // Localize fields (if possible) + $labels = $this->fieldLabels(false); + $fields = array_intersect_key($labels, $fields); return $fields; }