/**
  * Update the field values for the files & images section
  * @see DataExtension::updateCMSFields()
  */
 function updateCMSFields(FieldList $fields)
 {
     // only apply the update to files (not folders)
     if ($this->owner->class != 'Folder') {
         // remove all the translated fields
         $translatedFields = TranslatableDataObject::get_localized_class_fields($this->owner->class);
         if ($translatedFields) {
             foreach ($translatedFields as $fieldName) {
                 $fields->removeByName($fieldName, true);
             }
         }
         // add the tabs from the translatable tab set to the fields
         $set = $this->owner->getTranslatableTabSet();
         foreach ($set->FieldList() as $tab) {
             $fields->addFieldToTab('Root', $tab);
         }
     }
 }