original_string: public function translateProperty(AbstractRenderable $element, string $property): string
      {
          if ($property === 'label') {
              $defaultValue = $element->getLabel();
              if ($defaultValue === null) {
                  $defaultValue = '';
              }
          } elseif ($element instanceof FormElementInterface) {
              $defaultValue = isset($element->getProperties()[$property]) ? (string)$element->getProperties()[$property] : '';
          } else {
              $defaultValue = '';
          }
          $translationId = sprintf('forms.elements.%s.%s', $element->getIdentifier(), $property);
          return $this->translate($element, $translationId, $defaultValue);
      }
code: public function translateProperty(AbstractRenderable $element, string $property): string
      {
          if ($property === 'label') {
              $defaultValue = $element->getLabel();
              if ($defaultValue === null) {
                  $defaultValue = '';
              }
          } elseif ($element instanceof FormElementInterface) {
              $defaultValue = isset($element->getProperties()[$property]) ? (string)$element->getProperties()[$property] : '';
          } else {
              $defaultValue = '';
          }
          $translationId = sprintf('forms.elements.%s.%s', $element->getIdentifier(), $property);
          return $this->translate($element, $translationId, $defaultValue);
      }
code_tokens: public function translateProperty ( AbstractRenderable $ element , string $ property ) : string { if ( $ property === 'label' ) { $ defaultValue = $ element -> getLabel ( ) ; if ( $ defaultValue === null ) { $ defaultValue = '' ; } } elseif ( $ element instanceof FormElementInterface ) { $ defaultValue = isset ( $ element -> getProperties ( ) [ $ property ] ) ? ( string ) $ element -> getProperties ( ) [ $ property ] : '' ; } else { $ defaultValue = '' ; } $ translationId = sprintf ( 'forms.elements.%s.%s' , $ element -> getIdentifier ( ) , $ property ) ; return $ this -> translate ( $ element , $ translationId , $ defaultValue ) ; }
docstring: Translates the property of a given Form Element
  
  @param AbstractRenderable $element
  @param string $property
  @return string
docstring_tokens: Translates the property of a given Form Element