public function test_read_translations() { $translations = $this->format->read_translations_from_file($this->translation_file, (object) array('id' => 1)); foreach ($this->entries as $sample) { list($context, $original, $translation, $comment) = $sample; $this->assertEquals($translation, $translations->translate($original, $context)); } }
/** * Overrides the value of the 'X-Generator' header field. * * @param GP_Format $format The format. * @param string $header The header field name. * @param string $text The header field value. */ public function set_header($format, $header, $text) { if ('X-Generator' === $header) { $text = 'GlotPress/[GP VERSION]'; } parent::set_header($format, $header, $text); }