Labels & characters length

dimoss

Well-Known Member
Hi,

I wonder how I could change the character length limit on an element label and/or in the tip.
I want to make a questionnaire and the questions are somehow big...
Thanks
 
I think that I found what the problem is....
Fabrik is cut all the text is after a ","...
Strange but this is the case.
 
Wow, that was a corner case.

As per the comment I just put on the bandaid in our code:

Code:
            /**
             * $$$ hugh JText::_() does funky stuff to strings with commas in them, if what
             * follows the first comma is all "upper case".  But it tests for that using non
             * MB safe code, so any non ASCII strings (like Greek text) with a comma in them
             * get truncated at the comma.  Corner case or what!  But for now, just don't run
             * any label with a comma in it through JText!
             */

            if ((strpos($element->label, ',') === false))
            {
                $labelText = JText::_($element->label);
            }
            else
            {
                $labelText = $element->label;
            }

Should be fixed with this commit, which just avoids translating any labels with commas in them.

https://github.com/Fabrik/fabrik/commit/2c89be312be95f59cbe78e7a1ded4735e1b3b54d

-- hugh
 
Hi Hugh

Thanks for the fix...However it needs to be fixed also in Groups Intro fields also and maybe in Forms Intro too!
 
Yeah, it'd need to be fixed everywhere we feed text to JText::_(), which is in a LOT of places, as we try to make as much of Fabrik "translateable" as possible, to allow people to build multilingual sites more easily.

I need to run this one by Rob, as the bandaid I applied for element labels isn't a realistic Fabrik-wide solution to the problem.

-- hugh
 
NOTE to self / Rob - I suspect the best approach would be to have a wrapper like FText::_(), which figures out if it's safe to throw the text at JText or not. Then we can just globally replace JText::_(*) with FText::_(*).

-- hugh
 
No I didn't closed it.
I just posted a Friendly bump..
Could u re-open it please?
Thanks!
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top