Radio options case changed #930
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#930
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
Create a radio field
Set options to:
1|A B C ...,2|1 2 3 ...,3|a b c ...,4|I II III...,5|i ii iii ...
(using this to give outlining options)
Compile & Install
Expected result
Options should display as:
[A B C ...] [1 2 3 ...] [a b c ...] [I II III...] [i ii iii ...]
Actual result
Options display as:
[A B C ...] [1 2 3 ...] [A B C ...] [I II III...] [i ii iii ...]
similarly, if you have the first option set to "a b c" then the 3rd option becomes "a b c".
Seems that something is automatically adjusting the case of the options.
(Although the 4th & 5th options, roman numerals, are never chagned)
System information (as much as possible)
Additional comments
It appears to be the way that JCB is 'interpreting' the entries there and changing them both to language constant:
COM_COMPONENT_A_B_C_
Which I understand why this is happening (and know how to work-around this*) but wondering if there is a more 'gracefull' way to handle this so that lowercase doesn't always get converted just to upper case.
Maybe need to check the options to make sure that we don't use the same constant twice in one radio field (because you'd never need to have two options of the same thing).
I eneded up naming each one a logical name in the field config (upperalpha, numeric, loweralpha, upperroman, lowerroman) which creates unique contsants and then just dealt with it in translation.
(BTW ... the language strings are created in the administrator/COM_COMPONENT/models/forms/VIEWNAME.xml ... for anyone looking to do this via the translation method)
After working with this a bit, maybe it's 'more proper' to do this via the language strings and translation, as I just realized using 'upperalpha' and 'loweralpha' makes the component much more 'robust' to more easily handle translations (and making the translation process a bit easier for the translator).
So, feel free to just close this if you also think so.
(No need to spend time fixing something that has a better 'user-entry' fix than a code-fix).
But having this here might help someone in the future.