MNT resolve translation lint failures (#776)

This commit is contained in:
Guy Sartorelli 2024-08-13 17:01:21 +12:00 committed by GitHub
parent d77d90bf13
commit 6e3cf9d2e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,7 @@ trait BlogObject
'Root', 'Root',
Tab::create( Tab::create(
'Main', 'Main',
TextField::create('Title', _t(__CLASS__ . '.Title', 'Title')) TextField::create('Title', $this->fieldLabel('Title'))
) )
); );

View File

@ -85,6 +85,7 @@ class BlogArchiveWidget extends Widget
$type = $archiveType->enumValues(); $type = $archiveType->enumValues();
foreach ($type as $k => $v) { foreach ($type as $k => $v) {
/** @phpstan-ignore translation.key (we need the key to be dynamic here) */
$type[$k] = _t(__CLASS__ .'.' . ucfirst(strtolower($v ?? '')), $v); $type[$k] = _t(__CLASS__ .'.' . ucfirst(strtolower($v ?? '')), $v);
} }