Problem/Motivation
A long time ago I added (string) casts to those two methods, because they were some of the few examples of TranslationWrapper (how it was called back then) and it was used in some select opt groups.
Since we do that everywhere now, we can remove this.
This also removes 1 of the 3 (!!!) remaining actual translate calls* on the frontpage as uid. This happened in entity reference property definitions as part of an entity query.
* In case you're curious, the other two are "Site header" (aria label) and "Skip to main content". *Everything* else is cached or not displayed (which was caused by the t() change and that caused the number to go down from 14 to 3).
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#9 | entity-type-label-2575493-9-interdiff.txt | 1.08 KB | Berdir |
#9 | entity-type-label-2575493-9.patch | 3.78 KB | Berdir |
#7 | entity-type-label-2575493-7-interdiff.txt | 2.99 KB | Berdir |
#7 | entity-type-label-2575493-7.patch | 3.78 KB | Berdir |
#7 | entity-type-label-2575493-7-tests-only.patch | 2.21 KB | Berdir |
Comments
Comment #2
BerdirComment #3
dawehnerLet's ensure our test coverage has the additional logic on top of it.
Comment #4
Wim Leers\o/
Comment #5
dawehnerComment #7
BerdirFixing tests and making @dawehner happy ;)
Comment #8
dawehnerNitpick: testget -> testGet
I'd have used a SafeString object, but well, its a choice of everyone
Comment #9
BerdirFixed that get :)
2. is correct, we are testing the fallback t() call in that method, we can't decide what to return.
Comment #12
dawehnerThank you!
Comment #14
alexpottCommitted 3e59ace and pushed to 8.0.x. Thanks!
Reducing the number of times things are translated is a key performance concern.