PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar BrainforgeUK
BrainforgeUK
3 Dec 2023

Emulate Joomla v4.4.0 and earlier behaviour when multi-line text strings present.

Pull Request for Issue #42416 .

Summary of Changes

Allow embedded newlines in text (i.e. between quotes ").
Using them to structure very large areas of text makes maintenance easier.
In some cases using linewrap in IDE slightly helps, but one is left with trying to read / unravel a massive jumble of text.

Newlines in text worked up to v4.4.0
Security related change in v4.4.1 removed this functionality.

This change detects and removes the embedded newlines before using PHP ini parsing as before.
The security related change introduced in v4.4.1 is maintained.

Testing Instructions

Install this plugin.
plg_system_bflanguagetest.zip

Go to plugin admin page.

Actual result BEFORE applying this Pull Request

The plugin name and description not translated.
The language labels are displayed.

Expected result AFTER applying this Pull Request

Name and description translated.
As previous behavious in J4.1.0 and earlier.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Line breaks in characters string have worked for a very long time.
Mention made in another conversation that somewhere in the documentation it says they are not allowed.
Is so the location where that appears needs to be found and corrected.

Also mention was made that the JED needs to be changed to prevent the use of such line breaks.
Such a change will no longer be necessary - assume the developer wants such included.

avatar BrainforgeUK BrainforgeUK - change - 3 Dec 2023
Status New Pending
avatar BrainforgeUK BrainforgeUK - open - 3 Dec 2023
avatar joomla-cms-bot joomla-cms-bot - change - 3 Dec 2023
Category Libraries
avatar BrainforgeUK BrainforgeUK - change - 3 Dec 2023
Labels Added: PR-5.0-dev
avatar BrainforgeUK BrainforgeUK - change - 3 Dec 2023
Title
Update LanguageHelper.php
Update LanguageHelper.php to handle translated text with embedded new lines.
avatar BrainforgeUK BrainforgeUK - edited - 3 Dec 2023
avatar bembelimen
bembelimen - comment - 3 Dec 2023

If it's decided to be included, we will do an upmerge from 4.4, so no need for two PRs.

see #42456

avatar bembelimen bembelimen - close - 3 Dec 2023
avatar bembelimen bembelimen - change - 3 Dec 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-12-03 17:34:31
Closed_By bembelimen

Add a Comment

Login with GitHub to post a comment