From c7851daad4eebdcadfe21907347678da36b8f5e8 Mon Sep 17 00:00:00 2001 From: "Elvinas L." Date: Wed, 14 Jan 2015 11:47:55 +0200 Subject: [PATCH] Missing translations --- code/GridFieldCopyButton.php | 4 ++-- lang/en.yml | 3 +++ lang/lt.yml | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/GridFieldCopyButton.php b/code/GridFieldCopyButton.php index c4cbb0f..ae7eb70 100644 --- a/code/GridFieldCopyButton.php +++ b/code/GridFieldCopyButton.php @@ -48,7 +48,7 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat if($actionName == 'copyrecord'){ $item = $gridField->getList()->byID($arguments['RecordID']); if(!$item) return; - + if(!$item->canCreate()) { throw new ValidationException( _t('GridFieldAction_Copy.CreatePermissionsFailure',"No create permissions"),0); @@ -58,7 +58,7 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat if (!$clone || $clone->ID < 1) { user_error("Error Duplicating!", E_USER_ERROR); } - } + } } } diff --git a/lang/en.yml b/lang/en.yml index f6e9e72..560724c 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -2,3 +2,6 @@ en: GridAction: COPY_DESCRIPTION: 'Copy' Copy: 'Copy' + + GridFieldAction_Copy: + CreatePermissionsFailure: 'No create permissions' diff --git a/lang/lt.yml b/lang/lt.yml index 10909cd..676d1df 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -2,3 +2,6 @@ lt: GridAction: COPY_DESCRIPTION: 'Kopijuoti' Copy: 'Kopijuoti' + + GridFieldAction_Copy: + CreatePermissionsFailure: 'Neturite teisių sukurti/kopijuoti įrašą'