0

I have some issues with the command drush locale:import. I can export a file with locale:export but it's not working with import (with the same file modified). I must do something wrong but what ?

With this command line:

drush locale:import fr ./path/to/file/drupal.pot --type=customized --override=all

I always get this message:

File drupal.pot not found or empty.

I tried many different paths without success. And import file by BO works like a charm, the file isn't corrupt.

Edit: .pot display no errors but doesn't work, we have to use .po only.

1 Answers1

1

Try using an absolute path example :

drush locale:import fr /var/www/project/file/drupal.pot --type=customized --override=all
Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107
  • As simply as that ! It was a pebkac problem obviously ! Thx man. – SirJohnDuff Nov 28 '20 at 12:37
  • `drush locale:import` runs with the web root (not execution path) as the working directory. (The web root is usually something like `project/web`.) So you need to provide a relative filename path from the web root directory or use an absolute path. – Richard Davies Dec 13 '22 at 22:17