New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextCollector Task throws many Warnings #823
Comments
This issue was originally flagged here: #656 (comment) |
davejtoews
added a commit
to davejtoews/silverstripe-fluent
that referenced
this issue
Feb 8, 2024
fixes tractorcow-farm#823 - The magic method __TRAIT__ was inserting namespaces into localization keys, containing slashed that could not be parsed by the TextCollector task. These have been replaced w/ the Trait name as a string
davejtoews
added a commit
to davejtoews/silverstripe-fluent
that referenced
this issue
Feb 8, 2024
fixes tractorcow-farm#823 - The magic constant __TRAIT__ was inserting namespaces into localization keys, containing slashed that could not be parsed by the TextCollector task. These have been replaced w/ the Trait name as a string
davejtoews
added a commit
to davejtoews/silverstripe-fluent
that referenced
this issue
Feb 8, 2024
fixes tractorcow-farm#823 - The magic constant __TRAIT__ was inserting namespaces into localization keys, containing slashes that could not be parsed by the TextCollector task. These have been replaced w/ the Trait name as a string
Sounds more like there's a bug in textcollector which should correctly support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)The text was updated successfully, but these errors were encountered: