mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
ENHANCEMENT: Made title, cmstitle and description on widgets translatable
Made title, cmsTitle and description properties translatable for widgets by using the _t() function in the properties respective getters (using the static property as the default translation as not to change the behaviour when no translations exist). Uppercase TITLE, CMSTITLE and DESCRIPTION translation strings used...
This commit is contained in:
parent
229fed8f03
commit
9a6fd502b7
@ -65,15 +65,15 @@ class Widget extends DataObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Title() {
|
function Title() {
|
||||||
return Object::get_static($this->class, 'title');
|
return _t($this->class.'.TITLE', Object::get_static($this->class, 'title'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function CMSTitle() {
|
function CMSTitle() {
|
||||||
return Object::get_static($this->class, 'cmsTitle');
|
return _t($this->class.'.CMSTITLE', Object::get_static($this->class, 'cmsTitle'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function Description() {
|
function Description() {
|
||||||
return Object::get_static($this->class, 'description');
|
return _t($this->class.'.DESCRIPTION', Object::get_static($this->class, 'description'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function DescriptionSegment() {
|
function DescriptionSegment() {
|
||||||
|
Loading…
Reference in New Issue
Block a user