Skip to content

Commit

Permalink
Fix unnamespaced i18n keys (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Mooyman authored and dhensby committed Jul 4, 2017
1 parent 59f4f6b commit 9c213ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lang/en.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
en:
LeftAndMain:
SAVEDERROR: Error.
SilverStripe\CampaignAdmin\AddToCampaignHandler:
AddToCampaignAddAction: Add
AddToCampaignAvailableLabel: 'Available campaigns'
Expand All @@ -20,4 +18,5 @@ en:
ERROR_DUPLICATE_NAME: 'Name "{Name}" already exists'
MENUTITLE: Campaigns
SAVE: Save
SAVEDERROR: Error.
SAVEDUP: Saved.
2 changes: 1 addition & 1 deletion src/CampaignAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public function save($data, $form)
$nameDuplicateMsg = _t(__CLASS__ . '.ERROR_DUPLICATE_NAME', 'Name "{Name}" already exists', '', [ 'Name' => $data['Name']]);
$errors = new ValidationResult();
$errors->addFieldMessage('Name', $nameDuplicateMsg);
$message = _t('LeftAndMain.SAVEDERROR', 'Error.');
$message = _t(__CLASS__.'.SAVEDERROR', 'Error.');
// Need to set the form message or the field message won't show up at all
$form->setMessage($message, ValidationResult::TYPE_ERROR);
}
Expand Down

0 comments on commit 9c213ff

Please sign in to comment.