From 7c94e4893d6f3669c6cb139afe1dcd8b7d0b76f0 Mon Sep 17 00:00:00 2001 From: dereine Date: Sat, 15 Sep 2012 14:48:40 +0200 Subject: [PATCH] Issue #1783018 by dawehner: Fixed some of locale.views.inc and remove textgroup support. --- .../locale/Plugin/views/argument/Group.php | 52 ------------------- lib/Views/locale/Plugin/views/field/Group.php | 33 ------------ .../locale/Plugin/views/filter/Group.php | 35 ------------- modules/locale.views.inc | 30 +++++------ 4 files changed, 13 insertions(+), 137 deletions(-) delete mode 100644 lib/Views/locale/Plugin/views/argument/Group.php delete mode 100644 lib/Views/locale/Plugin/views/field/Group.php delete mode 100644 lib/Views/locale/Plugin/views/filter/Group.php diff --git a/lib/Views/locale/Plugin/views/argument/Group.php b/lib/Views/locale/Plugin/views/argument/Group.php deleted file mode 100644 index 3a640a54c048..000000000000 --- a/lib/Views/locale/Plugin/views/argument/Group.php +++ /dev/null @@ -1,52 +0,0 @@ -locale_group($data->{$this->name_alias}); - } - - /** - * Override the behavior of title(). Get the user friendly version - * of the language. - */ - function title() { - return $this->locale_group($this->argument); - } - - function locale_group($group) { - $groups = module_invoke_all('locale', 'groups'); - // Sort the list. - asort($groups); - return isset($groups[$group]) ? $groups[$group] : t('Unknown group'); - } - -} diff --git a/lib/Views/locale/Plugin/views/field/Group.php b/lib/Views/locale/Plugin/views/field/Group.php deleted file mode 100644 index 5d5a7539f9f5..000000000000 --- a/lib/Views/locale/Plugin/views/field/Group.php +++ /dev/null @@ -1,33 +0,0 @@ -get_value($values); - return isset($groups[$value]) ? $groups[$value] : ''; - } - -} diff --git a/lib/Views/locale/Plugin/views/filter/Group.php b/lib/Views/locale/Plugin/views/filter/Group.php deleted file mode 100644 index 69e238260b8d..000000000000 --- a/lib/Views/locale/Plugin/views/filter/Group.php +++ /dev/null @@ -1,35 +0,0 @@ -value_options)) { - $this->value_title = t('Group'); - $groups = module_invoke_all('locale', 'groups'); - // Sort the list. - asort($groups); - $this->value_options = $groups; - } - } - -} diff --git a/modules/locale.views.inc b/modules/locale.views.inc index a18c80ad5a89..934a07787a94 100644 --- a/modules/locale.views.inc +++ b/modules/locale.views.inc @@ -64,23 +64,6 @@ function locale_views_data() { ), ); - // Group field - $data['locales_source']['textgroup'] = array( - 'group' => t('Locale source'), - 'title' => t('Group'), - 'help' => t('The group the translation is in.'), - 'field' => array( - 'id' => 'locale_group', - 'click sortable' => TRUE, - ), - 'filter' => array( - 'id' => 'locale_group', - ), - 'argument' => array( - 'id' => 'locale_group', - ), - ); - // Source field $data['locales_source']['source'] = array( 'group' => t('Locale source'), @@ -94,6 +77,19 @@ function locale_views_data() { ), ); + // Source field + $data['locales_source']['context'] = array( + 'group' => t('Locale source'), + 'title' => t('Context'), + 'help' => t('The context this string applies to.'), + 'field' => array( + 'id' => 'standard', + ), + 'filter' => array( + 'id' => 'string', + ), + ); + // Version field $data['locales_source']['version'] = array( 'group' => t('Locale source'),