Doc in another language: II

Dave Rowbotham ebe at equinoxit.fsbusiness.co.uk
Sun Jun 17 11:23:32 BST 2001


If you want to translate KDevelop to another language, please contact
Martin Piskernig and read the following :

Preparation and the po files
Make sure that you have the latest CVS version or daily snapshot. Now untgz
the kdevelop package to a local directory and change to the po-directory.
Copy the file kdevelop.pot to a new file consisting of your language code
(as found in the Language settings of KControl) + the extension po. So, if
you want to translate KDevelop to e.g. Norwegian, your file is named

no.po
Now open this file in your favorite editor (like vi or kwrite) (or use
KTranslator). You will see the header of the file where you can fill in your
email address, your name and a description. After that header you see that
each part of the file is composed of four (or more) lines:
First, a comment where in the source files the message can be found. This is
generally not much interesting, except the case that you want to correct the
English string or that you want to look at the context where the message is
used. If there are more occurences of a message there are multiple comments
showing each file where the string can be found.

The second line looks like

msgid "Ready."
As you may have guessed, this is the English string as it looks in the
application. Never modify this string as it will not be recognized any more
after modification (and therefore will not be translated). If you don't know
some C/C++ you will not know the \n character; this marks a new line.

The third line is where action takes place :-) Here you can fill in your
translation embedded in the msgstr "". So the translation of the above
string to German would be

msgstr "Bereit."
Please be careful with newline characters (\n) If the last line of the
English msgid "" provides a \n also add one here. If it does not also leave
it out here because unbalanced newlines give errors with some versions of
the gettext package, the utility which compiles your po-files.

The forth line is usually a blank line. Please leave this there as gettext
needs this.

Testing your translation
Now, after that you have translated the messages in your po file you may ask
how you can make those translations visible. No problem :-) First, you have
to make sure that your po file is recognized by make. Therefore edit the
Makefile.am in the po directory and add your po file to the line GMOFILES =
... But please as extension put a .gmo instead of a .po there. So the file
no.po should be named no.gmo there. That's all you have to do. Now change to
the root directory of KDevelop and (re)run

# make -f Makefile.cvs ; ./configure
Change back to the po directory and run
# make
If there are errors correct them in the po file (most errors will have to do
with forgotten " or unbalanced newlines). If your message file compiles
without errors run
# make install
to install your translation. Now (re)open KDevelop and you can see your
translated messages instead of the English version. If you are happy with
the result just send the file to Martin Piskernig. He will add your
translation to the CVS repository so that users around the world can use
KDevelop in their native language.

Updating translations
Whenever there is a new version of the kdevelop.pot file or a new release of
KDevelop you may want to update your current po file. Simply run

# msgmerge no.po kdevelop.pot >no.pot
(where no.po is your po file). After checking that the no.pot file is
correct rename the no.pot file to no.po by running
# mv no.pot no.po
Now edit this file (you will see that some messages are commented out and
other may have been added).
Note: I got many complaints about msgmerge so you may also try
# tupdate kdevelop.pot no.po >no.pot
Tupdate is only included up to version 0.10 of the gettext package, 0.10.35
already doesn't have it any more.


-----Original Message-----
From: Mailing list agent [mailto:mdom at barney.cs.uni-potsdam.de]On Behalf
Of Anne-Marie
Sent: 17 June 2001 11:10
To: kdevelop at kdevelop.org
Subject: RE: Doc in another language: II



> Is it not just a question of making sure your Linux/Unix box locale is set
> to France?
> Regards

No, I set KDE to be displayed in french and KDevelop starts a project with
"en" in the doc folder.
Thanks anyway, it's good to see that actually someone tries to help me!

Anne-Marie
annma
mailto:a-m.mahfouf at lineone.net




-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org
with the following body:
unsubscribe »your-email-address«


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list