Mini-howto : to make Germany, French and Spanish message files 23th July, 2004 Yutaka Yasuda, Cobalt Users Group. This short document tells you how to make Blue Quartz message file from another language which is already exist inside Cobalt source. Cobalt has 5 language message files initialy. English, Japanese, Germany, Spanish and French. But it is not suitable for Blue Quartz system as is because it includes some hardware specific description. And Sun/Cobalt trademark words are also included. If you know about Cobalt interface, function and that language, you can make valid message files from original Cobalt message files. Enlighs and Japanese message files had been done. Which is the next? 1. Updating *.po files 1.0 fetch *.po files first. Get the recent code tree through CVS. See howto; http://bluequartz.org/source/#cvs (branch name is "DEV_OpenRaQ" and module name is "ui".) 1.1 prepare updating. (I did, but if you don't need, skip this section.) Then I recommend you to gather po files into one directory. for example of french case; % mkdir org_pofiles_fr % mkdir upd_pofiles_fr % find cvs_directory/ui/ -name '*.po' | grep '/fr/' | \ awk '{printf "cp -p %s org_pofiles_fr/\n",$0}' You will get the script to gather all po-files. It is better to check before do execute above script, you make sure the duplication of basename of all files. for example; % find cvs_directory/ui/ -name '*.po' | grep '/fr/' | \ sed -e 's:^.*/::' | sort | uniq -c | sort -n If the duplication is exists, you can find count value '2' in the bottom of the output lists. All '1' means there is no overlap. 1.2 do check then replace/rewrite po files. Check and edit French message to suitable expression. And save it in upd_pofiles_fr directory. English po files will help you when you cannot decide how translate the expression. (To make it easier, I also made org_pofiles_en directory and gather English po files.) I recommend to check or compile for miseditting as follows; % msgfmt -c upd_pofiles_fr/product.po 2. Post check. To make sure another Sun/Cobalt string does not remain in all pofiles. For example, I did; % mkdir /tmp/zz % cp org_pofiles_en2/* /tmp/zz % cp upd_pofiles_en2/* /tmp/zz % egrep -H -i "sun|cobalt" /tmp/zz/*.po And msgid duplication check is also recommended. If 2 or more same msgids are exists, the build procedure will fail. (Current msgfmt command is severe more than old version.) I use doublecheck.sh script as follows; (sorry, I love tcsh and awk!) --------------- doublecheck.sh # cat $1 | tr -d '\015' | awk -F'"' '/^msgid/{print $2}' | sort > /tmp/l1 cat $1 | tr -d '\015' | awk -F'"' '/^msgid/{print $2}' | sort -u > /tmp/l2 set l1=`wc -l < /tmp/l1` set l2=`wc -l < /tmp/l2` if ( $l1 == $l2 ) then exit endif echo "========== double msgid on" $1 diff /tmp/l1 /tmp/l2 exit -------------------------- For example, % tcsh ./doublecheck.sh upd_pofiles_fr/alpine.po If msgids has duplication, it will be listed up. --- 3. Send your po-files to us. Please send the result of your work to us. usersgroup@cobaltqube.org Thanks in advance.