- 🇳🇱Netherlands Lendude Amsterdam
Installed potx on clean D10 install with 📌 Drupal 10 compatibility fixes for potx Fixed applied.
Enabled potx
Installed Drush 11.5.1
Ran:
drush potx single --folder="modules/contrib/potx/"
Errors seem to be all errors in the way translations are added in potx
Errors [error] The first parameter to dt() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there. At <em class="placeholder">dt("Processing $file...")</em> in <em class="placeholder">modules/contrib/potx/potx.drush.inc</em> on line <em class="placeholder">110</em>. Read more at <a href="http://drupal.org/node/322732">http://drupal.org/node/322732</a> [error] The first parameter to dt() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there. At <em class="placeholder">dt("Processing $file...")</em> in <em class="placeholder">modules/contrib/potx/src/Commands/PotxCommands.php</em> on line <em class="placeholder">104</em>. Read more at <a href="http://drupal.org/node/322732">http://drupal.org/node/322732</a> [error] The first parameter to error() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there. At <em class="placeholder">error($error)</em> in <em class="placeholder">modules/contrib/potx/src/Commands/PotxCommands.php</em> on line <em class="placeholder">131</em>. Read more at <a href="http://drupal.org/node/322732">http://drupal.org/node/322732</a>
Added the output file to the issue, looks good to me.
The D10 compatibility patch makes some changes to the commands, so not sure if this should be committed before that lands, might be better to wait for that to land
- Status changed to Needs work
8 months ago 8:36am 27 March 2024 - 🇳🇱Netherlands spadxiii
I think there should be a code-change as well, as drush 11 deprecated the drush.services.yml (drush 12 doesn't support it anymore): https://www.drush.org/11.x/dependency-injection/#services-files
Also, there is a new requirement that the drush commands should be in a 'Drush' subfolder, see the commands.md:
1. Drush 12 expects commandfiles to use a [create() method](dependency-injection.md#create-method) to inject Drupal and Drush dependencies. Prior versions used a [drush.services.yml file](https://www.drush.org/11.x/dependency-injection/#services-files) which is now deprecated and will be removed in Drush 13.
1. Drush 12 expects all commandfiles in the `/Drush/` directory. The `Drush` subdirectory is a new requirement.