Skip to content

Commit 2ef47af

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Update Symfony browserlists reccomendation to browserlists standard. Fixed sample code syntax [Templating] Explain the hinclude.js attributes [Translation] The 'other' key is mandatory in ICU 'select'
2 parents e492a64 + 227e58e commit 2ef47af

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

frontend/encore/postcss.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ The ``autoprefixer`` (and many other tools) need to know what browsers you want
6363
support. The best-practice is to configure this directly in your ``package.json``
6464
(so that all the tools can read this):
6565

66+
.. code-block:: diff
67+
68+
{
69+
+ "browserslist": [
70+
+ "defaults"
71+
+ ]
72+
}
73+
74+
The ``defaults`` option is reccommended for most users and would be equivilant to the following browserslist.
75+
6676
.. code-block:: diff
6777
6878
{

templating/hinclude.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,16 @@ Or you can also specify a string to display as the default content:
8282
8383
{{ render_hinclude(controller('...'), {default: 'Loading...'}) }}
8484
85+
Use the ``attributes`` option to define the value of hinclude.js options:
86+
87+
.. code-block:: twig
88+
89+
{# by default, cross-site requests don't use credentials such as cookies, authorization
90+
headers or TLS client certificates; set this option to 'true' to use them #}
91+
{{ render_hinclude(controller('...'), {attributes: {data-with-credentials: 'true'}}) }}
92+
93+
{# by default, the JavaScript code included in the loaded contents is not run;
94+
set this option to 'true' to run that JavaScript code #}
95+
{{ render_hinclude(controller('...'), {attributes: {evaljs: 'true'}}) }}
96+
8597
.. _`hinclude.js`: http://mnot.github.io/hinclude/

translation/message_format.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ typical usage of this is gender:
9696
.. code-block:: yaml
9797
9898
# translations/messages+intl-icu.en.yaml
99+
100+
# the 'other' key is required, and is selected if no other case matches
99101
invitation_title: >-
100102
{organizer_gender, select,
101103
female {{organizer_name} has invited you for her party!}
@@ -112,6 +114,7 @@ typical usage of this is gender:
112114
<body>
113115
<trans-unit id="invitation_title">
114116
<source>invitation_title</source>
117+
<!-- the 'other' key is required, and is selected if no other case matches -->
115118
<target>{organizer_gender, select,
116119
female {{organizer_name} has invited you for her party!}
117120
male {{organizer_name} has invited you for his party!}
@@ -126,6 +129,7 @@ typical usage of this is gender:
126129
127130
// translations/messages+intl-icu.en.php
128131
return [
132+
// the 'other' key is required, and is selected if no other case matches
129133
'invitation_title' => '{organizer_gender, select,
130134
female {{organizer_name} has invited you for her party!}
131135
male {{organizer_name} has invited you for his party!}

0 commit comments

Comments
 (0)