Catalog Manager

The KBabel Handbook
Prev | Chapter 3. Preferences Dialog | Next

# 3.5. Catalog Manager

This section allows you to edit the options for the Catalog Manager.

## 3.5.1. General

Here are two editlines with Browse... buttons. Type in the directories which contains all your PO- and respectively POT-files. The files and the directories in these directories will then be merged into one tree in Catalog Manager window.

Below you can turn on and off if:

Open files in new window

  If this is activated all files that are opened from the Catalog Manager are opened in a new window.

Kill processes on exit

  If you check this KBabel tries to kill the processes, that are not exited already when program close by sending a kill signal to them.

  | It's not guaranteed, that the processes are killed.

## 3.5.2. Directory Commands

Here you can insert commands you want to execute in directories from the Catalog Manager. The commands are then shown in the submenu Commands in the Catalog Manager's context menu.

Insert in field Name the name of the command. The name can be chosen freely and is only used to be displayed in the menu. In field Command insert the command, you want to have executed when selecting the corresponding menu item. Then press Add button to add the command to your available commands. To edit a command, select it, press Edit button and press Add after you have finished. To remove a command, select one from list and press Remove button. If you want different order in contexual submenu, you can use up and down buttons.

The command is executed through your default shell, so you can execute multiple commands at once by separating them with a semicolon, and you can set environment variables, if you need. The commands are executed in the (PO-file) directory, you have selected in the Catalog Manager.

The following strings will be replaced in a command:

- `@PACKAGE@`: The name of the directory without path

- `@PODIR@`: The name of the PO-directory with path

- `@POTDIR@`: The name of the template directory with path

E.g.: If you want to execute make and then make install you could insert in field Name `Make install` and in field Command `make; make install`. If you then select Commands->Make install from the context menu of a directory, the commands listed above will be executed in this directory.

## 3.5.3. File Commands

Here you can insert the commands you want to execute on files from the Catalog Manager. The commands are then shown in the submenu Commands in the Catalog Manager's context menu.

Insert in field Name the name of the command. The name can be chosen freely and is only used to be displayed in the menu. In field Command insert the command, you want to have executed when selecting the corresponding menu item. Then press Add button to add the command to your available commands. To edit a command, select it, press Edit and press Add after you have finished. To remove a command, select one from list and press Remove button. If you want different order in contexual submenu, you can use up and down buttons.

The command is executed through your default shell, so you can execute multiple commands at once by separating them with a semicolon, and you can set environment variables, if you need. The commands are executed in the (PO-file) directory, in which the file, you have selected in the Catalog Manager, is.

The following strings will be replaced in a command:

- `@PACKAGE@`: The name of the file without path and extension

- `@POFILE@`: The name of the PO-file with path and extension

- `@POTFILE@`: The name of the corresponding template file with path and extension

- `@PODIR@`: The name of the directory, the PO-file is in, with path

- `@POTDIR@`: The name of the directory, the template file is in, with path

E.g.: If you want to merge the template file into your PO-file you could insert in field Name `Merge` and in field Command `msgmerge @POFILE@ @POTFILE@ > @PACKAGE@.new && mv @PACKAGE@.new "@PACKAGE@.po`. If you then select Commands->Merge from a file's context menu, the PO-file will be merged with its template file.

Prev | Home | Next
Save | Up | Miscellaneous