diff --git a/potx.inc b/potx.inc
index a240233..d7053bc 100644
--- a/potx.inc
+++ b/potx.inc
@@ -391,8 +391,8 @@ function potx_finish_processing($save_callback = '_potx_save_string', $api_versi
   global $potx_callbacks;
 
   if ($api_version > POTX_API_7) {
-    foreach ($_potx_module_metadata as $module_name => $module_metadata) {
-      $potx_callbacks['store_module_metadata']($module_name, $module_metadata);
+    foreach ($_potx_module_metadata as $module_qualified_name => $module_metadata) {
+      $potx_callbacks['store_module_metadata']($module_qualified_name, $module_metadata);
     }
     // Parsing shipped configuration has to happen after processing all schemas.
     _potx_parse_shipped_configuration($save_callback, $api_version);
@@ -2069,6 +2069,7 @@ function _potx_parse_yaml_file($code, $file_name, $file_path, $save_callback) {
   global $yaml_translation_patterns;
   global $potx_callbacks;
   global $_potx_module_metadata;
+  global $_potx_found_modules;
 
   if (!is_array($yaml_translation_patterns)) {
     _potx_init_yaml_translation_patterns();
@@ -2097,16 +2098,27 @@ function _potx_parse_yaml_file($code, $file_name, $file_path, $save_callback) {
   }
 
   if (preg_match('~config/(schema|install|optional)/[^/]+\.yml$~', $file_name, $matches)) {
-    $module_name = basename(dirname(dirname(dirname($file_name))));
-    $_potx_module_metadata[$module_name]['config'][$matches[1]][] = array($file_name, $file_path);
+    $module_path = dirname(dirname(dirname($file_path)));
+    $module_qualified_name = array_search($module_path, $_potx_found_modules, TRUE);
+    $_potx_module_metadata[$module_qualified_name]['config'][$matches[1]][] = array($file_name, $file_path);
     if ($matches[1] == 'schema') {
       $keys = array_keys($yaml);
-      $potx_callbacks['schema_store_lookup']($keys, $module_name);
+      $potx_callbacks['schema_store_lookup']($keys, $module_qualified_name);
     }
   }
   elseif (preg_match('~[^/]+\.info\.yml~', $file_name)) {
-    $module_name = basename(dirname($file_name));
-    $_potx_module_metadata[$module_name]['dependencies'] = isset($yaml['dependencies']) ? $yaml['dependencies'] : array();
+    $module_path = dirname($file_path);
+    $module_qualified_name = array_search($module_path, $_potx_found_modules, TRUE);
+
+    if (isset($yaml['dependencies'])) {
+      $_potx_module_metadata[$module_qualified_name]['dependencies'] = $yaml['dependencies'];
+    }
+    else if ($yaml['type'] == 'profile' && isset($yaml['install'])) {
+      $_potx_module_metadata[$module_qualified_name]['dependencies'] = $yaml['install'];
+    }
+    else {
+      $_potx_module_metadata[$module_qualified_name]['dependencies'] = array();
+    }
   }
 }
 
@@ -2486,7 +2498,7 @@ function _potx_parse_shipped_configuration($save_callback = '_potx_save_string',
   global $_potx_processed_modules;
   global $potx_callbacks;
 
-  foreach ($_potx_module_metadata as $module_name => $module_metadata) {
+  foreach ($_potx_module_metadata as $module_qualified_name => $module_metadata) {
     // Reset the processed schema for every module.
     $_potx_processed_modules = array();
     $_potx_processed_schema = array(
@@ -2497,8 +2509,8 @@ function _potx_parse_shipped_configuration($save_callback = '_potx_save_string',
     );
 
     // "core" contains the base data type and translatable definitions.
-    _potx_process_module_schemas(array('core'));
-    _potx_process_module_schemas(array($module_name));
+    _potx_process_module_schemas(array('drupal:core'));
+    _potx_process_module_schemas(array($module_qualified_name));
 
     if (isset($module_metadata['config']['install'])) {
       foreach ($module_metadata['config']['install'] as $config_paths) {
@@ -2514,7 +2526,8 @@ function _potx_parse_shipped_configuration($save_callback = '_potx_save_string',
         // parsing the config file.
         $temp = $_potx_processed_schema;
         if (isset($parsed_config['dependencies']['module'])) {
-          _potx_process_module_schemas($parsed_config['dependencies']['module']);
+          $qualified_deps = _potx_load_matching_qualified_modules($parsed_config['dependencies']['module']);
+          _potx_process_module_schemas($qualified_deps);
         }
 
         // Find the schema that matches the config file.
@@ -2543,7 +2556,7 @@ function _potx_parse_shipped_configuration($save_callback = '_potx_save_string',
             'contexts' => array()
         );
 
-        _potx_process_module_schemas(array('core'));
+        _potx_process_module_schemas(array('drupal:core'));
 
         // Find the schema that matches the config file.
         $path_info = pathinfo($config_paths[1]);
@@ -2564,7 +2577,8 @@ function _potx_parse_shipped_configuration($save_callback = '_potx_save_string',
         _potx_process_module_schemas(array($matched));
 
         if (isset($parsed_config['dependencies']['module'])) {
-          _potx_process_module_schemas($parsed_config['dependencies']['module']);
+          $qualified_deps = _potx_load_matching_qualified_modules($parsed_config['dependencies']['module']);
+          _potx_process_module_schemas($qualified_deps);
         }
 
         $schema = _potx_find_matching_schema($config_name);
@@ -2574,6 +2588,27 @@ function _potx_parse_shipped_configuration($save_callback = '_potx_save_string',
   }
 }
 
+/**
+ * Returns the fully qualified module name (in the project:module format)
+ *  matching each module name in the $module_names list.
+ *
+ * @param array $module_names
+ *   The list of module names.
+ */
+function _potx_load_matching_qualified_modules($module_names) {
+  global $potx_callbacks;
+
+  $qualified_modules = array();
+  foreach ($module_names as $module_name) {
+    $qualified_name = $potx_callbacks['find_matching_qualified_module']($module_name);
+    if ($qualified_name !== FALSE) {
+      $qualified_modules[] = $qualified_name;
+    }
+  }
+
+  return $qualified_modules;
+}
+
 /**
  * Helper function for parsing yaml files.
  *
@@ -2628,47 +2663,48 @@ function _potx_process_module_schemas($module_list) {
   $dependencies = array();
 
   // Gather list of all dependencies for the current $module_list.
-  foreach ($module_list as $module_name) {
+  foreach ($module_list as $module_qualified_name) {
 
     // If the module is directly available from the initial given path, their
     //  metadata is already available.
-    if (isset($_potx_module_metadata[$module_name])) {
-      if (!empty($_potx_module_metadata[$module_name]['dependencies'])) {
-        $dependencies = array_merge($dependencies, $_potx_module_metadata[$module_name]['dependencies']);
+    if (isset($_potx_module_metadata[$module_qualified_name])) {
+      if (!empty($_potx_module_metadata[$module_qualified_name]['dependencies'])) {
+        $dependencies = array_merge($dependencies, $_potx_module_metadata[$module_qualified_name]['dependencies']);
       }
     }
     else {
       // Try to load the module metadata from the globally available modules
       //  (e.g. drupal install directory in local potx, database in l10n_server)
-      if ($potx_callbacks['load_module_metadata']($module_name)) {
-        $dependencies = array_merge($dependencies, $_potx_module_metadata[$module_name]['dependencies']);
+      if ($potx_callbacks['load_module_metadata']($module_qualified_name)) {
+        $dependencies = array_merge($dependencies, $_potx_module_metadata[$module_qualified_name]['dependencies']);
       }
     }
   }
 
   if (!empty($dependencies)) {
     // Process schema for dependencies first.
-    _potx_process_module_schemas($dependencies);
+    $qualified_deps = _potx_load_matching_qualified_modules($dependencies);
+    _potx_process_module_schemas($qualified_deps);
   }
 
   // If the schema for a module is already available, merge it.
-  foreach ($module_list as $module_name) {
-    $module_schema = $potx_callbacks['schema_load']($module_name);
+  foreach ($module_list as $module_qualified_name) {
+    $module_schema = $potx_callbacks['schema_load']($module_qualified_name);
 
     // If the module is not in the current parsed project, and its config schema can be found in the database
-    if (!isset($_potx_module_metadata[$module_name]['config']['schema']) && $module_schema !== NULL) {
+    if (!isset($_potx_module_metadata[$module_qualified_name]['config']['schema']) && $module_schema !== NULL) {
       // If its config schema isn't empty
       if (!empty($module_schema['types'])) {
         _potx_merge_processed_schema($module_schema);
       }
 
       // Remove from list of unprocessed modules.
-      unset($module_list[array_search($module_name, $module_list)]);
+      unset($module_list[array_search($module_qualified_name, $module_list)]);
     }
   }
 
-  foreach ($module_list as $module_name) {
-    if (!empty($_potx_module_metadata[$module_name]['config']['schema'])) {
+  foreach ($module_list as $module_qualified_name) {
+    if (!empty($_potx_module_metadata[$module_qualified_name]['config']['schema'])) {
       $_potx_module_schema = array(
           'translatables' => array(),
           'types' => array(),
@@ -2676,7 +2712,7 @@ function _potx_process_module_schemas($module_list) {
           'contexts' => array()
       );
 
-      foreach ($_potx_module_metadata[$module_name]['config']['schema'] as $file_paths) {
+      foreach ($_potx_module_metadata[$module_qualified_name]['config']['schema'] as $file_paths) {
         $yaml = _potx_parse_yaml($file_paths[1]);
         if ($yaml === NULL) {
           continue;
@@ -2687,7 +2723,7 @@ function _potx_process_module_schemas($module_list) {
         }
       }
 
-      $potx_callbacks['schema_store']($module_name);
+      $potx_callbacks['schema_store']($module_qualified_name);
     }
   }
 }
diff --git a/potx.local.inc b/potx.local.inc
index d642740..3c500dc 100644
--- a/potx.local.inc
+++ b/potx.local.inc
@@ -27,6 +27,7 @@ function potx_local_init($module_path = NULL) {
       'store_module_metadata' => '_potx_store_module_metadata',
       'schema_store' => '_potx_schema_store',
       'schema_load' => '_potx_schema_load',
+      'find_matching_qualified_module' => '_potx_find_matching_qualified_module',
   );
 
   if ($module_path !== NULL) {
@@ -44,50 +45,55 @@ function _potx_find_all_modules($module_path) {
   global $_potx_found_modules;
 
   $module_path = realpath($module_path);
-  if (substr($module_path, -1) != '/') {
-    $module_path = $module_path . '/';
-  }
 
-  // The list of directories to check in the path, to find out if we are in a Drupal install directory.
-  $checks = array('/sites/', '/core/', '/profiles/', '/modules/', '/themes/');
+  // Find the drupal root directory.
+  $search_path = $module_path;
+  do {
+    if (is_dir($search_path . '/core/')) {
+      $root_dir = $search_path;
+      break;
+    }
+    $search_path = dirname($search_path);
+  } while($search_path != '/');
 
-  // The list of paths that could contain "modules/" or "themes/" subdirectories.
-  $search_paths = array();
+  if (!isset($root_dir)) {
+    return;
+  }
 
-  foreach ($checks as $check) {
-    if (preg_match("!$check!", $module_path)) {
-      $parts = explode($check, $module_path, 2);
+  // The Drupal core directory contains a config/schema subdirectory, which
+  //  is not part of any module or theme.
+  $_potx_found_modules['drupal:core']['path'] = $root_dir . '/core';
 
-      // The installed Drupal root.
-      $root = $parts[0];
+  // The list of paths that contain drupal core modules or themes.
+  $core_paths = array(
+    $root_dir . '/core/profiles',
+    $root_dir . '/core/modules',
+    $root_dir . '/core/themes',
+  );
 
-      // The Drupal core directory contains a config/schema subdirectory, which
-      //  is not part of any module or theme.
-      $_potx_found_modules['core']['path'] = $root . '/core';
+  foreach ($core_paths as $core_path) {
+    _potx_find_modules($core_path, 'drupal');
+  }
 
-      $search_paths[] = $root;
-      $search_paths[] = $root . '/core';
+  // The list of paths that could contain drupal modules or themes.
+  $search_paths = array(
+    $root_dir . '/profiles',
+    $root_dir . '/modules',
+    $root_dir . '/themes',
+  );
 
-      $profiles = glob($root . '/profiles/*', GLOB_ONLYDIR);
-      $sites = glob($root . '/sites/*', GLOB_ONLYDIR);
+  $sites = glob($root_dir . '/sites/*', GLOB_ONLYDIR);
 
-      if (is_array($profiles)) {
-        $search_paths = array_merge($search_paths, $profiles);
-      }
-      if (is_array($sites)) {
-        $search_paths = array_merge($search_paths, $sites);
+  foreach ($sites as $site) {
+    foreach (array('/modules', '/themes') as $sub) {
+      if (is_dir($site . $sub)) {
+        $search_paths[] = $site . $sub;
       }
-
-      break;
     }
   }
 
   foreach ($search_paths as $search_path) {
-    foreach (array('/modules', '/themes') as $sub) {
-      if (is_dir($search_path . $sub)) {
-        _potx_find_modules($search_path . $sub);
-      }
-    }
+    _potx_find_modules($search_path);
   }
 }
 
@@ -96,8 +102,10 @@ function _potx_find_all_modules($module_path) {
  *
  * @param string $path
  *   The search path
+ * @param string $project
+ *   The name of the project that contains the current path.
  */
-function _potx_find_modules($path) {
+function _potx_find_modules($path, $project = NULL) {
   global $_potx_found_modules;
 
   $subdirs = glob($path . '/*', GLOB_ONLYDIR);
@@ -105,14 +113,31 @@ function _potx_find_modules($path) {
   if (is_array($subdirs)) {
     foreach ($subdirs as $dir) {
       if (!preg_match("!(^|.+/)(CVS|\.svn|\.git|tests|vendor)$!", $dir)) {
-        $module_name = basename($dir);
-        $info_path = $dir . '/' . $module_name . '.info.yml';
-
-        if (file_exists($info_path)) {
-          $_potx_found_modules[$module_name]['path'] = $dir;
+        $module_info_paths = glob($dir . '/*.info.yml', GLOB_MARK);
+        if (!empty($module_info_paths)) {
+          foreach($module_info_paths as $module_info_path) {
+
+            $module_name = basename($module_info_path, '.info.yml');
+
+            if ($project != NULL) {
+              $module_project = $project;
+            } else {
+              // All module releases on drupal.org contain a project: key in
+              //  their .info.yml files, but this may not be the case when
+              //  running potx locally (e.g. custom or dev modules); so, we use
+              //  the directory name as the project name for this module and any
+              //  submodules in the same directory
+              $module_dir = dirname($module_info_path);
+              $module_project = basename($module_dir);
+            }
+
+            $_potx_found_modules["$module_project:$module_name"]['path'] = $dir;
+
+            _potx_find_modules($dir, $module_project);
+          }
+        } else {
+          _potx_find_modules($dir, $project);
         }
-
-        _potx_find_modules($dir);
       }
     }
   }
@@ -125,12 +150,12 @@ function _potx_find_modules($path) {
  * @param array $keys
  *   List of config matching keys in a config schema file.
  *
- * @param string $module_name
- *   Name of the module containing the schema.
+ * @param string $module_qualified_name
+ *   The fully qualified name of the module containing the schema.
  */
-function _potx_schema_store_lookup($keys, $module_name) {
+function _potx_schema_store_lookup($keys, $module_qualified_name) {
   global $_potx_schema_lookup;
-  $_potx_schema_lookup = array_merge($_potx_schema_lookup, array_fill_keys($keys, $module_name));
+  $_potx_schema_lookup = array_merge($_potx_schema_lookup, array_fill_keys($keys, $module_qualified_name));
 }
 
 /**
@@ -179,20 +204,20 @@ function _potx_build_reverse_lookup() {
   global $_potx_found_modules;
   global $potx_callbacks;
 
-  foreach ($_potx_found_modules as $module_name => $module_data) {
+  foreach ($_potx_found_modules as $module_qualified_name => $module_data) {
     $module_files = _potx_explore_dir($module_data['path'] . '/', '*', POTX_API_8);
 
-    foreach ($module_files as $file_name) {
+    foreach ($module_files as $file_path) {
 
-      if (preg_match('~config/schema/[^/]+\.yml$~', $file_name)) {
+      if (preg_match('~config/schema/[^/]+\.yml$~', $file_path)) {
 
-        $code = file_get_contents($file_name);
+        $code = file_get_contents($file_path);
 
         try {
           $yaml = Yaml::parse($code);
           $keys = array_keys($yaml);
 
-          $potx_callbacks['schema_store_lookup']($keys, $module_name);
+          $potx_callbacks['schema_store_lookup']($keys, $module_qualified_name);
         } catch (ParseException $e) {
           watchdog('potx', "YAML parseing error on file @path: @error", array(
               '@path' => $file_path,
@@ -210,24 +235,22 @@ function _potx_build_reverse_lookup() {
  * Load a module's metadata, including its dependencies and list of config
  *  schema files.
  *
- * @param string $module_name
- *   The module's name.
+ * @param string $module_qualified_name
+ *   The fully qualified name of the module
  *
  * @return bool
  *   TRUE if the module was found, FALSE otherwise.
  */
-function _potx_load_module_metadata($module_name) {
+function _potx_load_module_metadata($module_qualified_name) {
   global $_potx_found_modules;
   global $_potx_module_metadata;
 
-  if (!isset($_potx_found_modules[$module_name])) {
-    return FALSE;
-  }
-
-  $module_path = $_potx_found_modules[$module_name]['path'];
+  $parts = explode(':', $module_qualified_name);
+  $module_name = end($parts);
+  $module_path = $_potx_found_modules[$module_qualified_name]['path'];
 
-  if ($module_name === 'core') {
-    $_potx_module_metadata['core']['dependencies'] = array();
+  if ($module_qualified_name === 'drupal:core') {
+    $_potx_module_metadata['drupal:core']['dependencies'] = array();
   }
   else {
     $info_path = $module_path . '/' . $module_name . '.info.yml';
@@ -236,7 +259,7 @@ function _potx_load_module_metadata($module_name) {
 
     try {
       $info_yaml = Yaml::parse($code);
-      $_potx_module_metadata[$module_name]['dependencies'] = isset($info_yaml['dependencies']) ? $info_yaml['dependencies'] : array();
+      $_potx_module_metadata[$module_qualified_name]['dependencies'] = isset($info_yaml['dependencies']) ? $info_yaml['dependencies'] : array();
     } catch (ParseException $e) {
       watchdog('potx', "YAML parseing error on file @path: @error", array(
           '@path' => $file_path,
@@ -251,7 +274,7 @@ function _potx_load_module_metadata($module_name) {
 
   foreach ($module_files as $file_path) {
     if (preg_match('~config/schema/[^/]+\.yml$~', $file_path)) {
-      $_potx_module_metadata[$module_name]['config']['schema'][] = array(NULL, $file_path);
+      $_potx_module_metadata[$module_qualified_name]['config']['schema'][] = array(NULL, $file_path);
     }
   }
 
@@ -263,12 +286,12 @@ function _potx_load_module_metadata($module_name) {
  *
  * Not used locally by potx.
  *
- * @param string $module_name
- *   The module's name
+ * @param string $module_qualified_name
+ *   The fully qualified name of the module
  * @param array $metadata
  *   The module's metadata
  */
-function _potx_store_module_metadata($module_name, $metadata) {
+function _potx_store_module_metadata($module_qualified_name, $metadata) {
   // Intentionally Left Empty.
 }
 
@@ -278,28 +301,48 @@ function _potx_store_module_metadata($module_name, $metadata) {
  *
  * The processed schema is found in the "$_potx_module_schema" global.
  *
- * @param string $module_name
- *   The module name.
+ * @param string $module_qualified_name
+ *   The fully qualified name of the module
  */
-function _potx_schema_store($module_name) {
+function _potx_schema_store($module_qualified_name) {
   global $_potx_module_schema;
   global $_potx_schema_cache;
 
-  $_potx_schema_cache[$module_name] = $_potx_module_schema;
+  $_potx_schema_cache[$module_qualified_name] = $_potx_module_schema;
 }
 
 /**
  * Load a module's processed schema, from cache (for local potx), or database
  *  (for l10n_server).
  *
- * @param string $module_name
- *   The module's name.
+ * @param string $module_qualified_name
+ *   The fully qualified name of the module
  */
-function _potx_schema_load($module_name) {
+function _potx_schema_load($module_qualified_name) {
   global $_potx_schema_cache;
-  if (isset($_potx_schema_cache[$module_name])) {
-    return $_potx_schema_cache[$module_name];
+
+  if ($module_qualified_name !== FALSE && isset($_potx_schema_cache[$module_qualified_name])) {
+    return $_potx_schema_cache[$module_qualified_name];
   }
 
   return NULL;
 }
+
+/**
+ * Returns a fully qualified module name (in the project:module format)
+ *  matching $module_name from the list of modules found in the Drupal install
+ *  directory, or FALSE if no matching module is found.
+ *
+ * @param string $module_name
+ *   The module name
+ */
+function _potx_find_matching_qualified_module($module_name) {
+  global $_potx_found_modules;
+
+  if (strpos($module_name, ':') !== FALSE) {
+    return isset($_potx_found_modules[$module_name]) ? $module_name : FALSE;
+  } else {
+    $matches = preg_grep('/:' . $module_name . '$/', array_keys($_potx_found_modules));
+    return end($matches);
+  }
+}
