HOW TO TRANSLATE KROGUE

If you want translate KRogue to your own language, you need only a text
editor, some knowlegde of Rogue and a bit of time. If you translate something
you may send me them to include them in the next version of KRogue.

There are four things to translate:


 I. The *.desktop files
------------------------

The krogue.desktop and x-kroguesg.desktop are in the main directory of
the source tree. After installation they are in
$KDEDIR/share/applnk/Games/ and $KDEDIR/share/mimelnk/application/
You should add an

Comment[xx]=........

line to it where xx is your language code and ......... is the translation of
the comment.

Note: under KDE 2.x the *.desktop files are encoded in UTF-8. This means that
if you have some non-ASCII characters (i.e. not from the standard set of
English characters) you will have to recode them from your charset to UTF-8.
The easiest way is to write the line in a separate file and use the iconv
utility that comes with the glibc library:
  iconv -f your_charset -t utf8 commentline.txt >>krogue.desktop
  
where your_charset is your charset (see "iconv --list" for a list). This
command will add a line in UTF-8 to the krogue.desktop file.

The i18n.kde.org mentions also a program called recode, that can be found at
  http://www.iro.umontreal.ca/contrib/recode/HTML/


 II. The help files
--------------------

The help files are writted in HTML and are located in krogue/docs/xx in the
source archive and are installed in $KDEDIR/share/doc/HTML/xx/krogue, where
xx is the language code.

To translate them, copy the English files to the directory correspoding to your
language and start translating. Don't translate file names - translate only
their content. If your charset is not iso-8859-1 then change the charset in
the META tag.

After translating copy them to $KDEDIR/share/doc/HTML/xx/krogue.


 III. The KRogue messages
--------------------------

These files contains the messages of the game itself. All the messages that are
used in KRogue are stored in po/krogue.pot and po/text.pot. Copy them to
po/xx/krogue.po and po/xx/text.po (where xx is your language code).

You can use a dedicated translation tools like KBabel (for KDE 2.x) or
KTranslate (for KDE 1.x), or just use any text editor. In these files you
will find msgid lines with the strings in English and some empty msgstr
lines where you should write the translated strings. You can find more
information about such files at http://i18n.kde.org/translation-howto/

Note: don't forget about spaces or '\n' at the end of the strings. Usually they
should also be in the translated string (e.g. "Gold: " should be translated to
"Xxxx: " to get "Xxxx: 1234" on the status bar. If you translate it to "Xxxx:"
will get "Xxxx:1234".

The text.po contains strings that may depend on gramatic rules. See po/README
for information how to use it. The text.po should start with an empty line.

To test your translation you need to join and compile the .po files. This is
done by the gettext package which should in most distributions. Use:

cat krogue.po text.po >tmp.po      # join the files
msgfmt tmp.po -okrogue.mo
#is everything went well delete the tmp.po file:
rm -f tmp.po

Now copy the krogue.mo file to $KDEDIR/share/locale/xx/LC_MESSAGES. It's a
good parctice to try to test the changes that you've made.

Note: don't overwrite krogue.mo while KRogue is running as it may crash.


 IV. The krogue.spec file
--------------------------

In krogue.spec you will probably want to translate Description and Summary
fileds. Add a "Summary(xx): ............" line in the spec file and a

%description -l xx
..................................................................
.................

prargraph to the file, like the ones for the pl translation.