From kde-i18n-doc Tue Mar 14 16:21:42 2000 From: Claudiu Costin Date: Tue, 14 Mar 2000 16:21:42 +0000 To: kde-i18n-doc Subject: MINI-HOWTO: Testing your PO-files from your local CVS repositorie X-MARC-Message: https://marc.info/?l=kde-i18n-doc&m=95305636723498 SUPER-MINI-HOWTO Install & test PO files from your local CVS repositories Abstract: This is intended for translators who have CVS access to "kde-i18n" and don't want to download a prepackaged tar.bz2 to "steal" installing Makefiles. Also, this will leave clean your repositories from generated "Makefiles". Bellow settings will speed up translate,-try-and-fix process for you translating work. A) Prerequisites: You need to have a "mc" (Midnight Commander). We will use this beautifully shell program to speed up our actions. GNU gettext must be installed. Kbabel is a cake for most of us who need powerfully search capabilities and a very intuitive Catalog Manager. However you can keep your emacs or vi running if you not plan to write directly in UTF8 encoding. You must have $KDEDIR environment variable set to your KDE2 directory. B) Preparing your locale directory: By default, ${KDEDIR}/share/locale/ contain "C" and "l10n" subdirs. You need to make or symlink your language dir. For Romanian I make: ln -s l10n/ro ro Replace "ro" with your language. To tell klocale what charset you use for MO files create a charset file: echo iso-8859-2 > ${KDEDIR}/share/locale/ro/charset In above command you need 2 replacement. 1) iso-8859-2 must be replaced by your language encoding (e.g. for Greek you need iso-8859-7) 2) "ro" must be replaced by your language (e.g. "el", "hu", "ch") C) Setting up Midnight Commander: Now we will ad some shortcuts to your personal menu (executed by pressing F2). Edit "~/.mc/menu" file from your personal directory. If you not have one, just run: cp /usr/lib/mc/mc.menu ~/.mc/menu Now insert below lines in top of your "menu" file: ------ cut here ------- cut here -------- cut here ------ = f \.po$ & t r 1 ******** Show statistics about PO file msgfmt --statistics %f rm -f messages = f \.po$ & t r 2 ******** Compile and install PO file baza=`basename %f .po` msgfmt -o ${baza}.mo %f cp -f ${baza}.mo ${KDEDIR}/share/locale/ro/LC_MESSAGES/ rm -f ${baza}.mo ------ cut here ------- cut here -------- cut here ------ NOTE: Replace "ro" in "${KDEDIR}/share/locale/ro/LC_MESSAGES/" with your language OK. Above things will bring you two new commands for use in mc. Let's try them. Move your selections bar on one PO-file and press "F2", then press "1". Well, now press "Ctrl+o" and you will see statistics for that file. Easy isn't? Let install it. Press "F2" and then "2". You need to have write permission in ${KDEDIR}/share/locale/(your_lang)/LC_MESSAGES/. D) Making localizations to work Step 1: Changing your ".bash_profile" echo LAN=ro > ~/.bash_profile where "ro" is replaced as I explained above. Step 2: Setting KDE2.0prealpha Start KDE2.0 and then open "kcontrol". In "Desktop->Language" section set all items to your language. Step 3: Installing "kdelibs.mo" The "secret" action to enable your apps display strings in your language is to install "kdelibs.mo". Without this file nothing happen. To install, run this in your locale CVS directory where kdelibs.po reside: msgfmt -o kdelibs.mo kdelibs.po cp -f kdelibs.mo ${KDEDIR}/share/locale/ro/LC_MESSAGES/ rm -f kdelibs.mo Do not forget to replace "ro" string! E) Epilog Finishing above settings will enable you to add MO files and test it. Will be great to read "Translation-HOWTO" write by Thomas Diehl. It's a shame for me, but I don't read it beacause of time. Altough, I've started to translate it. It's good to make this for your translation team. Please have a look to http://i18.kde.org/ Fell free to make comments. I hope you are happy with this MINI-HOWTO. kind regards, -- o-------------------------------------------o Claudiu COSTIN claudiuc@interplus.ro sysad ADComm.pub.ro claudiuc@geocities.com Linux-KDE Romania http://www.ro.kde.org Home page http://lion.ADComm.pub.ro/~claudiuc