escape() has nothing to do with the unescape() just below it, it's used
to prepare messages before handing them off to a MessageFormat. We don't have those in actionscript, so we don't need to prepare. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4471 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -180,7 +180,7 @@ public class MessageBundle
|
||||
return (key + args);
|
||||
}
|
||||
|
||||
return mx.utils.StringUtil.substitute(escape(msg), args);
|
||||
return mx.utils.StringUtil.substitute(msg, args);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -355,19 +355,6 @@ public class MessageBundle
|
||||
return qualifiedKey.substring(qsidx + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to escape single quotes so that they are not interpreted by
|
||||
* {@link MessageFormat}. As we assume all single quotes are to be
|
||||
* escaped, we cannot use the characters <code>{</code> and
|
||||
* <code>}</code> in our translation strings, but this is a small
|
||||
* price to pay to have to differentiate between messages that will
|
||||
* and won't eventually be parsed by a {@link MessageFormat} instance.
|
||||
*/
|
||||
public static function escape (val :String) :String
|
||||
{
|
||||
return val.replace("'", "''");
|
||||
}
|
||||
|
||||
/**
|
||||
* Unescapes characters that are escaped in a call to compose.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user