Export custom module strings for translation I've developed some custom modules for a client and implemented the $this-&gt;t() method to enable translations on static strings, like table headers. Is there a way to export only the translatable strings from my custom module into a .po file that I can handoff to someone for translation? I ideally want to export each modules translations separately so each module can be self contained.
You can give Translation template extractor a spin. While there is no official release for Drupal 8 available (yet), there already is a development version that seems to work for your use case when using the GUI:

https://www.drupal.org/project/potx/releases

Using composer, just install it like

composer require drupal/potx


After enabling the module, you'll have a new menu entry Configuration > Regional and language > User interface translation > Extract (/admin/config/regional/translate/extract)

There you can extract language and module specific translation templates from your custom module's PHP files.

Disclaimer: As mentioned, this module's Drupal 8 version has not been released yet. It may contain bugs and is not feature complete/en par with the 7.x version. Better use it in your development environment only.