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
No related branches found
No related tags found
No related merge requests found
......@@ -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.
Finish editing this message first!
Please register or to comment