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,92 @@
CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Recommended modules
* Installation
* Configuration
* Troubleshooting
* Maintainers
INTRODUCTION
------------
The Block languages module, part of the Internationalization
(https://www.drupal.org/project/i18n) package, allows the user to configure
for which languages each block is visible.
* For a full description of the module,
visit https://www.drupal.org/node/1279698.
* 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
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 settings for visibility per language are provided under Visibility
Settings via the Languages tab when configuring a block.
The Languages tab also provides a setting for whether the block is translatable.
For custom blocks, the block title and the block content will be translatable.
For blocks defined by modules, only the block title will be translatable. If
"Make this block translatable" is selected, a Translate tab will appear for that
block. This tab provides a UI for adding translations of the block in each
available language.
TROUBLESHOOTING
---------------
Conflicts with Context
The Block languages module conflicts with the Context module, which alters how
blocks are rendered. This issue can be tracked in the Internationalization
issue queue: http://drupal.org/node/1343044
String Errors
The user must allow your used string format to be translated on
admin/config/regional/i18n/strings or you are going to have an error message
like "The string blocks:block:1:body for textgroup blocks is not allowed for
translation because of its text format."
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

@@ -8,9 +8,8 @@ files[] = i18n_block.inc
files[] = i18n_block.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

@@ -37,6 +37,17 @@ function i18n_block_menu() {
return $items;
}
/**
* Implements hook_permission().
*/
function i18n_block_permission() {
return array(
'translate blocks' => array(
'title' => t('Translate Blocks'),
),
);
}
/**
* Implement hook_menu_alter().
*
@@ -59,7 +70,7 @@ function i18n_block_menu_alter(&$items) {
*/
function i18n_block_translate_tab_access($module, $delta) {
$block = block_load($module, $delta);
return user_access('translate interface') && $block && isset($block->i18n_mode) && ($block->i18n_mode == I18N_MODE_LOCALIZE);
return (user_access('translate interface') || user_access('translate blocks')) && $block && isset($block->i18n_mode) && ($block->i18n_mode == I18N_MODE_LOCALIZE);
}
/**
@@ -226,7 +237,7 @@ function i18n_block_form_block_admin_configure_alter(&$form, &$form_state, $form
'#options' => i18n_language_list(),
'#description' => t('If no language is selected, block will show regardless of language.'),
);
if (user_access('translate interface')) {
if (user_access('translate interface') || user_access('translate blocks')) {
$form['actions']['translate'] = array(
'#type' => 'submit',
'#name' => 'save_translate',

View File

@@ -72,15 +72,16 @@ class i18nBlocksTestCase extends Drupali18nTestCase {
$this->clickLink(t('translate'));
// Title is a textarea, body is a text_format.
$this->assertFieldByName('strings[blocks:block:' . $box2['delta'] . ':title]', $translations['title']['es']);
$this->assertFieldByName('strings[blocks:block:' . $box2['delta'] . ':body]', $translations['body']['es']);
$this->assertFieldByName('strings[blocks:block:' . $box2['delta'] . ':body][value]', $translations['body']['es']);
// Update the translation.
$translations['title']['es'] = $this->randomName(10);
$translations['body']['es'] = $this->randomName(20);
$edit = array(
'strings[blocks:block:' . $box2['delta'] . ':title]' => $translations['title']['es'],
'strings[blocks:block:' . $box2['delta'] . ':body]' => $translations['body']['es'],
'strings[blocks:block:' . $box2['delta'] . ':body][value]' => $translations['body']['es'],
);
$this->drupalPost(NULL, $edit, t('Save translation'));
$this->i18nAssertTranslations($translations['title'], '', 'Updated block title translation displayed.');