computerline1z / okapi

Automatically exported from code.google.com/p/okapi
0 stars 0 forks source link

Extract strings from javascript in html file #438

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by chriscol...@gmail.com on 29 Jan 2015 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by tingley on 21 Feb 2015 at 11:58