Localization of CVSTrac

All the text generated by CVSTrac is American English. But dates can be displayed in the local language and format. To show dates in the local language, do this:

       LANG=uk_UA.KOI8-U /usr/local/bin/cvstrac $*

You can set LANG environment variable in xinet.d configuration (see "man xinetd.conf" for details):

env LANG=uk_UA.KOI8-U

or in .htaccess (in case of CGI script):

  <IfModule mod_env.c>
  SetEnv LANG uk_UA.KOI8-U

If you want to run a localized CVSTrac in chroot environment (such as described in ChrootJailForCvstrac), use the following command to find all files required by the cvstrac binary.

   strace -o logfile -e trace=file cvstrac ...

Then "logfile" will list file operations that cvstrac tried, whether they succeeded or not.

See also CvsTracLocalization

Localization of CVSTrac 2.0

SQLite3 officially supports only UTF-8 as text, but almost functions work fine even for other encodings.

So there is two way to localize cvstrac 2.0.
One is using UTF-8, the other is using local encoding.

      $ mv <project>.db <project>_old.db
      $ sqlite3 <project>_old.db .dump | iconv -f <oldencoding> -t UTF-8 | \
	sqlite3 <project>.db

      File Diff:
        rcsdiff -q -r'%V1' -r'%V2' -u '%F' | iconv -f <sourceencoding> -t UTF-8

      File List:
	co -q -p'%V' '%F' | iconv -f <sourceencoding> -t UTF-8 | diff -c /dev/null -

      File Filter:
	iconv -f <sourceencoding> -t UTF-8

      $ sqlite3 <project>.db
      sqlite> insert into config values('rlog',
         ...>   'rlog ''-d%TR'' ''%F'' 2>/dev/null | ' ||
         ...>   'iconv -f <sourceencoding> -t UTF-8');