Skip to content

Commit

Permalink
MINOR i18n on GridFieldRelationAdd, GridFieldFilter and GridFieldItem…
Browse files Browse the repository at this point in the history
…EditVIew template
  • Loading branch information
Stig Lindqvist committed Jan 24, 2012
1 parent 008ecf7 commit 28906d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions forms/gridfield/GridFieldFilter.php
Expand Up @@ -83,8 +83,8 @@ public function getHTMLFragments($gridField) {
if($currentColumn == count($columns)) {
$field = new FieldGroup(
$field,
new GridField_Action($gridField, 'filter', 'filter', 'filter', null),
new GridField_Action($gridField, 'reset', 'reset', 'reset', null)
new GridField_Action($gridField, 'filter', _t('GridField.Filter', "Filter"), 'filter', null),
new GridField_Action($gridField, 'reset', _t('GridField.ResetFilter', "Reset"), 'reset', null)
);

}
Expand Down
7 changes: 3 additions & 4 deletions forms/gridfield/GridFieldRelationAdd.php
Expand Up @@ -65,13 +65,12 @@ public function getHTMLFragments($gridField) {
$forTemplate->Fields = new ArrayList();

$value = $this->findSingleEntry($gridField, $this->fieldToSearch, $searchState, $gridField->getList()->dataClass);
$searchField = new TextField('gridfield_relationsearch', 'Auto Suggest Search field', $value);
$searchField = new TextField('gridfield_relationsearch', _t('GridField.RelationSearch', "Relation search"), $value);
// Apparently the data-* needs to be double qouted for the jQuery.meta data plugin
//
$searchField->setAttribute('data-search-url', '\''.Controller::join_links($gridField->Link('search').'\''));

$findAction = new GridField_Action($gridField, 'gridfield_relationfind', 'Find', 'find', 'find');
$addAction = new GridField_Action($gridField, 'gridfield_relationadd', 'Add Relation', 'addto', 'addto');
$findAction = new GridField_Action($gridField, 'gridfield_relationfind', _t('GridField.Find', "Find"), 'find', 'find');
$addAction = new GridField_Action($gridField, 'gridfield_relationadd', _t('GridField.Add', "Add"), 'addto', 'addto');

// If an object is not found, disable the action
if(!is_int($gridField->State->GridFieldAddRelation)) {
Expand Down
2 changes: 1 addition & 1 deletion templates/Includes/GridFieldItemEditView.ss
@@ -1,3 +1,3 @@
<a href="$Backlink"> Go back the way you came!</a>
<a href="$Backlink"><% _t('Go back', 'Go back' ) </a>

$ItemEditForm

0 comments on commit 28906d4

Please sign in to comment.