Extract strings from javascript in html file
Original issue 438 created by chriscollingto... on 2015-01-29T08:24:04.000Z:
What steps will reproduce the problem?
Extract javascript from an HTML file using the okf_html filter extracts the code block rather than just the text
Example:
function insertDialByVoicemailByText(element)
{
trace.begin("insertDialByVoicemailByText", element);
var allowedActions = [];
var textString = "";
if (classOfService.get("AaDialByExtensionAllowed._"))
{
allowedActions.push("Dial by Extension");
}
if (classOfService.get("AaDialByNameAllowed._"))
{
allowedActions.push("Dial by Name");
}
if (classOfService.get("AaMailboxByExtensionAllowed._"))
{
allowedActions.push("Voicemail by Extension");
}
if (classOfService.get("AaMailboxByNameAllowed._"))
{
allowedActions.push("Voicemail by Name");
}
if (classOfService.get("AaSelfcareByExtensionAllowed._"))
{
allowedActions.push("Selfcare by Extension");
}
}
This should extract "Selfcare by Extension" etc. Suggestion by Jim to modify the filter
script:
ruleTypes: [INCLUDE]
This resulted in the entire function being output to xliff.
Jim suggested raising it as an issue as he thinks it should be relatively simple to manage
Comments (2)
-
Account Deleted -
- marked as enhancement
- edited description
- Log in to comment
Comment 1. originally posted by @ysavourel on 2015-02-21T23:58:36.000Z: