I would like to supply a patch for the entity translation module to form alter the Manage Fields form to add a class to the field name based on if the field is translatable or not. This way, i can colour code fields which are translatable to more easily manage which are/aren't set this way. (i did a similar patch to the Fields section of the Views admin page to show which fields are hidden).

Any idea what is the best way to tell the translatable settings for a field? I thought possibly this would be part of the field info that comes with the fields in this form; but sadly it isn't.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

liquidcms’s picture

Status: Closed (fixed) » Active

nope, doesn't work.

and looking at code for that function all it is basically doing is returning the $field['translatable'] value which doesn't exist in the form alter. so most likely the step required is how to load a field as the full field info doesn't appear to be available on the Manage Fields form.

liquidcms’s picture

Status: Active » Closed (fixed)

field_info_field()

liquidcms’s picture

Category: support » feature
Status: Closed (fixed) » Needs review
FileSize
1.23 KB

changing title, category, status to move this to review attached patch

so i created the patch i elude to above which marks translatable fields on the Manage Fields admin page: http://screencast.com/t/iNuq8SB6a

i liked single color change but a colleague said it wasn't too clear so tacked on TR flag . i wrapped both in spans and added a small css file to set a default for these to match screenshot. people can simply override any of this in css (or string override). i prefer this to what is so far committed for the Views patch i submitted to highlight hidden fields on the views admin page. in that case only thing i was able to get committed was adding a class to the field. which is relatively useless since no one will know there is a method to show hidden fields without some sort of default styling included.

btw.. can't get git to give me a proper patch that adds in the new css file.. so this is from svn

liquidcms’s picture

Title: how to tell if a field is translatable? » mark fields as translatable

and title change

Status: Needs review » Needs work

The last submitted patch, higlight_translatable_fields-1503034-5948004.patch, failed testing.

bforchhammer’s picture

Note that something similar has been committed to the ml_edit_form branch, see #1282018-78: Improve UX of language-aware entity forms.

liquidcms’s picture

ahh.. yea, i like it there too; but not really the same place i am suggesting to highlight. the Manage Fields form is where developers will be managing fields, including enabling some as translatable.. and provides the only place (other than the field list report) to easily see all the fields listed in a table.

although handy, your approach of seeing it on the node edit form i would guess is more for translating the actual content as opposed to field design.

perhaps i should x-post to that thread? although it still seems more about content translation whereas my patch is more for field management.