Author: | Dave Kuhlman |
---|---|
Contact: | dkuhlman (at) davekuhlman (dot) org |
Address: | http://www.davekuhlman.org |
revision: | 2.43.1 |
---|
date: | August 07, 2023 |
---|
copyright: | Copyright (c) 2016 Dave Kuhlman. This documentation and the software it describes is covered by The MIT License: http://www.opensource.org/licenses/mit-license.php. |
---|---|
abstract: | This document describes generateds_ui.py, the graphical front end to generateDS.py. |
Contents
generateds_gui.py provides a graphical front end for generateDS.py. Some may find it easier to configure and to select and set options for generateDS.py using this graphical application.
You will need Gtk support for Python in order to run generateds_gui.py.
You must run generateds_gui.py under Python 3. Python 2 is not supported.
Note that you can use the "--session" command line flag supported by generateDS.py on a machine that does not have Python Gtk support installed.
Here are some of the different ways that you can use generateds_gui.py:
You can get some help by running the following:
$ ./generateds_gui.py --help
Command line options and arguments:
Usage: python generateds_gui.py [options] --session=<some_session_file.session> example: python generateds_gui.py --session=generator01.session Options: -h, --help show this help message and exit --exec-path=EXEC_PATH path to executable generated in command line. Example: "python /path/to/generateDS.py". Default: "./generateDS.py". Use Tools/Generate CL (Ctrl-T) to see it. --impl-gui=IMPL_GUI name of glade file that defines the GUI if not embedded. -s SESSION, --session=SESSION name of a session file to be loaded.
Note: This work on internationalization for generateds_gui is experimental and does not yet work.
Here is what I've done:
$ cd generateds/gui/ $ mkdir po # Create the template file. $ xgettext -k_ -kN_ -o po/generateds_gui.pot generateds_gui.glade # Create a file for the translator. This one is for the Russian language. $ msginit --locale=ru --input=generateds_gui.pot
And, after someone has added their translations (for example, to ru.po), we translate it to binary with the following command:
$ msgfmt -o generateds_gui.mo ru.po
Finally, move the binary file to the appropriate directory under the directory containing the executable (generateds_gui.py). See Installation and setup.
Now we have to move the .mo file where it will be used when we run generateds_gui.py. We place it in a sub-directory under the location of generateds_gui.py itself.
$ cd /directory/containing/generateds_gui.py $ mkdir locale $ mkdir locale/ru $ mkdir locale/ru/LC_MESSAGES $ mv generateds_gui.mo locale/ru/LC_MESSAGES/