gnuherds-app-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using POT files -- (PO Template)


From: Davi Leal
Subject: Re: Using POT files -- (PO Template)
Date: Fri, 15 Feb 2008 01:48:42 +0100
User-agent: KMail/1.9.7

Antenore Gatta wrote:
> maybe there is a smart(y) solution Fabian Thylmann wrote a pre-filter
> that should resolve the "variables" problems inside the {t} tags. You can
> see this at
> http://ft.typepad.com/fabian_thylmann/2006/09/smarty_gnu_gett.html

I do not understand that "variables" problems.  We can even do
  {t} {$data.CheckList[$i]} {/t}
and it works.
It translate the value of such  array.field[index]



I have tested the Fabian's PHP tools and it detects rightly the {t}{/t} tags, 
but not the below one, which we use too:
   {'sentence sentence sentence'|gettext|strip:' '}


IMHO it is just about the regular expression being used to detect the pattern. 
David Paleino did a very good approximation to the solution with the below 
modification of the smarty-gettext rip script:
  http://savannah.nongnu.org/task/download.php?file_id=11593
   Download from: http://savannah.nongnu.org/task/?6174


IMHO it does not mind what PHP script we use, the Fabian's one or the one 
included with smarty-gettext which is the base of the David's one too. The 
key is use the right regular expressions to match too the below pattern:
   {'sentence sentence sentence'|gettext|strip:' '}

I think David Paleino got his script almost ready. We should test it. If I 
have time I will test it this weekend.



Fabian Thylmann write:
> but using variable names will actually be easier than using %1 %2 %3 and
> so on as needed with smarty-gettext, since its more obvious for the
> translater what will actually be displayed in its place."

I disagree.  People who translate PO files are used to '%1'. Using '$var' or 
something similar could confuse them. IMHO %1 %2 %3 is the established 
standard.


--
Warning: I can be mistaken.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]