Skip to content
Snippets Groups Projects
Unverified Commit d6048ecc authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3089764 by alexpott, mondrake: Updating translations does not clear the...

Issue #3089764 by alexpott, mondrake: Updating translations does not clear the JS asset cache so new translations are not loaded
parent 75e601c1
Branches
Tags
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards
......@@ -32,7 +32,7 @@ public function __construct(CacheTagsInvalidatorInterface $cache_tags_invalidato
* Invalidate cache tags whenever a string is translated.
*/
public function saveTranslation() {
$this->cacheTagsInvalidator->invalidateTags(['rendered', 'locale']);
$this->cacheTagsInvalidator->invalidateTags(['rendered', 'locale', 'library_info']);
}
/**
......
......@@ -160,6 +160,8 @@ public function testLocaleTranslationJsDependencies() {
$js_filename = $prefix . '_' . $js_translation_files[$prefix] . '.js';
$content = $this->getSession()->getPage()->getContent();
$this->assertRaw('core/misc/drupal.js');
$this->assertRaw($js_filename);
// Assert translations JS is included before drupal.js.
$this->assertTrue(strpos($content, $js_filename) < strpos($content, 'core/misc/drupal.js'), 'Translations are included before Drupal.t.');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment