Skip to content

Commit

Permalink
Refactor of LU parser and LU raw parse API (#1285)
Browse files Browse the repository at this point in the history
* Refactor of LU parser and LU raw parse API

* Exposing raw lu parsing

* Adding fixtures for new test

* Removing console.log

* Adding missing fixture file

* Addressing PR comments
  • Loading branch information
munozemilio committed Sep 21, 2021
1 parent fcb2cdb commit c1c0528
Show file tree
Hide file tree
Showing 6 changed files with 2,285 additions and 456 deletions.
6 changes: 5 additions & 1 deletion packages/lu/src/parser/lu/lu.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

const translateHelpers = require('./../lufile/translate-helpers')

const luOptions = require('./luOptions')
const luParser = require('./../lufile/luParser')

class Lu {
constructor(content, options = new luOptions){
Expand All @@ -22,6 +22,10 @@ class Lu {
}
}

parse(){
return luParser.parse(this.content, undefined, {});
}

async translate(translate_key, tgt_lang, translate_comments = false, translate_link_text = false, region = ''){
const translateSettings = new translateHelpers.translationSettings();
translateSettings.subscriptionKey = translate_key
Expand Down

0 comments on commit c1c0528

Please sign in to comment.