Code Monkey home page Code Monkey logo

qstrtoexpr's Introduction

qStrToExpr

A set of Enigma scripts for extracting and converting strings in Qlik Sense apps to translation expressions.

  • Read: Extracts strings that can be converted to epxressions to CSV file
  • Write: Converts strings to Qlik expressions =$(Translate('Any string'))
  • Undo: Restores converted expressions back to strings

The main bat file runs all scripts and merges the csv files into one.

Install

  • Install enigma.js
  • Install minimist npm i minimist
  • Download zip file and extract to folder

Run

  • Start Qlik Sense Desktop
  • Open command prompt
  • Run bat file
Usage:   .\qStrToExpr.bat <read|write|undo> <appname>
Example: .\qStrToExpr.bat read LabelExtract

The scripts can alo run individually:

Usage:   node getset_masteritems_filterpanes.js -m=read/write/undo -a appname
Example: node getset_masteritems_filterpanes.js -m=read -a LabelExtract

Notes

  • Tested on Qlik Sense April 2018.
  • Modifies the data structure of the app, might break in older or younger versions.
  • Make a copy of the app before running the script.
  • Only strings that can be expressions in the UI is handled.
  • LabelExtract.qvf is a example app with strings, LabelExtract_expr.qvf is the same app after conversion with strings as expressions.

Strings

  • Sheet: title and description
  • Object: title, subtitle, footnote, dimension label, alternative dimension label, measure label, alternative measure label, chart totals.
  • Object include barchart, boxplot, combo chart, distribution plot, filter pane, gauge, histogram, KPI, line chart, map chart, pie chart, pivot table, scatter plot, table, text box, treemap, waterfall and extensions.
  • Masteritems, same as objects plus master item label and description.

Translating Sense apps

The script can be used as a starting point for producing a multi lingual Qlik Sense app. The example Sense app contains a link to a Google Spreadsheet that contains the string index and auto translated strings =GoogleTranslate($A2,$A$1,B$1) to a number of languages. More info on the subject on translating apps Handling Multiple Languages by Charles Bannon.

qstrtoexpr's People

Contributors

patricnordstrom avatar

Stargazers

 avatar  avatar

Forkers

miguelamd0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.