<!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.6000.16890" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Well, before adventured myself, helping Lazarus
with translations, i did some research about how things were done in this
matter.<BR>Seems that majority used this method, so i followed it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Some considerations:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>- Using "i18n option enabled" you have two
different behavior of IDE automatic language generation:<BR> 1)
Projects: IDE generated .po file with projectīs name, which concentrates all
resources from all files in project.<BR> 2) Packages: For every form
in package, a correspondent file (.lrt) is generated and a correspondent file
(.po) file is generated.
<BR>
This could end with a bunch of files in language directory, each one requiring
translation. Example: If a package generates 4 language files, for each
<BR>
language you got 4 files. So if you have 10 supported
languages.....</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>- Concentrate all resources in one .pas file gives
you more centralized control over that strings. This is not the case with
"i18n", since IDE can generate resources from<BR> .pas where they are
declared. So you know that that string exists, but you will need to do a search
in files to locate it. This is more simply to do in one file.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>- I tought that having one method in mind is better
than having to remember that for projects i need to do one way, and with
packages another way.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Maybe itīs a good opportunity to discuss some
standards about this matter. There is a lot to do in this field. Reach a common
sense may avoid big headaches in future.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Marcelo.<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>>Marcelo Borges de Paula
пишет:<BR>>></FONT><FONT face=Arial><FONT size=2><I>
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> Hello
again,<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I>
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> The right files
was lazdatadeskstr.*. It was generated from <BR></I>>></FONT></FONT><FONT
face=Arial><FONT size=2><EM> lazdatadeskstr.rst.<BR>></EM><BR>>If you look
inside new PO files you will see that resource strings are <BR>>still there,
though these files are bigger then they need to be (some <BR>>extra strings
seem to be taken from LRT file).<BR>><BR>>></FONT></FONT><FONT
face=Arial><FONT size=2><I> When "i18n option" is enabled, IDE creates
correspodent language files <BR></I>>></FONT></FONT><FONT face=Arial><FONT
size=2><I> with project name in target language directory. Similar to what
happens <BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> with
package, the resources are generated from all files in
project.<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> In this
case, all resource strings was moved in recent updated to
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I>
"lazdatadeskstr.pas". So any improvements may alter this file to include
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><EM> new
resources.<BR>></EM><BR>>New resources still can be included to
lazdatadeskstr.pas and PO files <BR>>will be updated correctly with
them.<BR>><BR>>></FONT></FONT><FONT face=Arial><FONT size=2><I> After
that, the developer must use tool "updatepofiles" to update
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> existent .po
files from lazdatadeskstr.rst. With this method no files
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> are generated
automatically (.po or .lrt), and there is no need to
<BR></I>>></FONT></FONT><FONT face=Arial><FONT size=2><I> mantain the
"i18n option" enabled.<BR></I>>></FONT></FONT><FONT face=Arial><FONT
size=2><EM> Take a look in "localize.bat" or "localize.sh" in Lazarus
root.<BR>></EM><BR>>You don't need to do extra steps to update
localization now, what's <BR>>wrong with
this?<BR><BR></FONT></FONT></DIV></BODY></HTML>