dynamic/silverstripe-elemental-baseobject

BUG : Unable to translate "Title" label

Closed this issue · 1 comments

Describe the bug
When setting 'TitleLabel' in my de.yml the Title label doesn't translate properly.

To Reproduce
my translations:

de:
  Dynamic\BaseObject\Model\BaseElementObject:
    TitleLabel: Titel
    ImageLabel: Bild

Switch locale to "de_DE", goto backend. Image label is translated as intended, Title not.

Expected behavior
Title should be translated ;)

Additional context
IMHO the bug is in https://github.com/dynamic/silverstripe-elemental-baseobject/blob/3.0/src/Model/BaseElementObject.php#L136-L137 ; it should be:

               TextCheckboxGroupField::create()
                    ->setName('Title')
                    ->setTitle($this->fieldLabel('Title'))

This also causes TimelineObject to not show the field for Year, cause it tries to insert after Title, which got accidently renamed to "Titel" in de_DE