diff --git a/core/modules/help_topics/help_topics/user.security_account_settings.html.twig b/core/modules/help_topics/help_topics/user.security_account_settings.html.twig index 5e21da7024..f86098d986 100644 --- a/core/modules/help_topics/help_topics/user.security_account_settings.html.twig +++ b/core/modules/help_topics/help_topics/user.security_account_settings.html.twig @@ -13,24 +13,15 @@ related:

{% trans %}What are variables in email message text?{% endtrans %}

{% trans %}Variables are short text strings, enclosed in square brackets [], that you can insert into configured email message text. When an individual message is generated, data from your site is substituted for the variables. Some commonly-used variables are:{% endtrans %}

-{# ALLOW-UNTRANSLATED #} -
-
[site:name]
-
{% trans %}The name of your web site.{% endtrans %}
-
[site:url]
-
{% trans %}The URL of your web site.{% endtrans %}
-
[site:login-url]
-
{% trans %}The URL where users can log in to your site.{% endtrans %}
-
[user:display-name]
-
{% trans %}The user's displayed name.{% endtrans %}
-
[user:account-name]
-
{% trans %}The users's account name.{% endtrans %}
-
[user:mail]
-
{% trans %}The user's email address.{% endtrans %}
-
[user:one-time-login-url]
-
{% trans %}An expiring URL that a user can use to log in once, if they need to reset their password.{% endtrans %}
-
-{# END-ALLOW-UNTRANSLATED #} +

{% trans %}Steps{% endtrans %}

  1. {% trans %}In the Manage administrative menu, navigate to Configuration > People > Account settings.{% endtrans %}
  2. diff --git a/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig b/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig index ac1bee4514..d8126215dc 100644 --- a/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig +++ b/core/modules/help_topics/tests/modules/help_topics_test/help_topics/help_topics_test.test.html.twig @@ -6,10 +6,6 @@ related: - does_not_exist.and_no_error --- {% set help_topic_url = render_var(url('help.help_topic', {id: 'help_topics_test.additional'})) %} -{# Here is a Twig comment. It should not get rendered. #}

    {% trans %}This is a test. It should link to the additional topic. Also there should be a related topic link below to the Help module topic page and the linked topic.{% endtrans %}

    {% trans %}Nonworditem totranslate.{% endtrans %}

    {% trans %}Test translation.{% endtrans %}

    -{# ALLOW-UNTRANSLATED #} -

    Untranslated text that is allowed.

    -{# END-ALLOW-UNTRANSLATED #} diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php index 9701a1bdfc..c2f3b016a7 100644 --- a/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php +++ b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php @@ -128,14 +128,9 @@ protected function verifyTopic($id, $definitions, $response = 200) { $body = trim($body); $this->assertNotEmpty($body, 'Topic ' . $id . ' Twig file contains some text outside of front matter'); - // Verify that if we remove all the translated text, whitespace, comments, - // and HTML tags, there is nothing left (that is, all text is translated). - // Also allow sections bracketed by - // {# ALLOW-UNTRANSLATED #}...{# END-ALLOW-UNTRANSLATED #} - // to be untranslated. + // Verify that if we remove all the translated text, whitespace, and + // HTML tags, there is nothing left (that is, all text is translated). $text = preg_replace('|\{\% trans \%\}.*\{\% endtrans \%\}|sU', '', $body); - $text = preg_replace('|\{\# ALLOW-UNTRANSLATED \#\}.*\{\# END-ALLOW-UNTRANSLATED \#\}|sU', '', $text); - $text = preg_replace('|\{# .* #\}|sU', '', $text); $text = strip_tags($text); $text = preg_replace('|\s+|', '', $text); $this->assertEmpty($text, 'Topic ' . $id . ' Twig file has all of its text translated');