Problem/Motivation

1. Enable content translation module.
2. Now you'll have a translate tab on an article you create. Although no configuration on articles to be translatable. And no fields are translatable. (This is being resolved in #2154701: Regression: Contextual links broken, tabs erroneously added after enabling content translation module).
3. The no fields translatable button leads to the field UI list page for the content type, where its pretty darn hard to configure each field one by one to be translatable. We have a nice all-in-one screen for that now. (To be resolved here).

Proposed resolution

The link should lead to a better place.

Remaining tasks

Do it.

User interface changes

Button goes to more useful place.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Attached patch solves only problem 2 for now.

Status: Needs review » Needs work

The last submitted patch, 1: content-translation-fields.patch, failed testing.

Gábor Hojtsy’s picture

Title: Translation tab appears when it should not; no fields link misleading » No fields link points to misleading place
Issue summary: View changes
Issue tags: +Usability

Rescoped now that we found out tabs have the same bug that contextual links and are to be fixed in #2154701: Regression: Contextual links broken, tabs erroneously added after enabling content translation module then. Only the "no fields" link is in scope here.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
912 bytes
2.66 KB

The overall page requires admin languages permission, so let's give that to the admin.

tim.plunkett’s picture

Ah, this confused me greatly when I was manually testing in other issues, I'm glad it wasn't just me!

  1. +++ b/core/modules/content_translation/content_translation.pages.inc
    @@ -23,7 +23,7 @@ function content_translation_overview(EntityInterface $entity) {
    +  $administrator = user_access('administer languages');
    

    Might as well switch this to \Drupal::currentUser()->hasPermission('administer languages'); while you're here.

  2. +++ b/core/modules/content_translation/content_translation.pages.inc
    @@ -122,12 +122,8 @@ function content_translation_overview(EntityInterface $entity) {
    +            $links['nofields'] = array('title' => t('No translatable fields'), 'href' => 'admin/config/regional/content-language', 'language' => $language);
    

    Can we also switch this to use the route name?

Gábor Hojtsy’s picture

Thanks! This should fix those two concerns. Looks good? :)

klonos’s picture

Title: No fields link points to misleading place » "No translatable fields" link points to misleading place.
penyaskito’s picture

Status: Needs review » Reviewed & tested by the community

Summary up to date. #5 addressed, manual testing looks OK. RTBCing then.

tim.plunkett’s picture

Nope, RTBC +1!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Gábor Hojtsy’s picture

Issue tags: -sprint

Yay, thanks!

Status: Fixed » Closed (fixed)

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