Skip to content
rich123 edited this page Jul 17, 2011 · 12 revisions

Here you will find some hints if you would like to participate in developing Password Gorilla

Gettext

Create gorilla.pot

A potential new translator needs as base for his translation the catalog template file gorilla.pot which he will edit and save to his locale.po

The template file gorilla.pot is constructed by two templates which are concatenated by msgcat.

The file source.pot is created by typing:

cd <Path-To-Gorilla>/sources
xgettext -kmc -o source.pot -L Tcl gorilla.tcl viewhelp.tcl

For adding or modifying menuitems edit menuitems.pot manually.

Finally concatenate the two files typing:

msgcat -o gorilla.pot menuitems.pot source.pot 

Creating and updating locale catalogue files for Password Gorilla

A new lang.po file will be by principle just a copy of gorilla.pot
Just make a initial call to create a header:

msginit -l <lang> -o <lang>.po -i gorilla.pot

To avoid issues the header should contain charset=UTF-8

The existing message file has to be prepared thus:

msgmerge --update <lang>.po --backup=simple gorilla.pot" 

This will add the new untranslated messages to .po and mark the deprecated
and fuzzy ones.

Subsequently the updated catalogue file can be edited with an specialized editor like Poedit or with any text editor.

They deprecated ones are marked like this:

#~ msgid “Exit”
#~ msgstr “Beenden”

Creating Tcl .msg files

msgfmt --tcl -l<lang> -d <path-to-msgs-dir> <lang>.po
mcset2mcmset.tcl <list of .msg files>

Since version 1.5.3.6 a new short description management for msgcat entries has been added. Each msgcat entry will have the following format:

[mc CATEGORY-SubCategory-identifier-?string?-...]

The master file en.po will translate the short description to the final message text. Translators will take it as a base for their translation.

Custom Icons For Win32 Starpacks

See details in Tcl/Tk Wiki #10922

Note:
bq. (HaO) Since TCL 8.5.8, the window icon for the starpacks on Pat Thoyts page 7 changed to tclsh.ico (the feather from the tcl core distribution). This file includes a 64×64 bit resolution icon and thus, the upper JCW-Method 1 does not work any more.

The new method works like this:

  1. create a starpack: tclkit sdx.kit wrap gorilla.exe -runtime tclkit-8.5.9-win32.upx.exe
  2. cp gorilla.exe gorillaversion.exe
  3. upx -d gorillaversion.exe
  4. start the Windows program Resource Hacker (http://delphi.icm.edu.pl/ftp/tools/ResHack.zip) with GUI (in a VirtualBox window), drag gorillaversion.exe into it
  5. Search "Icon groups → Tk → 1033, rightclick the group and choose “Replace Resource …”
  6. click “Open file with new icon …” and choose as source sources/pics/gorilla.ico in Gorilla’s installation directory
  7. edit “Version Info”
  8. save the edited exe file
  9. upx —best —compress-resources=0 gorillaversion.exe
Clone this wiki locally