Follow up for #2004428: Less ugly operations altering

Problem/Motivation

Should have an alter for adding translation tab.
Currently we do: function config_translation_menu().

Proposed resolution

Add the alter hook.

Remaining tasks

patch

User interface changes

No.

API changes

Yes. (describe...)

CommentFileSizeAuthor
#6 config_translation.code_.2011332-6.patch686 bytesYesCT
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

YesCT’s picture

hmm. maybe we add the hook in core and then use it here.

Gábor Hojtsy’s picture

Title: add later for adding config translation tab » Add alter for adding config translation tab

Did you mean *alter* instead of *later*? I'm not sure how we could improve on the menu creation, it is already as simple as possible. I don't believe any of the operations patches suggest implementing menu items based on operations, so we need to make do without that and do our own menu items. So I'm not sure there is anything to do here?

YesCT’s picture

Status: Active » Closed (works as designed)
YesCT’s picture

Assigned: Unassigned » YesCT
Status: Closed (works as designed) » Active

This is an @todo in the code.

config_translation.module
37-      // For pages that do not have a default tab, we need a default local task
38-      // on this level, so that the translate tab will show up.
39:      // @todo This is not very compatible with possible other alters. Look
40-      //   into other clever ways to make this happen,
41-      //   http://drupal.org/node/2011332.
42-      $items[$path . '/edit'] = array(
43-        'title' => 'Edit',
44-        'type' => MENU_DEFAULT_LOCAL_TASK,
45-        'weight' => -100,

Since this is the best we can do, taking out the @todo.

YesCT’s picture

Assigned: YesCT » Unassigned
FileSize
686 bytes
YesCT’s picture

Status: Active » Needs review
Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Yeah I think that seems to be the best we can do. If this module is in core, people will just work with it.

vijaycs85’s picture

Status: Reviewed & tested by the community » Fixed

Committed 080878e and pushed to 8.x-1.x. Thanks!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.