In SugarCrm language files strings are sometimes wrote with single quotes, sometimes with double quotes, sometimes with single backslashes, sometimes with double backslashes.
1) double quotes and single backslashes
'LBL_ROUTING_CHECK_RULE' => "An error was detected:\n"
2) single quotes and single backslashes
'LBL_EMAIL_SETTINGS_FULL_SYNC_WARN' => 'Perform a full synchronization?\nLarge mail accounts may take a few minutes.'
3) double quotes and double backslashes
'ERR_DECIMAL_SEP_EQ_THOUSANDS_SEP' => "The decimal separator cannot use the same character as the thousands separator.\\n\\n Please change the values."
This is causing some problem in the localization.
Considering that strings are used in PHP and Javascript too, this is a bit confusing for a translator and for an automatic translation tool too.
I have always used double quotes but this is causing javascript errors.
If I would use always single quotes I see not rendered "\n" in the html.
IMO JS strings should be enclosed in single quotes and, viceversa, HTML strings in double quotes. The variable name should indicates if it is a JS string or a HTML string to decide which quoting to use.
Any suggestion ? Should I review every string of every file to see which quoting is SugarCRM using and maybe where ?


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks