Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Extension/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,15 @@ private function getExtensions(
$name = $extension->getName();

$isInstalled = false;
if (property_exists($extension, 'status')) {
$isInstalled = ($extension->status)?true:false;
if ($type == 'profile') {
$isInstalled = \Drupal::installProfile() == $name;
}
else {
if (property_exists($extension, 'status')) {
$isInstalled = ($extension->status) ? TRUE : FALSE;
}
}

if (!$showInstalled && $isInstalled) {
continue;
}
Expand Down
20 changes: 20 additions & 0 deletions src/Utils/TranslatorManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ private function addResourceTranslationsByExtensionPath($extensionPath)
}
}

/**
* @param $profile
*/
private function addResourceTranslationsByProfile($profile)
{
// No "profile handler" service exists yet, so we have to get
// paths the old fashioned way.
if (\Drupal::installProfile() != $profile) {
return;
}
$extensionPath = drupal_get_path('profile', $profile);
$this->addResourceTranslationsByExtensionPath(
$extensionPath
);
}

/**
* @param $module
*/
Expand Down Expand Up @@ -99,6 +115,10 @@ public function addResourceTranslationsByExtension($extension, $type)
}

$this->extensions[] = $extension;
if ($type == 'profile') {
$this->addResourceTranslationsByProfile($extension);
return;
}
if ($type == 'module') {
$this->addResourceTranslationsByModule($extension);
return;
Expand Down