Debug generic translation of fields

This commit is contained in:
Laurent Destailleur 2020-04-21 14:54:30 +02:00
parent 1ef89eb1a1
commit 7b99ebfca5
2 changed files with 10 additions and 2 deletions

View File

@ -348,6 +348,7 @@ class Form
return ''; // No extralang field to show
}
$result .= '<!-- Widget for translation -->'."\n";
$result .= '<div class="inline-block paddingleft image-'.$object->element.'-'.$fieldname.'">';
$s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', false, 0, 0, '', 'fa-15 editfieldlang');
$result .= $s;
@ -7408,9 +7409,14 @@ class Form
$htmltext = '';
// If there is extra languages
foreach ($arrayoflangcode as $extralangcode) {
$s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
$htmltext .= $s.$object->array_languages['name'][$extralangcode];
$htmltext .= picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
if ($object->array_languages['name'][$extralangcode]) {
$htmltext .= $object->array_languages['name'][$extralangcode];
} else {
$htmltext .= '<span class="opacitymedium">'.$langs->trans("SwitchInEditModeToAddTranslation").'</span>';
}
}
$ret .= '<!-- Show translations of name -->'."\n";
$ret .= $this->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
}
}

View File

@ -1028,3 +1028,5 @@ YAxis=Y-Axis
StatusOfRefMustBe=Status of %s must be %s
DeleteFileHeader=Confirm file delete
DeleteFileText=Do you really want delete this file?
ShowOtherLanguages=Show other languages
SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for this language