Files: 
CommentFileSizeAuthor
#23 config_translation-alter-2004428-22.patch3.44 KBYesCT
PASSED: [[SimpleTest]]: [MySQL] 339 pass(es).
[ View ]
#23 interdiff-17-22.txt449 bytesYesCT
#17 config_translation-alter-2004428-17.patch3.4 KBYesCT
PASSED: [[SimpleTest]]: [MySQL] 339 pass(es).
[ View ]
#8 config_translation-alter-2004428-8.patch1.59 KBYesCT
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch config_translation-alter-2004428-8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#8 interdiff-4-8.txt2.15 KBYesCT
#6 config_translation-alter-2004428-4.patch2.18 KBYesCT
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to create dependency directory.
[ View ]
#6 interdiff-1-4.txt2.18 KBYesCT
#4 operations_alter-2004408-7.patch3.85 KBYesCT
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to create dependency directory.
[ View ]
#4 interdiff-6-7.txt688 bytesYesCT
#1 config_translation-alter-2004428-1.patch1.22 KBYesCT
PASSED: [[SimpleTest]]: [MySQL] 269 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.22 KB
PASSED: [[SimpleTest]]: [MySQL] 269 pass(es).
[ View ]

admin/structure/taxonomy

Error message
    Notice: Undefined offset: 3 in _menu_translate() (line 757 of core/includes/menu.inc).
    Symfony\Component\Routing\Exception\ResourceNotFoundException: in Drupal\Core\Routing\RouteProvider->getRouteCollectionForRequest() (line 122 of /Users/ctheys/foo/drupal/core/lib/Drupal/Core/Routing/RouteProvider.php).

this passes because we dont have test for taxonomy listing page to see if the translate link is in the operations drop button

Status:Needs review» Needs work

taxonomy is not a good example in this case. (page is broken for config trans even without this patch)
trying a different one.

Status:Needs work» Needs review
StatusFileSize
new688 bytes
new3.85 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to create dependency directory.
[ View ]

I put back in the taxonomy one.

I took out formats (admin/config/content/formats/)

also fixed the name of the hook (to be operation not operations). See #2004408-7: Allow modules to alter the result of EntityListController::getOperations

Status:Needs review» Needs work

The last submitted patch, operations_alter-2004408-7.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new2.18 KB
new2.18 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to create dependency directory.
[ View ]

oops. that was totally the wrong files to upload here.

Status:Needs review» Needs work

The last submitted patch, config_translation-alter-2004428-4.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new2.15 KB
new1.59 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch config_translation-alter-2004428-8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

I put back the formats,
took out the contact message...
it worked!!!

I took out the test word so it just says Translate after testing.

Status:Needs review» Needs work

The last submitted patch, config_translation-alter-2004428-8.patch, failed testing.

Status:Needs work» Needs review

the other things did not work here because they do not use the entity list controller.

next steps: grep for "list" =
in the annotations.

then look for issues for lists that do not use the entity list controller.
Find those issues if there are some for converting and link them

Status:Needs review» Needs work

The last submitted patch, config_translation-alter-2004428-8.patch, failed testing.

Assigned:Unassigned» YesCT

I'll go!

ok. the patches above are a little messed up, because they are really an interdiff to 1 in some cases.

anyway,

grep -R '"list" = ' * 2>&1 | grep -v -i permission

core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlockType.php: *     "list" = "Drupal\custom_block\CustomBlockTypeListController"
core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php: *     "list" = "Drupal\block\BlockListController",
core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigQueryTest.php: *     "list" = "Drupal\Core\Config\Entity\ConfigEntityListController",
core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php: *     "list" = "Drupal\Core\Config\Entity\ConfigEntityListController",
core/modules/contact/lib/Drupal/contact/Plugin/Core/Entity/Category.php: *     "list" = "Drupal\contact\CategoryListController",
core/modules/picture/lib/Drupal/picture/Plugin/Core/Entity/PictureMapping.php: *     "list" = "Drupal\picture\PictureMappingListController",
core/modules/shortcut/lib/Drupal/shortcut/Plugin/Core/Entity/Shortcut.php: *     "list" = "Drupal\shortcut\ShortcutListController",
core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Vocabulary.php: *     "list" = "Drupal\taxonomy\VocabularyListController",
core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php: *     "list" = "Drupal\user\RoleListController",

lists those with the list controller.

(oh! ag is nice. brew install ag I think)

------------

I have more notes to organize and post, but for now, I need help with the below so I'm saving this comment. :)

mabye similar to #2004690: taxonomy page broken ,
the roles (and user) page is broken with:
LogicException: Unable to parse the controller name "user_admin". in Drupal\Core\Controller\ControllerResolver->createController() (line 91 of /Users/ctheys/foo/drupal/core/lib/Drupal/Core/Controller/ControllerResolver.php).
The website has encountered an error. Please try again later.

Do we have an issue for that?
What core issue broke it?

[edit: #2019831: people and roles page broken ]

Assigned:YesCT» Unassigned
Status:Needs work» Needs review
StatusFileSize
new3.4 KB
PASSED: [[SimpleTest]]: [MySQL] 339 pass(es).
[ View ]

This starts over, so no interdiff.

takes out alters for listings that work with the new hook.

Notes for myself:
left in

+    'title' => t('Translate badabumm'),

because, for now, it's helping me know what is responsible for putting Translate in the operations.

badabumm (has a list controller) http://localhost/drupal/admin/structure/custom-blocks
Translate (has a list controller) http://localhost/drupal/admin/structure/block
badabumm (has a list controller) http://localhost/drupal/admin/structure/contact
badabumm (has a list controller) http://localhost/drupal/admin/config/media/picturemapping
badabumm (has a list controller) http://localhost/drupal/admin/config/user-interface/shortcut/
badabumm (has a list controller) http://localhost/drupal/admin/structure/taxonomy
broken (has a list controller) http://localhost/drupal/admin/people/roles Notice: Undefined offset: 4 in _menu_translate() (line 766 of core/includes/menu.inc).
Translate http://localhost/drupal/admin/config/content/formats
Translate http://localhost/drupal/admin/structure/views
Translate http://localhost/drupal/admin/structure/menu

double checking the list from
function config_translation_config_translation_group_info() {
checking these too.
these are forms, but not listings that would get a Translate operation link.
no translate tab admin/config/development/maintenance
Translate tab admin/config/system/site-information
Translate tab admin/config/people/accounts

config_translation_form_alter()
still has:
if ($form_id == 'filter_admin_overview') {
'href' => 'admin/config/content/formats/' . $id . '/translate',

if ($form_id == 'user_admin_roles') {
'href' => 'admin/people/roles/edit/' . $id . '/translate',

if ($form_id == 'block_admin_display_form') {
'href' => 'admin/structure/block/manage/' . $id . '/translate',

config_translation_page_alter()
still has:
'href' => 'admin/structure/views/view/' . $id . '/translate',
'href' => 'admin/structure/menu/manage/' . $id . '/translate',

I'll be back at this later.
I'm a bit confused because it looked like block has a list controller, and I thought that would work with the new way...
So I need to figure out how the list controller interacts with this.

I don't think we have issues about list controllers to be added to modules that don't use them yet. Individual issues may exist. I'm not sure we need yet another META issue for that :D

I'm not sure how to get menu to be nicer and use the config_translation_entity_operation_alter().
See #2019647: Use EntityListController for menus for discussion on how there already *is* a menu list controller.

here are all the ListControllers

$ find core -name *ListController.php -print
core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php
core/lib/Drupal/Core/Entity/Controller/EntityListController.php
core/lib/Drupal/Core/Entity/EntityListController.php
core/modules/action/lib/Drupal/action/ActionListController.php
core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeListController.php
core/modules/block/lib/Drupal/block/BlockListController.php
core/modules/contact/lib/Drupal/contact/CategoryListController.php
core/modules/menu/lib/Drupal/menu/MenuListController.php
core/modules/picture/lib/Drupal/picture/PictureMappingListController.php
core/modules/shortcut/lib/Drupal/shortcut/ShortcutListController.php
core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyListController.php
core/modules/user/lib/Drupal/user/RoleListController.php
core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php

Menu, Views
are in there, and were missing from the grep for "list" annotation from before. So they have controllers, but the hook isn't working on them.

I dont see the format in there at all. We need look to see if there is an issue for it to use a ListController

+++ b/config_translation.moduleundefined
@@ -271,6 +271,18 @@ function config_translation_config_translation_group_info() {
+function config_translation_entity_operation_alter(array &$operations, \Drupal\Core\Entity\EntityInterface $entity) {
+  $uri = $entity->uri();
+  $operations['translate'] = array(

Maybe better to make this conditional - only show the link when entity support translation or (translation enabled)

Issue summary:View changes

added entity operations api issue

Also patch needs to make sure that parent::getOperations() called from each controller

StatusFileSize
new449 bytes
new3.44 KB
PASSED: [[SimpleTest]]: [MySQL] 339 pass(es).
[ View ]

I dont think there is a tag that config is translatable.

I think it all is.
We use the schema's to decide what parts are translatable.

Content translation on the other hand is different, in core and does check.

---

This does add the options andypost asked for in irc.

I tried the suggestion from #22
I checked for $operations = parent::getOperations($entity); and it's in both the menu and the view list controller.

So adding that wont help.

Status:Needs review» Needs work

The last submitted patch, config_translation-alter-2004428-22.patch, failed testing.

Status:Needs work» Needs review

Status:Needs review» Fixed

I committed this one! We should work on followups (in core) to make sure the others can be eliminated. We should also increase test coverage in #2004710: Add tests for block, menu, vocabulary and views listings.

Issue summary:View changes

added issue about the roles.

Status:Fixed» Closed (fixed)

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

Issue summary:View changes

added follow-ups

Issue summary:View changes

added follow-up for remaining alter removal (for blocks)