updated i18n, views, imagestyleflush, field_group

patch views_rss_media
This commit is contained in:
2019-05-14 10:14:51 +02:00
parent 9adc940a67
commit c97e0f8ba1
142 changed files with 4489 additions and 786 deletions

View File

@@ -0,0 +1,82 @@
CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Recommended modules
* Installation
* Configuration
* Maintainers
INTRODUCTION
------------
The Multilingual select module, part of the Internationalization
(https://www.drupal.org/project/i18n) package, allows the user to define whether
content is filtered by language on pages provided by Drupal core.
* For a full description of the module visit:
https://www.drupal.org/node/1279512.
* To submit bug reports and feature suggestions, or to track changes visit
https://www.drupal.org/project/issues/i18n.
REQUIREMENTS
------------
This module requires the following module:
* Internationalization - https://www.drupal.org/project/i18n
* Variable - https://www.drupal.org/project/variable
RECOMMENDED MODULES
-------------------
* Internationalization Views - https://www.drupal.org/project/i18nviews
* Language Icons - https://www.drupal.org/project/languageicons
* Translation Overview - https://www.drupal.org/project/translation_overview
* Localization Client - https://www.drupal.org/project/l10n_client
* Internationalization contributions -
https://www.drupal.org/project/i18n_contrib
INSTALLATION
------------
This is a submodule of the Internationalization module. Install the
Internationalization module as you would normally install a contributed Drupal
module. Visit https://www.drupal.org/node/895232 for further information.
CONFIGURATION
-------------
The module allows the user to configure whether or not to filter pages by the
current language. If the Taxonomy translation submodule is also enabled, an
option will be available for how taxonomy term pages are filtered. It also
allows the exclusion of the modules language selection handling for some
elements and certain paths.
1. Enable the Multilingual select module included with Internationalization.
2. Navigate to Configuration > Regional and language > Multilingual settings >
Selection.
3. Select nodes and taxonomy can be filtered by language in the Content to
Filter by Language field set.
4. The "Content Selection Mode" allows content with specific tags to be skipped
by entering a list of tags.
5. The "Enable for Specific Pages" field set allows specific pages to be
included by path.
6. After making choices, Save configuration.
MAINTAINERS
-----------
* Jose Reyero - https://www.drupal.org/u/jose-reyero
* Florian Weber (webflo) - https://www.drupal.org/u/webflo
* Peter Philipp - https://www.drupal.org/u/das-peter
* Joseph Olstad - https://www.drupal.org/u/joseph.olstad
* Nathaniel Catchpole - https://www.drupal.org/u/catch

View File

@@ -6,9 +6,8 @@ core = 7.x
configure = admin/config/regional/i18n/select
files[] = i18n_select.test
; Information added by Drupal.org packaging script on 2015-05-07
version = "7.x-1.13"
; Information added by Drupal.org packaging script on 2018-08-17
version = "7.x-1.26"
core = "7.x"
project = "i18n"
datestamp = "1430999922"
datestamp = "1534531985"

View File

@@ -82,11 +82,11 @@ function i18n_select_mode($type = NULL) {
}
/**
* Check current path to enable selection
* Check current path to enable selection.
*
* This works pretty much like block visibility
* This works pretty much like block visibility.
*
* @return boolean
* @return bool
* TRUE if content selection should be enabled for this page.
*/
function i18n_select_page() {
@@ -100,8 +100,11 @@ function i18n_select_page() {
// with different case. Ex: /Page, /page, /PAGE.
$pages = drupal_strtolower($pages);
if ($visibility < I18N_SELECT_PAGE_PHP) {
// Convert the Drupal path to lowercase
$path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
// @see views_ajax()
// @see I18NSelectAdminViewsAjax::testViewsAjaxWithoutSkippingTags()
$path = isset($_REQUEST['view_path']) ? $_REQUEST['view_path'] : $_GET['q'];
// Convert the Drupal path to lowercase.
$path = drupal_strtolower(drupal_get_path_alias($path));
// Compare the lowercase internal and lowercase path alias (if any).
$page_match = drupal_match_path($path, $pages);
if ($path != $_GET['q']) {
@@ -109,8 +112,8 @@ function i18n_select_page() {
}
// When $visibility has a value of 0 (I18N_SELECT_PAGE_NOTLISTED),
// the block is displayed on all pages except those listed in $pages.
// When set to 1 (I18N_SELECT_PAGE_LISTED), it is displayed only on those
// pages listed in $pages.
// When set to 1 (I18N_SELECT_PAGE_LISTED), it is displayed only on
// those pages listed in $pages.
$mode = !($visibility xor $page_match);
}
elseif (module_exists('php')) {
@@ -121,7 +124,7 @@ function i18n_select_page() {
}
}
else {
// No pages defined, still respect the setting (unlike blocks)
// No pages defined, still respect the setting (unlike blocks).
$mode = $visibility == I18N_SELECT_PAGE_NOTLISTED;
}
}

View File

@@ -84,3 +84,87 @@ class i18nSelectTestCase extends Drupali18nTestCase {
}
}
}
/**
* Test case for AJAX queries on "views/ajax" when view on admin page.
*/
class I18NSelectAdminViewsAjax extends Drupali18nTestCase {
/**
* {@inheritdoc}
*/
public static function getInfo() {
return array(
'name' => t('I18N select Admin Views (AJAX)'),
'group' => 'Internationalization',
'description' => t('Test AJAX requests to the "views/ajax" when view located on "admin/*" and list of skipping tags is empty.'),
// Skip this test when "admin_views" module does not exists.
'dependencies' => array('admin_views'),
);
}
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp('translation', 'i18n_variable', 'i18n_select', 'admin_views');
parent::setUpLanguages(array('access content overview'));
parent::setUpContentTranslation();
}
/**
* Test AJAX of a view without skipping tags for selection.
*
* @see i18n_select_page()
*/
public function testViewsAjaxWithoutSkippingTags() {
// If this variable will have the "views" value then this test will not
// have sense. For instance, we want apply language selection filter
// for views and remove "views" from "i18n_select_skip_tags" variable.
// In this case all AJAX for views, on administration part of the site,
// will be broken because the "i18n_select_page()" function will work
// with "views/ajax" path instead of, for example, "admin/content".
variable_set('i18n_select_skip_tags', '');
// Create one hundred of nodes.
for ($i = 1; $i <= 100; $i++) {
// Create every second node on Spanish language and
// every first - on English.
$node = $this->createNode('page', "Node $i", '', $i % 2 ? $this->default_language : $this->secondary_language);
// Update "changed" in order to sort the content by updating date. In
// other case all nodes will be with the same date and not arranged in
// order.
db_update('node')
->fields(array('changed' => strtotime("+ $i minute")))
->condition('nid', $node->nid)
->execute();
}
$this->drupalGet('admin/content');
// Check that latest node exists at the top.
$this->assertText('Node 100');
// Check that our page contains fifty nodes (the latest must be 51).
$this->assertNoText('Node 50');
// Test $_REQUEST['view_path']. There's no form to submit to, so
// drupalPost() won't work here. This just tests a direct $_POST
// request instead.
$this->curlExec(array(
CURLOPT_URL => $this->getAbsoluteUrl('views/ajax'),
CURLOPT_POST => TRUE,
CURLOPT_POSTFIELDS => http_build_query(array(
'page' => 1,
'view_path' => 'admin/content',
'view_name' => 'admin_views_node',
'view_display_id' => 'system_1',
)),
));
// Check that we are successfully switched to a new page of content.
$this->assertText('Node 50');
$this->assertNoText('Node 100');
}
}