/** * Parse a node value and create a POEntry item if it has a value. * * @param \Gettext\Translations $translations Will be populated with found entries. * @param string $filenameRel The relative file name of the xml file being read. * @param \DOMNode $node The current node. * @param string $context='' The translation context. */ private static function parseXmlNodeValue(\Gettext\Translations $translations, $filenameRel, \DOMNode $node, $context = '') { $value = (string) $node->nodeValue; if ($value !== '') { $translation = $translations->insert($context, $value); $translation->addReference($filenameRel, $node->getLineNo()); } }