User tests: Successful: Unsuccessful:
Pull Request for Issue #45567 .
This PR resolves an issue where values appended to a <limitbox> XML form field using the append attribute were incorrectly displayed with a J prefix (e.g., J35, J40, etc.) due to Joomla attempting to translate J{value} language keys that might not exist.
To fix this, the PR now checks if a language string exists for J{value} before applying the translation. If the key exists, it uses the translated text; otherwise, it uses the raw number as-is. This maintains compatibility with existing language strings while improving flexibility for custom use cases.
<field type="limitbox" append="35,36,37 /> in an XML form (or edit an existing form field if you don't want to create one, such as the limitbox field at administrator/components/com_users/forms/filter_groups.xml by adding the append attribute to it)J35, J36, J37, instead of the dropdown showing a J prefixed entry for the text on the option, it just shows the raw text ( 35, 36, 37)append= show up with a J prefix, e.g., J35, J36, J37, even though these language keys likely don't exist.J{value} language key exists (like J25), it's translated.35) is used directly for the option label.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
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Labels |
Added:
PR-5.3-dev
|
||
| Labels |
Added:
bug
|
||
I have tested this item ✅ successfully on d0b2175
I have tested this item ✅ successfully on d0b2175
| Status | Pending | ⇒ | Ready to Commit |
RTC
I understand the idea here, but this would mean we are doing a special case just for this. Besides that, there is another way. If you want to add number to the limitbox, provide translations for it.
I have added the PR to ther agenda of the next possible Maintainers Meeting (13 Aug) - Stay tuned. :-)
| Status | Ready to Commit | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-08-08 09:08:18 |
| Closed_By | ⇒ | rdeutz | |
| Labels |
Added:
RTC
RMDQ
|
||
We discussed it already. The decision was to leave it as it is. If you want to add more numbers to the limit box, you have to provide the translations, because that's how the system works. There are other numbering systems (Chinese and Persian Farsi), but we don't currently use any of them in the language packs. We could discuss whether it makes sense to translate numbers at all, but that is beyond the scope of this PR. I am therefore closing the PR. Thanks to all who worked on this.
I have tested this item ✅ successfully on a691e2c
Hi Travis, great contribution! I was able to successfully test this. (took me a while to find/realize it was /administrator/index.php?option=com_users&view=groups that needed to be looking at with your recommended xml file update but eventually I did (and I didn't even AI :p lol )
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45598.