Almost every call to ParserOutput::addWarning() looks like this:
$this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning', wfEscapeWikiText( $this->title ), wfEscapeWikiText( $title ), wfEscapeWikiText( $index ) )->text() );
Instead of pushing the localization into Parsoid, the ParserOutput interface should accept a message key and arguments, and handle the wfMesssage( $key, ...$args )->text() portion itself. This would also be consistent with (eg) addTrackingCategory() which also takes a message key (not a localized category name).
Proposed new method:
public function addWarningMsg( string $key, ...$args );
(This also encourages extension authors to properly localize their warnings!)