function potx_finish_processing in Translation template extractor 8
Same name and namespace in other branches
- 6.3 potx.inc \potx_finish_processing()
- 7.3 potx.inc \potx_finish_processing()
Executes tasks that need to happen after all the files have been processed.
Parameters
string $save_callback: Callback function to use to save the collected strings.
int $api_version: Drupal API version to work with.
4 calls to potx_finish_processing()
- PotxCommands::potx in src/
Commands/ PotxCommands.php - Extract translatable strings from Drupal source code.
- PotxExtractTranslationForm::submitForm in src/
Form/ PotxExtractTranslationForm.php - Form submission handler.
- PotxTest::testDrupal8CustomYml in tests/
src/ Kernel/ PotxTest.php - Test parsing of custom yaml files.
- potx_drush_extract in ./
potx.drush.inc - Drush command callback.
File
- ./
potx.inc, line 399 - Extraction API used by the web and command line interface.
Code
function potx_finish_processing($save_callback = '_potx_save_string', $api_version = POTX_API_CURRENT) {
global $_potx_yaml_translation_patterns;
global $_potx_module_metadata;
global $_potx_callbacks;
if ($api_version > POTX_API_7) {
if (isset($_potx_module_metadata)) {
foreach ($_potx_module_metadata as $module_name => $module_metadata) {
$_potx_callbacks['store_module_metadata']($module_name, $module_metadata);
}
// Parsing shipped configuration has to happen after processing all schemas.
_potx_parse_shipped_configuration($save_callback, $api_version);
}
// Clear yaml translation patterns, so translation patterns for a module
// won't be used for extracting translatable strings for another module.
$_potx_yaml_translation_patterns = NULL;
}
}