The file krogue.pot is created by make and contains the string taken
from the i18n macros.

The file text.pot contains the strings from the game that have some
names inside, like:
  your ${0} glows ${1} for a moment

Where ${0} is substituted with the name of your weapon and ${1} with the
name of the color. The sprintf() function isn't used because the order
of the agruments can change in the translated string.

The program translates the format (i.e. the string with ${0}) the
arguments (the name of the weapon and the name of the color) and uses them in
the translated format instead of ${0} and ${1}.

You can also use diffrent forms of a word in different strings. For example
the name of the color is used also in the name of the potion: 
  a ${0} potion

If you have to use diffrent word for the same color in these two string you
can add a letter is the brackets:
  a ${0X} potion

The program will add 'X' to the name of the color before translating -
if the name of the color is blue than it will be changed to blueX and
then it will be translated. You can translate blue to the first form and
blueX to the second form:
msgid "blue"
msgstr "...."

msgid "blueX"
msgstr "......"

(tupdate would comment out the field "blueX". That's why these string are not
in krogue.pot but in text.pot)

You can also use diffrent form of the format for different arguments. For
example if you want to have a different translation of the string "the ${0}
misses" for a nymph than for the other monsters. You have change the
translation of the string _form.miss.monster that is in the text.pot file:

#       sABCDEFGHIJKLMNOPQRSTUVWXYZf
msgid "_form.miss.monster"
msgstr ""

The meaning of the characters above is explained in comments in text.pot. For
_form.*.monster 's' means something A-Z are monsters and 'f' means flame.
To change the form you have to write a character in the column below the
wanted argument:

#       sABCDEFGHIJKLMNOPQRSTUVWXYZf
msgid "_form.miss.monster"
msgstr "              X             "

Note: if you translate a _form.* string than it shouldn't begin with an
underscore ('_') and must have the same length as the charactes above.

If the monster isn't a nymph than nothing will happend but if it is a
nymph, 'X' will be appended to the format before translation. That means
that for a nymph the format will be the translation of:
  the ${0} missesX
that can be the second form of the format.

If there is more than one argument the characters are appended in the order
of the arguments - if the argument ${0} appends the character X and ${1}
appends a character Y than XY will be appended.

If an argument is a number then the _form string is a _form.*.plural string
and has 20 characters that corresponds to numbers 0..19. The last two digits
of the number are taken. If they are smaller than 20 the character is taken
from the position that equals these two digits. If they are bigger that the last
digit is taken and the character from that position is taken.

After translating the format, arguments and building the string some rules
can be executed. In that version the only rule is called "aan" and changes
the words 'a' that are before a word that begins with a vowel to 'an'
(for example "a arrow" -> "an arrow"). It is used then no translation
is used (i.e. in the C default language that is English). If you want to use it
in your translation add lines:
 
msgid "_rule"
msgstr "aan"

If you want create your own rule, you should edit the file roguec.cpp

To build the .mo file you should join krogue.po and text.po together:

cat krogue.po text.po >tmp.po
msgfmt tmp.po -okrogue.mo
rm -f tmp.po