diff --git a/core/modules/config_translation/src/FormElement/PluralString.php b/core/modules/config_translation/src/FormElement/PluralString.php
index bdd012f..da216ee 100644
--- a/core/modules/config_translation/src/FormElement/PluralString.php
+++ b/core/modules/config_translation/src/FormElement/PluralString.php
@@ -20,21 +20,20 @@ class PluralString extends FormElementBase {
* {@inheritdoc}
*/
protected function getSourceElement(LanguageInterface $source_language, $source_config) {
- $element = array();
$values = explode(LOCALE_PLURAL_DELIMITER, $source_config);
$element = array(
'#type' => 'fieldset',
+ '#title' => $this->t($this->definition->getLabel()),
'#tree' => TRUE,
);
- foreach ($values as $key => $value) {
- $markup = '' . nl2br($value) . '';
+ for ($i = 0; $i < 2; $i++) {
$element[] = array(
'#type' => 'item',
'#title' => $this->t('!label (!source_language)', array(
- '!label' => ($key == 0 ? 'Singular form' : 'Plural form'),
+ '!label' => ($i == 0 ? 'Singular form' : 'Plural form'),
'!source_language' => $source_language->getName(),
)),
- '#markup' => $markup,
+ '#markup' => '' . nl2br($values[$i]) . '',
);
}
return $element;
@@ -44,11 +43,11 @@ protected function getSourceElement(LanguageInterface $source_language, $source_
* {@inheritdoc}
*/
protected function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) {
- $element = array();
$plurals = $this->getNumberOfPlurals($translation_language->getId());
$values = explode(LOCALE_PLURAL_DELIMITER, $translation_config);
$element = array(
'#type' => 'fieldset',
+ '#title' => $this->t($this->definition->getLabel()),
'#tree' => TRUE,
);
for ($i = 0; $i < $plurals; $i++) {