[BETA] Broken langages files #1042

Closed
opened 2024-02-05 13:15:05 +00:00 by Pierre Burri-Wittke · 7 comments

Steps to reproduce the issue

  • compile an extension for Joomla! 4/5 with one or two languages
  • install it on a Joomla 4/5

the language strings/constants are not converted in there values because the ini files are not correctly build.
Example: the line has 328 has a break, therefore both line are wrong, line 328 and 329.

328 COM_BOOKSHOP_CONFIG_DOWNLOAD_PATH_DESCRIPTION="Enter the full (from root) download path for the epub and pdfs. 
329 Example: /media/com_bookshop/download_ebook"

another one:

296 COM_BOOKSHOP_CONFIG_NOTE_DKIM_USE_DESCRIPTION="<p>Using the below details, you need to configure your DNS by adding a TXT record on your domain: <b><span id='a_dkim_domain'></span></b></p>
297 <script>
298 document.addEventListener('DOMContentLoaded', function() {
    

Expected result

the languages constants are converted.

Actual result

the languages constants are none converted and the constants are shown.

System information (as much as possible)

  • OS Name & Version: macos Catalina 10.15.7
  • MySql Version: 5.7.39
  • Apache Version: 2.4.54
  • PHP Version: 8.1.13
  • Joomla Version: 4.4.2
  • JCB Version: 3.1.36
  • Browser: Firefox 115.7.0esr

Additional comments

### Steps to reproduce the issue - compile an extension for Joomla! 4/5 with one or two languages - install it on a Joomla 4/5 the language strings/constants are not converted in there values because the ini files are not correctly build. Example: the line has 328 has a break, therefore both line are wrong, line 328 and 329. ``` 328 COM_BOOKSHOP_CONFIG_DOWNLOAD_PATH_DESCRIPTION="Enter the full (from root) download path for the epub and pdfs. 329 Example: /media/com_bookshop/download_ebook" another one: 296 COM_BOOKSHOP_CONFIG_NOTE_DKIM_USE_DESCRIPTION="<p>Using the below details, you need to configure your DNS by adding a TXT record on your domain: <b><span id='a_dkim_domain'></span></b></p> 297 <script> 298 document.addEventListener('DOMContentLoaded', function() { ``` ### Expected result the languages constants are converted. ### Actual result the languages constants are none converted and the constants are shown. ### System information (as much as possible) - OS Name & Version: macos Catalina 10.15.7 - MySql Version: 5.7.39 - Apache Version: 2.4.54 - PHP Version: 8.1.13 - Joomla Version: 4.4.2 - JCB Version: 3.1.36 - Browser: Firefox 115.7.0esr ### Additional comments

Hi,
There is a setting for this in your component's "detail" page.

Scherm­afbeelding 2024-02-05 om 14.22.02.png

Hi, There is a setting for this in your component's "detail" page. ![Scherm­afbeelding 2024-02-05 om 14.22.02.png](/attachments/937bfa40-6019-41b1-a61b-0783012fe90e)
Tom van der Laan changed title from [BETA] broken langages files to Broken langages files 2024-02-05 13:23:45 +00:00

I removed the BETA Tag from the title because this is not related to the BETA version.

Joomla recently fixed a vulnerability that broke the way language files were able to function before.
Before it was okay to have line breaks in your language files altho it is not 100% correct syntax for ini files. Now the ini files are parsed stricter thus not allowing for line breaks anymore.

Thats why it breaks. But fortunately JCB always has had this option to remove line breaks :D

I removed the BETA Tag from the title because this is not related to the BETA version. Joomla recently fixed a vulnerability that broke the way language files were able to function before. Before it was okay to have line breaks in your language files altho it is not 100% correct syntax for ini files. Now the ini files are parsed stricter thus not allowing for line breaks anymore. Thats why it breaks. But fortunately JCB always has had this option to remove line breaks :D

thanks a lot Tom,

after I wrote my post, a saw the issue #1021...
after changing this setting, the constants are shown only in english, because in german, there are still some lines with a break:

`
320 COM_BOOKSHOP_COUPON_FREE_SHIPPING="Kostenloser Versand
321 "

544 COM_BOOKSHOP_ORDER_TRACKED_DESCRIPTION="Tracked oder Untracked<br />
545 Verfolgt oder nicht verfolgt"
`

thanks a lot Tom, after I wrote my post, a saw the issue #1021... after changing this setting, the constants are shown only in english, because in german, there are still some lines with a break: ` 320 COM_BOOKSHOP_COUPON_FREE_SHIPPING="Kostenloser Versand 321 " 544 COM_BOOKSHOP_ORDER_TRACKED_DESCRIPTION="Tracked oder Untracked\<br />\ 545 Verfolgt oder nicht verfolgt" `

Hmm ok let's wait and see what llewellyn says about it.

Hmm ok let's wait and see what llewellyn says about it.
Tom van der Laan changed title from Broken langages files to [BETA] Broken langages files 2024-02-05 14:27:06 +00:00
Tom van der Laan added the
Beta
label 2024-02-05 14:27:09 +00:00

ok I made new tests, it seams that it happens if there is a return at the end of a string, or of there are two lines or there is <br /> in stead of just <br>
now I have no errors anymore :-)

ok I made new tests, it seams that it happens if there is a return at the end of a string, or of there are two lines or there is \<br /> in stead of just \<br\> now I have no errors anymore :-)
Owner

Fixed it in 24163c1071 please test download

Fixed it in https://git.vdm.dev/joomla-beta/com-componentbuilder/commit/24163c10711c04a864f2fbc2203854e697e42713 please test [download](https://git.vdm.dev/joomla-beta/pkg-component-builder/archive/v3.1.37.zip)

yes it work! thanks a lot :-)

yes it work! thanks a lot :-)
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1042
No description provided.