ドキュメントに目を通すと、それについての言及が見つからなかったので、質問します: Twig i18n 拡張機能は、gettext を介して抽出できる埋め込みコメントをサポートしていますか? つまり、これに相当する Twig 構文はありますか。
/// TRANSLATORS: Please leave %s as it is, because it is needed by the program.
/// Thank you for contributing to this project.
printf(_("My name is %s."), $myName);
次のように抽出可能になります。
#. TRANSLATORS: Please leave %s as it is, because it is needed by the program.
#. Thank you for contributing to this project.
msgid "My name is %s."
msgstr ""