Author: jfthomps
Date: Fri Jul 24 15:16:15 2015
New Revision: 1692537

URL: http://svn.apache.org/r1692537
Log:
VCL-888 - problem with translations containing single quotes

utils.php: changed escq() function to i() which calls _() on the passed in 
string and is to be used as a wrapper anywhere _() was called

Modified:
    vcl/trunk/web/.ht-inc/utils.php

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1692537&r1=1692536&r2=1692537&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Fri Jul 24 15:16:15 2015
@@ -13410,19 +13410,18 @@ function changeLocale() {
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn escq($str)
+/// \fn i($str)
 ///
 /// \param $str - string
 ///
-/// \return $str with any single quotes changed to '
+/// \return possibly translated $str with any single quotes changed to '
 ///
-/// \brief converts any single quotes to ' useful for dealing with strings
-/// that will be single quoted and passed as javascript but that may be
-/// translated to something that contains a single quote
+/// \brief function name comes from first letter of "internationalize" - calls
+/// _() on $str and converts any single quotes in returned string to '
 ///
 
////////////////////////////////////////////////////////////////////////////////
-function escq($str) {
-       return preg_replace("/'/", ''', $str);
+function i($str) {
+       return preg_replace("/'/", ''', _($str));
 }
 
 
////////////////////////////////////////////////////////////////////////////////


Reply via email to