查看文档我找不到任何提及它,所以我会问: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 ""