Hit one of these; this makes it easier to figure out which string is problematic.
Details
Details
Saw UI render a string which I could more easily hunt down.
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/internationalization/PhutilTranslator.php | ||
---|---|---|
64 | Isn't this basically what idx does? |
src/internationalization/PhutilTranslator.php | ||
---|---|---|
64 | Oh, sorry, this was dirty nonsense in my working copy. Thanks for catching that. This was an alternate version of rP1984539: basically, if you have an extracted translation array like this: array( 'apple' => null, ); ...that is, you haven't written any translations yet, then idx() will select the key and you'll get null. An alternate version of this would be: $translation = coalesce(idx($this->translations, $text), $text); ...but rP1984539 was a cleaner fix. |