You are here

private function PoItem::formatSingular in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Component/Gettext/PoItem.php \Drupal\Component\Gettext\PoItem::formatSingular()

Formats a singular translation.

1 call to PoItem::formatSingular()
PoItem::formatItem in lib/Drupal/Component/Gettext/PoItem.php
Format the POItem as a string.

File

lib/Drupal/Component/Gettext/PoItem.php, line 257
Contains \Drupal\Component\Gettext\PoItem.

Class

PoItem
PoItem handles one translation.

Namespace

Drupal\Component\Gettext

Code

private function formatSingular() {
  $output = '';
  $output .= 'msgid ' . $this
    ->formatString($this->_source);
  $output .= 'msgstr ' . (isset($this->_translation) ? $this
    ->formatString($this->_translation) : '""');
  return $output;
}