Code Monkey home page Code Monkey logo

omnis-stbeditor's Introduction

omnis-stbeditor

STBEDITOR.lbs is an Omnis Studio library and PostgreSQL database to store the Omnis string table entries for all your applications. The library includes an interface to the Google Translate API so basic translations can be obtained for your string tables.

The database entries can be extracted to create an in-memory string table when your application starts up by including a call to the method $buildStringTable, which can be copied from the task class tkSuper.

Dependencies

Omnis Studio version 8.1 or later.

STBEDITOR requires a PostgreSQL database to store the string table entries in. The database can be created from stb.sql but will require that your Postgres instance has the following two group roles created first:

  1. "_developer" which owns the objects and
  2. "regular" which must be granted to the login role you wish to use to connect from Omnis.

NB. The database includes the entries for the CONFERENCE app to get you started.

Installation

Clone this repository.

Copy stbeditor.lbs to a directory of your choice or open Omnis and Import from JSON.

Copy the SQLite initialisation DB STBEDITOR.libini to the same directory as the library.

Create the stb database from the stb.sql script (replacing dBserver/port/dbToConnectTo/userName with your own values):

psql -h dbServer -p port -d dbToConnectTo -U userName -a -f /path/to/stb.sql

Usage

  1. Open stbeditor.lbs, and a login window will open to allow you to choose your database connection.

Instances

  1. Hold down the shift key and click the Quit button.
  2. This will take you to the init configuration editor.

Instances

  1. Select "database connection info" from the drop list
  2. Enter your Postgres server parameters: Host and port. (The "validif" value is used in an Omnis eval() to decide if this connection can be used. If you enter multiple databases and more than one "validif" evaluates to kTrue, the login window will display them in a drop list to be selected by the user.)
  3. Save your changes and close the library.
  4. Reopen the library and you should be able to connect to your stb database.

Note

The editor includes an object class, oTranslate, which interfaces to Google's Translation API. To use this functionality, an API key must be obtained from Google and entered in the global reference table.

  1. Select "reference global" from the String Table Editor menu.
  2. Select GOOGLE from the class drop list.
  3. Select the TRANSLATION_KEY line and enter your API key in the character box to the right. The change will save when you close the window.

Instances

omnis-stbeditor's People

Contributors

teneruffian avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.