Project:Internationalization Views
Version:7.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

The i18n node module offer an option (i18n_node_translation_switch) that creates links to translated versions of a node in the target language, on the node translation overview page.

It would be great that such variable is used in the node edit link views handler to reflect such behavior.

Comments

#1

Status:active» needs review
AttachmentSize
views-node-edit-link-i18n-aware-1453730-1.patch 905 bytes

#2

Very rarely does views use module_exists for contrib modules (devel and advanced_help).
Couldn't i18n_node just extend views_handler_field_node_link_edit and override render_link()?

#3

Project:Views» Internationalization Views
Version:7.x-3.x-dev» 7.x-3.x-dev
Component:node data» Code

Let's i18nviews does this.

#4

Status:needs review» needs work

Please submit a patch against i18nviews 7.x-3.x

#5

Status:needs work» needs review

The attached patch implements such functionality.

This patch may wait for #1551688: Drop 'Switch interface for translating' option (Reconsider) to be eventually fixed, since the 'interface switching' option has been removed from the 2 last i18n releases...

AttachmentSize
i18n_views-make-node-edit-link-i18n-aware-1453730-5.patch 1.42 KB

#6

Status:needs review» needs work

Hmm, includes/i18nviews_handler_field_node_link_edit.inc is missing in your patch.

#7

Status:needs work» needs review

Sorry, forgot to add it into GIT...

AttachmentSize
i18n_views-make-node-edit-link-i18n-aware-1453730-7.patch 3.41 KB

#8

The updated patch.

AttachmentSize
i18n_views-make-node-edit-link-i18n-aware-1453730-8.patch 3.97 KB

#9

I'm not sure if we should switch the handler.
For most other cases we have announced a separate one.
Note that if other modules try to switch the handler, there's a clash. Extensibility is limited.

#10

I understand. Here is a patch that does not override the original handler.

AttachmentSize
i18n_views-make-node-edit-link-i18n-aware-1453730-10.patch 3.6 KB