Commit ce159b9f authored by sun's avatar sun Committed by tim.plunkett
Browse files

Issue #343178 by sun, dawehner | Gábor Hojtsy: Fixed Node language should be...

Issue #343178 by sun, dawehner | Gábor Hojtsy: Fixed Node language should be available without node translation being enabled.
parent 99db2eb8
......@@ -195,3 +195,28 @@ function locale_views_data() {
return $data;
}
/**
* Implements hook_views_data_alter().
*/
function locale_views_data_alter(&$data) {
// Language field
$data['node']['language'] = array(
'group' => t('Content'),
'title' => t('Language'),
'help' => t('The language the content is in.'),
'field' => array(
'handler' => 'views_handler_field_node_language',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_node_language',
),
'argument' => array(
'handler' => 'views_handler_argument_node_language',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
}
......@@ -20,26 +20,6 @@ function translation_views_data_alter(&$data) {
'field' => 'tnid',
);
// Language field
$data['node']['language'] = array(
'group' => t('Content translation'),
'title' => t('Language'),
'help' => t('The language the content is in.'),
'field' => array(
'handler' => 'views_handler_field_node_language',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_node_language',
),
'argument' => array(
'handler' => 'views_handler_argument_node_language',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
// The translation ID (nid of the "source" translation)
$data['node']['tnid'] = array(
'group' => t('Content translation'),
......
......@@ -101,6 +101,8 @@ files[] = modules/field/views_handler_argument_field_list.inc
files[] = modules/field/views_handler_argument_field_list_string.inc
files[] = modules/field/views_handler_filter_field_list.inc
files[] = modules/filter/views_handler_field_filter_format_name.inc
files[] = modules/locale/views_handler_field_node_language.inc
files[] = modules/locale/views_handler_filter_node_language.inc
files[] = modules/locale/views_handler_argument_locale_group.inc
files[] = modules/locale/views_handler_argument_locale_language.inc
files[] = modules/locale/views_handler_field_locale_group.inc
......@@ -164,13 +166,10 @@ files[] = modules/taxonomy/views_handler_filter_vocabulary_machine_name.inc
files[] = modules/taxonomy/views_handler_relationship_node_term_data.inc
files[] = modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc
files[] = modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
;files[] = modules/translation/views_handler_argument_node_language.inc
files[] = modules/system/views_handler_filter_system_type.inc
files[] = modules/translation/views_handler_argument_node_tnid.inc
files[] = modules/translation/views_handler_field_node_language.inc
files[] = modules/translation/views_handler_field_node_link_translate.inc
files[] = modules/translation/views_handler_field_node_translation_link.inc
files[] = modules/translation/views_handler_filter_node_language.inc
files[] = modules/translation/views_handler_filter_node_tnid.inc
files[] = modules/translation/views_handler_filter_node_tnid_child.inc
files[] = modules/translation/views_handler_relationship_translation.inc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment