<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Maha,</FONT></DIV>
<DIV><FONT face=Arial size=2>   PO files are special formated txt 
files. You can read about the specific format at:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><A 
href="http://www.gnu.org/software/gettext/manual/html_node/gettext_9.html">http://www.gnu.org/software/gettext/manual/html_node/gettext_9.html</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The most important thin when you edit the files is 
the encoding. Ensure that UTF8 is the </FONT></DIV>
<DIV><FONT face=Arial size=2>encoding used. Also the line feed should not be DOS 
format line feed. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>So basically you can have the header part read all 
at once this includes all the stuff</FONT></DIV>
<DIV><FONT face=Arial size=2>about copyright and other comments.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>To give you insight about why PO files are special. 
Basically all programs extract strings</FONT></DIV>
<DIV><FONT face=Arial size=2>used within the program from that file. Depending 
on your languag, it will be able to pick</FONT></DIV>
<DIV><FONT face=Arial size=2>up the right translation. PO files is where the 
translators contribute translaiton, then final</FONT></DIV>
<DIV><FONT face=Arial size=2>format of the translation are the MO files. MO 
files get compiled with the final packaging,</FONT></DIV>
<DIV><FONT face=Arial size=2>hence you never see the PO file in a final 
package.  </FONT></DIV>
<DIV><FONT face=Arial size=2><BR>Sherif</FONT></DIV>
<DIV><BR></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV>Ok.. got another question.. what's the difference between .txt and .po .. 
  sure there is a difference.. but am thinking about how to deal parse and 
  rebuild PO file from java code.. we need to read po file each to update 
  the db..so we need to do some parsing work and understand how to read it..the 
  second time i need to deal with PO file when am populating the data backward 
  from the db into the files; modify the already existing file or create a new 
  one.. what if i did treat it as a text file that am looking for say "daemon" 
  take it with its translation, know if it's translation is fuzzy or not.. and 
  then populate the data into db table.  vice verse.. i want to create or 
  modify PO file.. I'll be looking for a keywords and change the text or a value 
  of a header.. that's it!! i guess so :)) </DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV> </DIV>
  <DIV>We have 3 significant data in PO file:</DIV>
  <DIV>    1- The original string and its translation; search on 
  <FONT size=2><STRONG>msgid</STRONG>&<FONT 
  size=2><STRONG>msgstr</STRONG> keywords</FONT></FONT></DIV>
  <DIV>    2- Knowing whether or not the string is fuzzy; by 
  searching on this "<FONT size=2><STRONG>#, fuzzy</STRONG></FONT>" in the 
  header of the current string am parsing on..</DIV>
  <DIV>    3- The file headers.. for example..at the top of samba 
  file you will see this section and it's existing in each po file:</DIV>
  <DIV><FONT size=2></FONT> </DIV>
  <DIV>
  <P># translation of system-config-samba.po to Arabic</P>
  <P># This file is distributed under the same license as the PACKAGE 
  package.</P>
  <P># Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.</P>
  <P><FONT color=#009900><STRONG># Ossama M. Khayat <<A 
  href="mailto:okhayat@yahoo.com">okhayat@yahoo.com</A>>, 
  2004.</STRONG></FONT></P>
  <P><FONT color=#009900><STRONG># Maha Helwa <<A 
  href="mailto:mahahelwa@gmx.net">mahahelwa@gmx.net</A>>, 
  2004.</STRONG></FONT></P>
  <P><FONT color=#009900><STRONG># Sherif Abdelgawad <<A 
  href="mailto:sherif@redhat.com">sherif@redhat.com</A>>, 
  2004.</STRONG></FONT></P>
  <P><FONT color=#009900><STRONG># Munzir Taha <<A 
  href="mailto:munzirtaha@newhorizons.com.sa">munzirtaha@newhorizons.com.sa</A>>, 
  2004</STRONG></FONT>.</P>
  <P>#</P>
  <P>msgid ""</P>
  <P>msgstr ""</P>
  <P>"Project-Id-Version: system-config-samba\n"</P>
  <P>"POT-Creation-Date: 2005-03-09 15:51+0100\n"</P>
  <P><STRONG><FONT color=#990000>"PO-Revision-Date: 2005-04-10 
  02:31-0800\n"</FONT></STRONG></P>
  <P><STRONG><FONT color=#990000>"Last-Translator: maha <<A 
  href="mailto:mahahelwa@gmx.net">mahahelwa@gmx.net</A>>\n"</FONT></STRONG></P>
  <P>"Language-Team: Arabic <<A 
  href="mailto:fedora-trans-ar@redhat.com">fedora-trans-ar@redhat.com</A>>\n"</P>
  <P>"MIME-Version: 1.0\n"</P>
  <P>"Content-Type: text/plain; charset=UTF-8\n"</P>
  <P>"Content-Transfer-Encoding: 8bit\n"</P>
  <P> </P>
  <DIV><FONT size=2>Only 3 values that are changeable by the time of checkin any 
  PO file:</FONT></DIV>
  <DIV><FONT size=2>> Add the name of the contributor at the end of 
  contributors list and update the value of "last translator" tag or whatever 
  it's called ..</FONT></DIV>
  <DIV><FONT size=2>></FONT><FONT size=2> Date of Revision.. i don't 
  think every checkin.. when this value is changed?</FONT></DIV>
  <DIV> </DIV>
  <DIV>So i want to know why i should not treat any PO file just as a 
  normal text file? is it about the encoding? well am not sure but i guess it 
  can be handled from the java side!! decided to read/write any part of PO 
  file with certain encoding "utf-8"? </DIV>
  <DIV> </DIV>
  <DIV> </DIV>
  <DIV>Yareet had yerod.. sherif..what do think?! shall i do it in this way?! 
  </DIV>
  <DIV>FYI.. i did not read the source of kbabel yet.. i get shocked when i 
  tried to look for a piece of code that reads the strings from PO file..which 
  is doing what?! i get lost and frustrated after this try.. i don't 
  remember C.. what a shame!! </DIV>
  <DIV> </DIV>
  <DIV>Maha.</DIV>
  <DIV> </DIV></DIV></BLOCKQUOTE></BODY></HTML>