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:
Niklas Forsdahl 2012-09-28 11:53:43 +03:00
parent 229fed8f03
commit 9a6fd502b7

View File

@ -65,15 +65,15 @@ class Widget extends DataObject {
}
function Title() {
return Object::get_static($this->class, 'title');
return _t($this->class.'.TITLE', Object::get_static($this->class, 'title'));
}
function CMSTitle() {
return Object::get_static($this->class, 'cmsTitle');
return _t($this->class.'.CMSTITLE', Object::get_static($this->class, 'cmsTitle'));
}
function Description() {
return Object::get_static($this->class, 'description');
return _t($this->class.'.DESCRIPTION', Object::get_static($this->class, 'description'));
}
function DescriptionSegment() {