- Issue created by @matslats
This same problem of not extracting config seems to happen on localize.drupal.org, which has I believe been the case for years.
So there's probably something I'm missing.
All the advice I can find suggests that potx extracts config strings alongside everything else.
But my test
drush @hamlets potx --modules=contact
Shows nothing extracted from contact/config/install where I would expect to see 'Personal contact form' and 'Your message has been sent.'
Digging into the code it seems that these files are scanned but during the recursion of
_potx_find_shipped_config_translatables()
it never reaches $save_callback()
because
$_potx_processed_schema['translatables'] is not populated
I was able to populate it by swapping this
elseif (in_array($type, $_potx_processed_schema['translatables']) || (isset($schema_data['translatable']) && $schema_data['translatable'] === TRUE)) {
for
elseif (in_array($type, $_potx_processed_schema['translatables']) || in_array($schema_data['type'], ['text', 'label', 'required_label'])) {
Active
1.0
Documentation
This same problem of not extracting config seems to happen on localize.drupal.org, which has I believe been the case for years.
So there's probably something I'm missing.