create-block-theme/tests/CbtThemeLocale
Jeff Ong 512b9f80df
Process inner html of blocks when escaping text content (#719)
* WIP working to convert attributes and URLs.

* Ensure media is added to local.

* Use a list of tokens and sprintf to generate the formatted string.

* Only format the string if tokens are present.

* Update content with html test.

Update remaining tests with inner markup.

Try and fix tests.

Format tests.

* Remove whitespace.

* Process all attributes
Escape at the end.
Provide better translation note.

* Refactor token processing to its own class.

* Update tests with string replacements and translation.

* Check if % exists in the text and escape it.

* Add a test case for a localizing text that includes a %.

* Add new line at the end of translators note

* Reformat numbers in translators note

* Update test

* Move new line to theme-locale

* Handle self closing tags

* Refactor how new line is added

* Attempt to fix tests

* Attempt to fix tests again

---------

Co-authored-by: Grant Kinney <1699996+creativecoder@users.noreply.github.com>
Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
2024-10-23 14:06:06 -03:00
..
base.php Fix template texts localizing/escaping (#641) 2024-05-16 14:04:45 -04:00
escapeAttribute.php Update escaping function (#683) 2024-09-03 08:39:21 -03:00
escapeTextContent.php Process inner html of blocks when escaping text content (#719) 2024-10-23 14:06:06 -03:00
escapeTextContentOfBlocks.php Process inner html of blocks when escaping text content (#719) 2024-10-23 14:06:06 -03:00