mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #425 from robbieaverill/bugfix/short-class-name-for-translation
FIX Use short class name for translation key, not fully qualified name
This commit is contained in:
commit
92004f803c
@ -3,6 +3,7 @@
|
||||
namespace SilverStripe\Blog\Model;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Core\ClassInfo;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\Tab;
|
||||
use SilverStripe\Forms\TabSet;
|
||||
@ -36,11 +37,12 @@ trait BlogObject
|
||||
*/
|
||||
public function getCMSFields()
|
||||
{
|
||||
$shortClass = ClassInfo::shortName(self::class);
|
||||
$fields = TabSet::create(
|
||||
'Root',
|
||||
Tab::create(
|
||||
'Main',
|
||||
TextField::create('Title', _t(self::class . '.Title', 'Title'))
|
||||
TextField::create('Title', _t($shortClass . '.Title', 'Title'))
|
||||
)
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user