You are here

function potx_test_inline_templates in Translation template extractor 6.3

Test parsing inline templates inside PHP files in Drupal 8.

File

tests/potx_test_8.module, line 89
File used purely to test the parser in potx.

Code

function potx_test_inline_templates() {
  $render_array = array(
    '#type' => 'inline_template',
    '#template' => "Here is a {% trans 'Test translatable string inside an inline template' %}.",
  );
  $render_array['#template'] = 'Here is {% trans %}Another test translatable string inside an inline template{% endtrans %}';
  $render_array["#template"] = 'Here is {% trans %}A translatable string inside an inline template, with double-quoted "#template" key{% endtrans %}';
}