You are here

private function PoItem::formatSingular in Drupal 9

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

Formats a singular translation.

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

File

core/lib/Drupal/Component/Gettext/PoItem.php, line 262

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;
}