constant POTX_JS_OBJECT_CONTEXT in Translation template extractor 8
Same name and namespace in other branches
- 6.3 potx.inc \POTX_JS_OBJECT_CONTEXT
- 7.3 potx.inc \POTX_JS_OBJECT_CONTEXT
- 7.2 potx.inc \POTX_JS_OBJECT_CONTEXT
Regular expression to match an object containing a key 'context'.
Pattern to match a JS object containing a 'context key' with a string value, which is captured. Will fail if there are nested objects.
1 use of POTX_JS_OBJECT_CONTEXT
- _potx_parse_js_file in ./
potx.inc - Parse a JavaScript file for translatables. Only from Drupal 6.
File
- ./
potx.inc, line 153 - Extraction API used by the web and command line interface.
Code
define('POTX_JS_OBJECT_CONTEXT', '
\\{ # match object literal start
.*? # match anything, non-greedy
(?: # match a form of "context"
\'context\'
|
"context"
|
context
)
\\s*:\\s* # match key-value separator ":"
(' . POTX_JS_STRING . ') # match context string
.*? # match anything, non-greedy
\\} # match end of object literal
');