Closed davejtoews closed 3 months ago
This issue was originally flagged here: https://github.com/tractorcow-farm/silverstripe-fluent/issues/656#issuecomment-713666176
Sounds more like there's a bug in textcollector which should correctly support __TRAIT__
.
Module version(s) affected
5,6,7
Description
The output of the i18nTextCollectorTask returns a number of warnings coming from this module. All are of two types:
Each instance of the second appears to be a direct result of the first.
How to reproduce
Run
/dev/tasks/i18nTextCollectorTask
with the environment set todev
or error reporting otherwise set to display PHP warnings.Possible Solution
The issue appears to be due to the use of the
__TRAIT__
magic constant w/in_t()
function calls in FluentAdminTrait, FluentBadgeTrait and FluentObjectTrait. The backslashes in the fully namespaced trait name cannot be parsed.It should be possible to resolve by replacing all instances of
__TRAIT__
with the string name of the class, or a function call which strips the namespace from the result.Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)