Problem/Motivation
There is no need to use t()
in tests, unless we're testing translations, however in core we do not follow this consistently, which does not set a good example for new contributions.
A rough estimation, adapted from that one of @longwave, shows that here are 4247 instances of this as of 22b08be669260979ec6a45676b16be79c89719eb
:
$ find core -type f -iname '*Test.php' | xargs grep '[^a-zA-Z]t(' | wc -l
4247
We will need to ensure to leave t()
where the test actually tests the translation system.
Proposed resolution
Scan through the list generaged by find core -type f -iname '*Test.php' | xargs grep '[^a-zA-Z]t('> remove_t_list.txt
Remove any usages of t()
if the test is not testing the translation system.
Remaining tasks
- Get confirmation about the scope from committer(s) - split up the task by core module or subsystem or something else?
- Do it.
- Review it.
- Commit it.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
N/A