[BUG]: Language strings converted to constants drop the special characthers #1287

Open
opened 2026-02-28 15:32:54 +00:00 by dormasta · 2 comments

What Happened?

Hello,
When JCB creates INI to translate Text::('Firstname,Lastname,email@example.com') and Text::('Firstname;Lastname;email@example.com') are seen as the same string: COM_INVITOO_FIRSTNAMELASTNAMEEMAILEXAMPLECOM therefor the second one is translated the same way as the first one.

Steps to reproduce the Bug

  1. Create 2 texts with Text::('Firstname,Lastname,email@example.com') and Text::('Firstname;Lastname;email@example.com')
  2. Compile
  3. Go to Language Translations
  4. Only one source string appears

Which Joomla version are you compiling in?

5.4.3

Which PHP version are you compiling in?

8.4.10

Which Joomla versions are you targeting?

5.4.3

Which PHP version are you targeting?

8.4.10

Which Web server is JCB running on?

Apache 2.4

Which Relational Database is JCB running on?

mysql 8

Which OS is JCB running on?

Linux

Which JCB version are you using?

5.1.4

Where in JCB did this issue occur?

Language Translations(admin_views)

On which browsers did you encounter the issue?

Firefox

Additional Comments

No response

### What Happened? Hello, When JCB creates INI to translate Text::_('Firstname,Lastname,email@example.com') and Text::_('Firstname;Lastname;email@example.com') are seen as the same string: COM_INVITOO_FIRSTNAMELASTNAMEEMAILEXAMPLECOM therefor the second one is translated the same way as the first one. ### Steps to reproduce the Bug 1. Create 2 texts with Text::_('Firstname,Lastname,email@example.com') and Text::_('Firstname;Lastname;email@example.com') 2. Compile 3. Go to Language Translations 4. Only one source string appears ### Which Joomla version are you compiling in? 5.4.3 ### Which PHP version are you compiling in? 8.4.10 ### Which Joomla versions are you targeting? 5.4.3 ### Which PHP version are you targeting? 8.4.10 ### Which Web server is JCB running on? Apache 2.4 ### Which Relational Database is JCB running on? mysql 8 ### Which OS is JCB running on? Linux ### Which JCB version are you using? 5.1.4 ### Where in JCB did this issue occur? Language Translations(admin_views) ### On which browsers did you encounter the issue? Firefox ### Additional Comments _No response_
dormasta added the Bug label 2026-02-28 15:32:55 +00:00
Owner

We currently have no fix for this, and I am not sure there will ever be a fix.

The way we convert your strings to CONSTANT values removes all special characters and keeps only the alphabetical part.

Normally we might do this:

Text::_('Firstname') . ',' . Text::_('Lastname') . ',email@example.com';

and then:

Text::_('Firstname') . ';' . Text::_('Lastname') . ';email@example.com';

or in HTML:

<?php echo Text::_('Firstname'); ?>,<?php echo Text::_('Lastname'); ?>,email@example.com

and then:

<?php echo Text::_('Firstname'); ?>;<?php echo Text::_('Lastname'); ?>;email@example.com

email don't need translation normally, but you could also add that to its own string.

We currently have no fix for this, and I am not sure there will ever be a fix. The way we convert your strings to CONSTANT values removes all special characters and keeps only the alphabetical part. Normally we might do this: ```php Text::_('Firstname') . ',' . Text::_('Lastname') . ',email@example.com'; ``` and then: ```php Text::_('Firstname') . ';' . Text::_('Lastname') . ';email@example.com'; ``` or in HTML: ```html <?php echo Text::_('Firstname'); ?>,<?php echo Text::_('Lastname'); ?>,email@example.com ``` and then: ```html <?php echo Text::_('Firstname'); ?>;<?php echo Text::_('Lastname'); ?>;email@example.com ``` > email don't need translation normally, but you could also add that to its own string.
Owner

So as a rule you would leave the special character out if you use the same string in multiple places, and need the characters to fit each use case.

So as a rule you would leave the special character out if you use the same string in multiple places, and need the characters to fit each use case.
Llewellyn changed title from [BUG]: to [BUG]: Language strings converted to constants drop the special characthers 2026-03-10 14:18:49 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#1287