Follow up for #1831530: Entity translation UI in core (part 2)

Problem/Motivation

have to edit each field to see if it has translation enabled (or if it's able to have translation enabled)

Proposed resolution

in ui on manage fields add a column to note which are translatable

Remaining tasks

  • write exact steps to get to the screen (Done)
  • screenshot (Done)
  • mark up (and screenshot) proposed additional column (Done) See #10.
  • post patch with code to that adds the column (Done) See ##1.
  • ui review
  • code review
  • write tests See #14

User interface changes

this is a ui issue. see above.

API changes

no api changes anticipated

CommentFileSizeAuthor
#51 drupal-add_column_to_manage_fields_tab-1833104-51.patch20.66 KBnagwani
#51 interdiff_45.txt9.24 KBnagwani
#51 interdiff_failpatch.txt1.58 KBnagwani
#50 drupal-add_column_to_manage_fields_tab-1833104-50-shouldfail.patch20.74 KBnagwani
#47 drupal-add_column_to_manage_fields_tab-1833104-47.patch16.69 KBnagwani
#47 interdiff.txt1.52 KBnagwani
#46 interdiff.txt9.64 KBnagwani
#45 drupal-add_column_to_manage_fields_tab-1833104-45.patch16.66 KBnagwani
#45 interdiff.txt9.64 KBnagwani
#43 drupal-add_column_to_manage_fields_tab-1833104-43.patch9 KBnagwani
#43 interdiff.txt1.05 KBnagwani
#42 Screen Shot 2012-11-25 at 6.39.35 PM.png66.19 KBnagwani
#42 Screen Shot 2012-11-25 at 6.39.51 PM.png69.07 KBnagwani
#42 Screen Shot 2012-11-25 at 6.40.10 PM.png66.33 KBnagwani
#42 Screen Shot 2012-11-25 at 6.40.42 PM.png66.86 KBnagwani
#42 drupal-add_column_to_manage_fields_tab-1833104-42.patch8.96 KBnagwani
#42 interdiff.txt7.03 KBnagwani
#38 drupal-add_column_to_manage_fields_tab-1833104-36.patch2.64 KBnagwani
#38 interdiff.txt2.87 KBnagwani
#37 add-s02-invisible-2012-11-24_0551.png161.36 KBYesCT
#37 add-s03-invisible-blank-no-2012-11-24_0553.png12.4 KBYesCT
#36 add-s01-vocab-2012-11-24_0546.png108.81 KBYesCT
#34 drupal-add_column_to_manage_fields_tab-1833104-34.patch2.34 KBnagwani
#34 interdiff.txt2.29 KBnagwani
#33 drupal-add_column_to_manage_fields_tab-1833104-33.patch2.33 KBnagwani
#32 Screen Shot 2012-11-24 at 2.20.32 PM.png68.39 KBnagwani
#32 drupal-add_column_to_manage_fields_tab-1833104-32.patch2.34 KBnagwani
#32 interdiff.txt2.14 KBnagwani
#22 drupal-add_column_to_manage_fields_tab-1833104-22.interdiff.do_not_test.patch1.59 KBplach
#22 drupal-add_column_to_manage_fields_tab-1833104-22.patch1.64 KBplach
#19 drupal-add_column_to_manage_fields_tab-1833104-19.patch1.68 KBnagwani
#19 interdiff.txt3.11 KBnagwani
#11 interdiff.txt1.57 KBnagwani
#10 drupal-add_column_to_manage_fields_tab-1833104-9.patch1.51 KBnagwani
#9 Screenshot_5.png53.15 KBnagwani
#3 Screenshot 1.png66.28 KBnagwani
#3 Screenshot 2.png29.77 KBnagwani
#6 Screenshot1.png56.58 KBnagwani
#6 drupal-add_column_to_manage_fields_tab-1833104-6.patch1.15 KBnagwani
#4 screenshot3.png60.24 KBnagwani
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yoroy’s picture

I'll trade you a machine name column :-)

tstoeckler’s picture

Regarding #1, see #1831890: Don't show "Machine name" in entity listings (as there's also some pushback on trying to remove machine names from admin overviews).

nagwani’s picture

Assigned: nagwani » Unassigned
FileSize
29.77 KB
66.28 KB

Adding steps as per point #1

Enable the Entity Translation module. To know more about how to us the entity translations, you can visit the help page [/admin/help/translation_entity]. You can reach help page by clicking on Help link next to the Entity Translation module on Extend page or by visting the help page.

To enable Entity translations for a content type Goto (Taking article content type as an example) -

1. Goto Structure->Content types (/admin/structure/types)
2. Click Edit against the name of the content type for which you want to enable tranlation (/admin/structure/types/manage/article)
3. At the end of the form open up Language settings. Under Translation, tick the checkbox Enable transation.
4. Click Save and translation should be enable for your content type. To confirm click on edit again and then on Manage fields tab (/admin/structure/types/manage/article/fields). You should see non-editable translation field available. See screenshot 1
5. Once you have enable the translation for the content type, you need to enable each field.
6. To enable for body field, click on edit next to body field (in manage fields tab).
7. Go to bottom of the form, expand global settings and tick checkbox under field translation. See screenshot 2. Click Save

You should now be all set with your content type.

Screenshot 1
Screenshot 2

nagwani’s picture

FileSize
60.24 KB

screenshot3.png

nagwani’s picture

Assigned: Unassigned » nagwani

Assigning to self. Tentatively will add something here in a day or two

nagwani’s picture

I managed to implement this. Though there are still things to do, I would appreciate review comments
Screenshot1.png

Gábor Hojtsy’s picture

Assigned: Unassigned » nagwani
Status: Active » Needs work

Thanks for the patch!

- I think it may be better to say "Translatable" and "Yes/No" as values. The "Translation" header sounds possibly misleading to me.

- The column should be before the Operations column.

- I'm not 100% sure this should be in translation_entity.module, because *theoretically* other modules could enable and implement field translation workflows, but in practice that is probably not going to happen, so it looks good where it is.

Concrete code feedback:

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -573,6 +573,23 @@ function translation_entity_field_extra_fields() {
 /**
  * Implements hook_form_FORM_ID_alter().
  */
+function translation_entity_form_field_ui_field_overview_form_alter(array &$form, array &$form_state, $form_id) {

Maybe add an extra line of comment of what is going on, something like:

Adds translation column to field overview forms.

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -573,6 +573,23 @@ function translation_entity_field_extra_fields() {
+      'label' => array(

Not indented enough (add 2 spaces).

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -573,6 +573,23 @@ function translation_entity_field_extra_fields() {
+            '#markup' => $field_data['translatable'] ? t('Enabled') : t('Disabled'),
+          ));

Indented too much (subctract 4 spaces).

YesCT’s picture

It was really nice working with @nagwani in irc. Thanks a lot; it's great to have both the mock up and a patch to play with. :)

@nagwani and I talked about possible @nagwani's idea for fanciness like having an Enable It for rows were translation can be enabled or having an Enable Translation operation s column. But concluded that we should just do the status here and not get too fancy. Doing the fanciness would be related to #1810386: Create workflow to setup multilingual for entity types, bundles and fields and #1831608: Show or hide the "Make field translatable" checkbox on the add field form depending on translatability and would complicate this issue too much.

I'd like to see

  1. something similar to #6 but without the Disabled. At this point not all rows in that table can even have translation enabled.
  2. also what it looks like on a content type with translation disabled (to make sure this doesn't break those)

Also, marking needs work because I remember from working on the translations tab overview in the main et-ui issue, that Drupal uses a pattern of having the operations be the last column for tables. So I suggest moving the translation column to be second to last.

nagwani’s picture

FileSize
53.15 KB

Updated patch with review comments. - Updated comment below

nagwani’s picture

Updated patch with review comments.

1. Changed title of the column from translation to Translatable
2. Changed data of the column to show "yes" if translation is enabled for the module. For fields not enabled, we don't show anything
3. Move the Translatable column to before operations column.

Screenshot_5.png

nagwani’s picture

FileSize
1.57 KB

Adding interdiff between patch #6 and #10

YesCT’s picture

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -589,16 +589,25 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form
 /**
  * Implements hook_form_FORM_ID_alter().
+ * Add a column to manage fields tab for a content type to show which fields are enabled for translation.
  */

The addition of the comment is nice. But wrap it at 80 chars and add a blank line between the one liner and the additional information. There are some examples in http://drupal.org/coding-standards/docs

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -589,16 +589,25 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form
+  $operations = array_pop($form['fields']['#header']);
+  $form['fields']['#header'][] = 'Translatable';
+  $form['fields']['#header'][] = $operations;

Add a comment here to explain that this is ordering the columns so that operations is last in the table because that is the normal pattern.

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -589,16 +589,25 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form
+      //Move out the operations, we need to have translatable field before operations

This needs to agree with coding standards. http://drupal.org/coding-standards/docs#inline
Add a space after // and make it grammatically correct sentence(s) with a period.

So something like:

      // Move out the operations. We need to have the translatable field in the
      // column before operations.
YesCT’s picture

@nagwani Nice work getting the interdiff posted.

what do you think we should do when none of the fields have translation enabled? Maybe hide the column?

YesCT’s picture

Issue summary: View changes

Updated done tasks

YesCT’s picture

@berdir mentioned in irc that the code should have tests.

Like:
Test that the column is there for entities with translation enabled.
Test that the column is NOT there when translation is disabled.
Test that a field with translation disabled has no value.
Test that a field with translation enabled has "Yes" value.

YesCT’s picture

Issue tags: +Needs tests

Does the "Yes" need some kind of additional tag on it for accessibility, like "yes translatable"?

nagwani’s picture

Issue tags: -Needs tests

I would sugget to hide the column if the translation is not enabled on the edit content type form. If none of the fields are enabled, i think it would be good to show the translation column to show that it is enabled on the content type page, but not for fields. Does that make sense?

nagwani’s picture

Can you guide me through on writing these tests.

Gábor Hojtsy’s picture

Issue tags: +Needs tests

I agree with #16, if the entity type has translation enabled but not any of the fields it would still make sense to show this information, so the user knows to enable something :) Not sure if the best representation of that state is the empty Translatable column.

(Also restoring tag).

nagwani’s picture

Updated all review comments from #12

YesCT’s picture

Status: Needs work » Needs review

@nagwani when you post a patch, change the status to needs review to get the test bot to test it, and to signal to others that you want them to review your patch. I'll do that now.

You still need some pointers on how to write tests, right?

nagwani’s picture

Yes @YesCT.

plach’s picture

Performed some minor adjustment. Setting to needs work since this still needs tests.

+++ b/core/modules/translation_entity/translation_entity.module
@@ -602,6 +602,36 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form
+  $form['fields']['#header'][] = 'Translatable';

Missing t() call.

+++ b/core/modules/translation_entity/translation_entity.module
@@ -602,6 +602,36 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form
+      $field_data = field_info_field($value);

Usually the variable holding the value returned by field_info_field() is called $field.

+++ b/core/modules/translation_entity/translation_entity.module
@@ -602,6 +602,36 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form
+      $form['fields'][$value]['Translatable'] = array(

The capitalized T here is misleading: it's not immediately clear we are dealing with a key.

YesCT’s picture

Issue tags: +Accessibility

In the Translatable column. I think Yes is meaning translation has been enabled on that field. I'd like to see n/a for rows where translation *cannot* be enabled. What do we put there for rows where translation could be enabled, but it is not yet? Maybe a "enable" link?

I think in the drop bottom, one of the actions there is enable translation. But i'd have to check.

I don't have experience with accessibility patterns, but I was recently helping to review #1796292: Use of undeclared variable : $original_title in core/modules/forum/forum.module on line 1232. And in there, this is used: '1 new post<span class="element-invisible"> in topic %title</span>' If that is the normal way. Perhaps here we can use that like: 'Yes<span class="element-invisible">translation is enabled</span>' and 'n/a<span class="element-invisible">translation cannot be enabled</span>'

Or are tool tips the thing to do? to clarify what Yes, No/enable, and n/a mean?

nagwani’s picture

I would suggest tooltips, since we are short on real-estate and may be other modules might also want to extend and add their own fields? Let me know and I will patch it.

YesCT’s picture

@nagwani with regards to how to write tests. http://drupal.org/node/1468170 is the docs page for "Contributor task: Write an automated test for a Drupal core bug" and that is where I would start. Also, we should look for similar code that tests things regarding a column existing. I think #1832778-42: Include translation operation in overviews for translatable entities might have some useful examples as it includes tests that are dealing with whether things exist in a table or not. (however, not there that I put the patch file first and then the tests, but it is better because of the test bot to put the tests only patch first and the whole patch second).

If someone else has another issue with tests that would be similar to what nagwani could use as a starting point, please post a link.

nagwani’s picture

Thanks @YesCT. Going through the links and hopefully will update a patch soon.

Gábor Hojtsy’s picture

@YesCT: The edit link already leads to a page where you can enable translatability (and edit all other properties displayed in the table). I'd not make the translation one special, all others are edited there, so the edit link should suffice. So those that do not have translation enabled could either say No or be empty. It might be easier to spot the Yes-es, if there are no No-s :) I don't know.

YesCT’s picture

Yeah, lets try it with no No-s. :) That also solves the how do I enable translation problem... cause they click on edit. :)

YesCT’s picture

uhg. How does this effect accessibility? visually having no No-s make it easy to spot.. but I'm wondering about screen readers. '<span class="element-invisible">translation is not enabled</span>' ? [edit: added in the code html to make the code show]

swentel’s picture

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -572,6 +572,35 @@ function translation_entity_field_extra_fields() {
+    if ($value != '_add_new_field') {

You'll need to find another way to make sure you're looking at a Field API row, because there's also the '_add_existing_field' row (or whatever key, don't know it by heart right now) and extra fields that can be on this screen as well. Contrib can add here too (like field_group). I suggest looking at the #row_type which should be on $form['fields'][$field_name']['#row_type']. The value for a field instance will be 'field', all other rows get another value there.

Additionally, you'll have to check the colspan's too if you're only adding the translation row in there - unless you always add no matter what, but even then you'll have to make sure the table doesn't break.

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -572,6 +572,35 @@ function translation_entity_field_extra_fields() {
+  foreach (element_children($form['fields']) as $field => $value) {

Use $field_name instead of $value to be consistent with core.

YesCT’s picture

@ksenzee sent me this helpful link in irc: http://zufelt.ca/blog/drupal-7-two-new-system-classes-improve-accessibility so lets try it here. Unless.. screen readers repeat the column header when they read each cell. ... Maybe I should get a screen reader! :)

nagwani’s picture

Updated patch to include the following -

1. Added code to check if the translation is enabled on entity bundle. If not we do not add the Translatable column from the Manage fields page
2. Added code to check if a field supports translation. If not we show "n/a"
3. Added invisible tags around text

Need some help in checking if a particular field supports translation. Currently I am trying to use the function field_is_translatable(), but this only check the same thing that we set on the edit field tab. So I guess this is incorrect. What we want to achieve here is to put in a check to see if a fields supports translations, if yes and translations are not enabled, we show "blank column", if enabled we show "Yes" and not supported we show "n/a".

Another workaround could be that we use the $form['#extras'] as non translatable based on the assumption that "properties" are not translatable. and all fields are. Any pointers?

Screenshot of Changes done...

Screen Shot 2012-11-24 at 2.20.32 PM.png

nagwani’s picture

Fixed code review errors.

nagwani’s picture

And another stab at the coding standards....Phew, having a bad day today!!!

nagwani’s picture

Currently working on fixing comment http://drupal.org/node/1833104#comment-6756420

Also fixing

1. Manage Comments tab
2. Manage fields tab on vocab

YesCT’s picture

I was helping in irc with this.

I dont think there is anything to "fix" about comments tab, vocab fields tab, or the configuration user account tab. Just need to get a screen shot of them, with some translatable fields added with translation enabled, and translatable field added but translation disabled.

Here is an example.
add-s01-vocab-2012-11-24_0546.png

I did get an error: Notice: Undefined index: widget_type in Drupal\field_ui\FieldOverview->validateAddExisting() (line 508 of core/modules/field_ui/lib/Drupal/field_ui/FieldOverview.php). when adding a field to a vocab, but that could be unrelated. Will have to check.

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -572,6 +572,54 @@ function translation_entity_field_extra_fields() {
+ * Add a column to manage fields tab for a content type to show which fields
+ * are enabled for translation.

we came up with a comment here that is not translation specific... it fits on one line too:

 * Add a column to manage fields tab to show which fields are translatable.
+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -572,6 +572,54 @@ function translation_entity_field_extra_fields() {
+  // Don't add the translation column of translation is not enabled at entity

should be "column if translation"

change "of" to "if"

YesCT’s picture

here is a look at the invisible words for n/a, Yes and blank (No).

add-s02-invisible-2012-11-24_0551.png

add-s03-invisible-blank-no-2012-11-24_0553.png

nagwani’s picture

Fixed

1. Review comment from comment http://drupal.org/node/1833104#comment-6756420
2. Manage comments tab. To test you will need to enable translation first
3. Manage fields tab on vocab. To test you will need to enable translation first

nagwani’s picture

Status: Needs work » Needs review
Issue tags: -Usability, -Needs tests, -language-content

Changing to needs review to trigger tests.

nagwani’s picture

Adding tags again

swentel’s picture

nagwani : nice! Only one left over piece of code that can go away:

+++ b/core/modules/translation_entity/translation_entity.moduleundefined
@@ -572,6 +572,66 @@ function translation_entity_field_extra_fields() {
+  $non_translatable_fields = $form['#extra'];

This can go away.

nagwani’s picture

Updated patch including tests for content type, comment, vocabulary, user. Fixed comment # http://drupal.org/node/1833104#comment-6770520

Currently the tests that are pending are the ones to check for the field not being displayed if translation is disabled on entity level.

Screenshots for all pages attached.

Screen Shot 2012-11-25 at 6.39.35 PM.png

Screen Shot 2012-11-25 at 6.39.51 PM.png

Screen Shot 2012-11-25 at 6.40.10 PM.png

Screen Shot 2012-11-25 at 6.40.42 PM.png

nagwani’s picture

Updated patch. Fixed a bug where in it was showing Translatable Yes even when it was not.

YesCT’s picture

Status: Needs review » Needs work

I wonder if we can write the test for Entity and then extend it, passing in the arg for ... the url of the page to look for the column on, or maybe that is an arg to the entity somewhere?

Also, lets add tests for n/a on a n/a, Yes on a translate enabled, and no on a enableable but not translatable.

And then make a tests only.
and a version of the fix that fixes it wrong. uses Foo for Yes, Foo for n/a, Foo in the blank for no and see that we get 3 fails.. of course have to write the 3 tests for Yes, n/a, and blank. Those tests would have caught the problem with #43 :)

nagwani’s picture

Added tests for n/a, Yes, not enabled.

nagwani’s picture

FileSize
9.64 KB

Added tests for n/a, Yes, not enabled.

nagwani’s picture

Fail tests. These are suppose to fail

nagwani’s picture

Status: Needs work » Needs review

Change status to trigger tests.

YesCT’s picture

Status: Needs review » Needs work
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.phpundefined
@@ -112,4 +112,51 @@ function testTranslateLinkCommentAdminPage() {
+  /**
+   * Tests translatable column on comment manage fields page for a field.
+   */
+  function testEnabledFieldTranslatableColumnManageFieldsTab() {

Dont want to confuse this with the other test that just tests for the column showing. This one is for the value in the row.

This is for a field with translation enabled.

* Tests 'Yes' in Translatable column on comment manage fields tab for a translatable field.

or

* Tests value column on comment manage fields tab for a translatable field.

(might be longer than 80 chars and need shortening)

Check the other function summaries and make sure they are clear.

+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.phpundefined
@@ -112,4 +112,51 @@ function testTranslateLinkCommentAdminPage() {
+  /**
+   * Tests translatable column on comment manage fields page for a field.
+   */
+  function testEnabledFieldTranslatableColumnManageFieldsTab() {

Dont want to confuse this with the other test that just tests for the column showing. This one is for the value in the row.

This is for a field with translation enabled.

* Tests 'Yes' in Translatable column on comment manage fields tab for a translatable field.

(might be longer than 80 chars and need shortening)

Check the other function summaries and make sure they are clear.

I think we still need a test for n/a ?

[this is just a quick look.]

nagwani’s picture

nagwani’s picture

Status: Needs work » Needs review
FileSize
1.58 KB
9.24 KB
20.66 KB

Fixed review comments from comment #49. Added check for n/a fields.

Setting to needs review to trigger tests

xjm’s picture

Great work on this so far! I have a few suggestions for organizing the tests, which I discussed with @nagwani and @YesCT in IRC.

  1. +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.phpundefined
    @@ -24,7 +24,7 @@ class CommentTranslationUITest extends EntityTranslationUITest {
    -  public static $modules = array('language', 'translation_entity', 'node', 'comment');
    +  public static $modules = array('language', 'translation_entity', 'node', 'comment', 'field', 'field_ui');
    

    Rather than adding additional modules that will be installed in all these tests, I'd suggest adding the methods to a new class, perhaps (e.g.) CommentTranslationFieldUITest. However, I need to check what's in EntityTranslationUITest. Any test methods on that class will also be run for the child class, so it's either misnamed, or intended to repeat certain tests for all the classes that extend it.

  2. +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.phpundefined
    @@ -112,4 +112,68 @@ function testTranslateLinkCommentAdminPage() {
    +  function testEnabledTranslatableColumnManageFieldsTab() {
    ...
    +  function testEnabledFieldTranslatableColumnManageFieldsTab() {
    ...
    +  function testDisabledFieldTranslatableColumnManageFieldsTab() {
    ...
    +  function testNonTranslatableFieldTranslatableColumnManageFieldsTab() {
    

    Each test method installs a new copy of Drupal, so it would be a good idea to merge these where possible rather than having a separate method for every GET request. (It's a matter of balancing manageable tests with performance, of course.)

  3. +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentTranslationUITest.phpundefined
    @@ -112,4 +112,68 @@ function testTranslateLinkCommentAdminPage() {
    +    $this->admin_user = $this->drupalCreateUser(array('administer content types', 'access administration pages', 'access content overview', 'administer nodes', 'bypass node access'));
    +    $this->drupalLogin($this->admin_user);
    

    Since this is repeated in every method, I'd suggest moving the creation of this user to a setUp() method.

  4. +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.phpundefined
    index ba9c152..f796dde 100644
    --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php
    
    +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.phpundefined
    @@ -139,4 +139,68 @@ function testTranslateLinkVocabularyAdminPage() {
    +   * Tests Yes in Translatable column on manage fields tab for a translatable field.
    +   * Also test the invisible words included for screen readers
    

    The one-line summary should generally have a blank line between it and any subsequent paragraphs. (However, in this case, we probably want to move some of this text to inline comments.

  5. Finally, it looks like some of the test methods are repeated for each entity type, with just the entity paths changed? Maybe we could refactor these into helper methods in (e.g.) an EntityFieldTranslationUITestBase or such.
xjm’s picture

I looked in EntityTranslationTest and it has several of its own test methods, none of which use any entity-related protected test class member properties that I could see. Unless there is a specific reason to run these test methods five or six times, other test classes should not be extending this class. (This was not introduced with this patch, but is potentially a bug we should keep in mind when adding new tests.) Edit: I'll double-check this when I'm less asleep and file a related issue if appropriate.

Gábor Hojtsy’s picture

@xjm: this issue deals with tests extending *EntityTranslationUITest* not *EntityTranslationTest*. The UI test only has one test common method (testTranslationUI()) and is heavily dependent on the entity type being tested. I think this might be a misunderstanding :)

klonos’s picture

Title: add column to manage fields tab to show which have translation enabled » Add a "TRANSLATABLE" column to the "MANAGE FIELDS"/"COMMENT FIELDS" tabs to show which fields have translation enabled.

...slightly better issue title. Thanx for working on this guys.

nagwani’s picture

Will post updated test patch soon. Have been out for some time now.

YesCT’s picture

Status: Needs review » Needs work
Issue tags: +Usability, +Needs tests, +Accessibility, +D8MI, +language-content

The last submitted patch, drupal-add_column_to_manage_fields_tab-1833104-51.patch, failed testing.

Bojhan’s picture

Title: Add a "TRANSLATABLE" column to the "MANAGE FIELDS"/"COMMENT FIELDS" tabs to show which fields have translation enabled. » Add a "translatable" column to Manage Fields

This feels like a pretty bad idea. I mean, the form is already super crowded - its not a "linked" setting and we don't do this for other settings in fields They are all trown under instance/widget settings - why is multilingual different? I don't see this working on anything but really wide screens.

klonos’s picture

99% of the sites I've built are multilingual. Most of these in two languages and quite a few in three. One of the repeated tasks I go through each time in order to ensure a content type is fully translatable is to check each and every field's multilingual settings. This leads to an endless back 'n' forth that is really tedious and nerve-breaking. As I add and rearrange fields to content types I need to go back and check their translatability. So, I either need to memorize the fields that are already translatable or to take notes as I do things. A total waste of time now that I know that this addition discussed here has a chance of being implemented.

I hope this answers the "why is multilingual different?" question. As for the "I don't see this working on anything but really wide screens." comment, let me kindly point you to Responsive table classes for modules and themes. So, thanx to #1276908: Administrative tables are too wide for smaller screens we can wrap the "TRANSLATABLE" column to a RESPONSIVE_PRIORITY_MEDIUM or a RESPONSIVE_PRIORITY_LOW class that will take care of hiding it when the table is displayed in smaller screens. No reason to not implement this then I guess.

Gábor Hojtsy’s picture

Klonos: the patch at #1810386: Create workflow to setup multilingual for entity types, bundles and fields has a much better overview, even across all entity types.

Gábor Hojtsy’s picture

Status: Needs work » Closed (duplicate)

So overall looks like the work here will not have a good chance to get in, however users will get an even better (and actionable) overview in #1810386: Create workflow to setup multilingual for entity types, bundles and fields where they get a UI that they can even use to make changes. So this looks like a duplicate of that one.

@nagwani: I hope you are not discouraged, you did a great job getting this patch through several reviews and improvements. It just turns out there is going to be a better solution. If you want to take on a simpler one for a break, #1869328: Restore simplicity of language list still has a task to resolve weights of items not shown once the list is saved.

Gábor Hojtsy’s picture

Issue summary: View changes

Updated issue summary remaining tasks that were done, linked to issue comment number