Page MenuHomePhabricator

ZObjects shouldn't use RequestContext::getMain()->getLanguage(); but instead be passed a render language
Open, LowPublic

Description

RequestContext::getMain()->getLanguage() is a hack that we shouldn't rely on, as ZObjects should be independent of the current request context; instead, let's pass the requested language as a parameter.

  • ZError::getErrorData() should pass a Language input to ZObject::getHumanReadable()
  • ZObject::getHumanReadable() should throw if a Language is not passed in.
  • ZKeyReference::getKeyLabel() should take a Language input, like ::getHumanReadable()