You are here

function _potx_parse_js_string in Translation template extractor 6.3

Same name and namespace in other branches
  1. 8 potx.inc \_potx_parse_js_string()
  2. 5.2 potx.inc \_potx_parse_js_string()
  3. 5 potx.inc \_potx_parse_js_string()
  4. 6 potx.inc \_potx_parse_js_string()
  5. 6.2 potx.inc \_potx_parse_js_string()
  6. 7.3 potx.inc \_potx_parse_js_string()
  7. 7 potx.inc \_potx_parse_js_string()
  8. 7.2 potx.inc \_potx_parse_js_string()

Clean up string found in JavaScript source code. Only from Drupal 6.

1 call to _potx_parse_js_string()
_potx_parse_js_file in ./potx.inc
Parse a JavaScript file for translatables. Only from Drupal 6.

File

./potx.inc, line 1707
Extraction API used by the web and command line interface.

Code

function _potx_parse_js_string($string) {
  return _potx_format_quoted_string(implode('', preg_split('~(?<!\\\\)[\'"]\\s*\\+\\s*[\'"]~s', $string)));
}