User tests: Successful: Unsuccessful:
Pull Request for Issue https://forum.joomla.org/viewtopic.php?f=711&t=969007
In some cases, the language string may contain an odd number of double quotes.
If this is due to an escaped double quote, it should not show as an error.
Enable debug language
Load admin.
Modify the string en-GB.lib_joomla.ini in the en-GB administrator language
from
JLIB_DATABASE_ERROR_VALID_AZ09="Please enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ " ' % ; ( ) &."
to
JLIB_DATABASE_ERROR_VALID_AZ09="Please enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ \" ' % ; ( ) &."
i.e. replacing "
by \"
Debug lang is showing Error for the line 226
No more error.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
@brianteeman Thank you. You are right. I am in the wrong version
@astridx
the issue is not in the display of the string.
the issue is that Debug Language would state that the string is in error while it is not.
see bottom of page.
test is to be done on 3.x
to test it is very important to only add one \” in the string (odd number) and not an even number.
I have tested this item
I have tested this successfully on Joomla! 3.9.2
One more tester please.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Thanks for testing!
@infograf768 I think the solution is wrong, if you don't want to get an error for a missing closing quote (which is possible in Spanish) you simple should remove
joomla-cms/libraries/src/Language/Language.php
Lines 881 to 886 in c557551
I disagree. That code is to display an error if the string value is missing an opening OR closing quote.
Also to deal with a missing double quote in the QQ
It is perfectly fine and these should always be a pair, AFTER we got rid of "_QQ_"
and \"
. It was this last one that is at the origin of this PR, when it is used for example to replace a "
What is special in Spanish that would be an issue?
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-24 12:48:53 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
Is it correct, that I should change the language string in JOOMLA/administrator/language/en-GB/en-GB.lib_joomla.ini ?Because here it is in line 230In JOOMLA/language/en-GB/en-GB.lib_joomla.ini it is on line 226For testing I changed both strings toJLIB_DATABASE_ERROR_VALID_AZ09="P\"lease enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ \" ' % ; ( ) &."
But I did not find a place testing it in frond end.In back end I see now error. I changed the string and I opened user manager and inserted a username with a space on the begin. After that I see a correct language string.