Skip to content
This repository
Browse code

Localization for "cancel" button in GridFieldDetailForm

  • Loading branch information...
commit ea9041df5456b3894e5a414f94a60fb3c9e98eb5 1 parent f49439c
Ingo Schommer authored September 11, 2012
9  forms/gridfield/GridFieldDetailForm.php
@@ -302,10 +302,11 @@ function ItemEditForm() {
302 302
 			$curmbs = $this->Breadcrumbs();
303 303
 			if($curmbs && $curmbs->count()>=2){
304 304
 				$one_level_up = $curmbs->offsetGet($curmbs->count()-2);
305  
-				$text = "
306  
-				<a class=\"crumb ss-ui-button ss-ui-action-destructive cms-panel-link ui-corner-all\" href=\"".$one_level_up->Link."\">
307  
-					Cancel
308  
-				</a>";
  305
+				$text = sprintf(
  306
+					"<a class=\"crumb ss-ui-button ss-ui-action-destructive cms-panel-link ui-corner-all\" href=\"%s\">%s</a>",
  307
+					$one_level_up->Link,
  308
+					_t('GridFieldDetailForm.CancelBtn', 'Cancel')
  309
+				);
309 310
 				$actions->push(new LiteralField('cancelbutton', $text));
310 311
 			}
311 312
 		}
1  lang/en.yml
@@ -232,6 +232,7 @@ en:
232 232
   GridFieldAction_Delete:
233 233
     DeletePermissionsFailure: 'No delete permissions'
234 234
   GridFieldDetailForm:
  235
+    CancelBtn: Cancel
235 236
     Create: Create
236 237
     Delete: Delete
237 238
     DeletePermissionsFailure: 'No delete permissions'

0 notes on commit ea9041d

Please sign in to comment.
Something went wrong with that request. Please try again.