mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Make Categorization and PostOptions localizable
Allow to make localizable Blog Categorization tab and BlogPost Options tab
This commit is contained in:
parent
5c1cedeb98
commit
519fe25da1
@ -46,6 +46,7 @@ en:
|
|||||||
UsersEditorsFieldDescription: "An editor has control over specific Blogs, and all posts included within it. \n Short of being able to assign other editors to a blog, they are able to handle most changes to\n their assigned blog. <br /><br />\n Editors have these permissions:<br />\n <br />\n Update or publish any BlogPost in their Blog<br />\n Update or publish their Blog<br />\n Assign/unassign writers to their Blog<br />\n Assign/unassign contributors to their Blog<br />\n Assign/unassign any member as an author of a particular BlogPost"
|
UsersEditorsFieldDescription: "An editor has control over specific Blogs, and all posts included within it. \n Short of being able to assign other editors to a blog, they are able to handle most changes to\n their assigned blog. <br /><br />\n Editors have these permissions:<br />\n <br />\n Update or publish any BlogPost in their Blog<br />\n Update or publish their Blog<br />\n Assign/unassign writers to their Blog<br />\n Assign/unassign contributors to their Blog<br />\n Assign/unassign any member as an author of a particular BlogPost"
|
||||||
UsersWritersFieldDescription: "A writer has full control over creating, editing and publishing BlogPosts they have authored\n or have been assigned to. Writers are unable to edit BlogPosts to which they are not assigned.\n <br /><br />\n Writers have these permissions:<br />\n <br />\n Update or publish any BlogPost they have authored or have been assigned to<br />\n Assign/unassign any member as an author of a particular BlogPost they have authored or have been \n assigned to"
|
UsersWritersFieldDescription: "A writer has full control over creating, editing and publishing BlogPosts they have authored\n or have been assigned to. Writers are unable to edit BlogPosts to which they are not assigned.\n <br /><br />\n Writers have these permissions:<br />\n <br />\n Update or publish any BlogPost they have authored or have been assigned to<br />\n Assign/unassign any member as an author of a particular BlogPost they have authored or have been \n assigned to"
|
||||||
WRITER: Writer
|
WRITER: Writer
|
||||||
|
Categorisation: 'Categorisation'
|
||||||
SilverStripe\Blog\Model\BlogCategory:
|
SilverStripe\Blog\Model\BlogCategory:
|
||||||
Duplicate: 'A blog category already exists with that name.'
|
Duplicate: 'A blog category already exists with that name.'
|
||||||
PLURALNAME: 'Blog Categories'
|
PLURALNAME: 'Blog Categories'
|
||||||
@ -74,6 +75,7 @@ en:
|
|||||||
SINGULARNAME: 'Blog Post'
|
SINGULARNAME: 'Blog Post'
|
||||||
SUMMARY_DESCRIPTION: 'If no summary is specified the first 30 words will be used.'
|
SUMMARY_DESCRIPTION: 'If no summary is specified the first 30 words will be used.'
|
||||||
Tags: Tags
|
Tags: Tags
|
||||||
|
PostOptions: 'Post Options'
|
||||||
SilverStripe\Blog\Model\BlogTag:
|
SilverStripe\Blog\Model\BlogTag:
|
||||||
Duplicate: 'A blog tag already exists with that name.'
|
Duplicate: 'A blog tag already exists with that name.'
|
||||||
PLURALNAME: 'Blog Tags'
|
PLURALNAME: 'Blog Tags'
|
||||||
@ -131,3 +133,8 @@ en:
|
|||||||
SINGULARNAME: 'Blog Tags Widget'
|
SINGULARNAME: 'Blog Tags Widget'
|
||||||
Sort: Sort
|
Sort: Sort
|
||||||
Sort_Description: 'Change the order of tags shown by this widget.'
|
Sort_Description: 'Change the order of tags shown by this widget.'
|
||||||
|
SilverStripe\Blog\Admin\GridFieldMergeAction:
|
||||||
|
MovePostsTo: 'Move posts to'
|
||||||
|
SilverStripe\Blog\Admin\GridFieldCategorisationConfig:
|
||||||
|
Title: Title
|
||||||
|
Posts: Posts
|
||||||
|
@ -58,8 +58,8 @@ class GridFieldCategorisationConfig extends GridFieldConfig_RecordEditor
|
|||||||
|
|
||||||
$columns->setDisplayFields(
|
$columns->setDisplayFields(
|
||||||
[
|
[
|
||||||
'Title' => 'Title',
|
'Title' => _t(__CLASS__ . '.Title', 'Title'),
|
||||||
'BlogPostsCount' => 'Posts',
|
'BlogPostsCount' => _t(__CLASS__ . '.Posts', 'Posts'),
|
||||||
'MergeAction' => 'MergeAction',
|
'MergeAction' => 'MergeAction',
|
||||||
'Actions' => 'Actions'
|
'Actions' => 'Actions'
|
||||||
]
|
]
|
||||||
|
@ -102,9 +102,10 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$action->addExtraClass('btn btn-primary btn-sm blog-merge-action');
|
$action->addExtraClass('btn btn-primary btn-sm blog-merge-action');
|
||||||
|
$MovePostsTo = _t(__CLASS__ . '.MovePostsTo', 'Move posts to');
|
||||||
|
$MergeActionReveal = '<a title="' . $MovePostsTo . '" class="MergeActionReveal">' . $MovePostsTo . '</a>';
|
||||||
|
|
||||||
return $dropdown->Field() . $action->Field() .
|
return $dropdown->Field() . $action->Field() . $MergeActionReveal;
|
||||||
'<a title="Move posts to" class="MergeActionReveal">Move posts to</a>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -123,7 +124,7 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
|
|||||||
*/
|
*/
|
||||||
public function getColumnMetadata($gridField, $columnName)
|
public function getColumnMetadata($gridField, $columnName)
|
||||||
{
|
{
|
||||||
return ['title' => 'Move posts to'];
|
return ['title' => _t(__CLASS__ . '.MovePostsTo', 'Move posts to')];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -177,7 +177,9 @@ class Blog extends Page implements PermissionProvider
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$fields->findOrMakeTab('Root.Categorisation')->addExtraClass('blog-cms-categorisation');
|
$fields->fieldByName('Root.Categorisation')
|
||||||
|
->addExtraClass('blog-cms-categorisation')
|
||||||
|
->setTitle(_t(__CLASS__ . '.Categorisation', 'Categorisation'));
|
||||||
});
|
});
|
||||||
|
|
||||||
return parent::getCMSFields();
|
return parent::getCMSFields();
|
||||||
|
@ -324,6 +324,9 @@ class BlogPost extends Page
|
|||||||
|
|
||||||
$fields->fieldByName('Root')->setTemplate('TabSet_holder');
|
$fields->fieldByName('Root')->setTemplate('TabSet_holder');
|
||||||
|
|
||||||
|
$fields->fieldByName('Root.PostOptions')
|
||||||
|
->setTitle(_t(__CLASS__ . '.PostOptions', 'Post Options'));
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user