[poedit-users] Poedit and smarty parser

Vasóczki Ferenc <[email protected]> Thu, 17 Mar 2011 17:17:38 +0100
Newsgroups gmane.editors.poedit.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--===============7279854861778707400==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0078_01CBE4C7.385DD750"
Content-Language: hu

This is a multi-part message in MIME format.

------=_NextPart_000_0078_01CBE4C7.385DD750
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Hello Guys!

=20

I am new on this list, and i am looking for a solution since 2 days ago.

=20

I have a project, where i am using smarty templates.

My main problem is, i can not get out the texts should be translate from
.tpl files.

=20

What i did:

I created a new parser as Smarty templates. I am running a win7 box.

=20

The Parser command is:

"php D:\Apache\htdocs\helpdesk\smarty-gettext-0.9.1\tsmarty2c.php %F |
D:\Program Files\Poedit\bin\xgettext -LC --add-comments --no-location -"

=20

without quotes.

=20

This is for all the tpl files.

=20

Keyword list: -k%k

Input files list: %f

Source code: --from-code=3D%c

=20

The source locations are ok (php parser does the job).

=20

Ok, i thought, maybe my smarty gettext script doesnt work.

=20

So i checked it out from CMD:

=20

D:\Apache\htdocs\helpdesk\templates>php
D:\Apache\htdocs\helpdesk\smarty-gettext-0.9.1\tsmarty2c.php
D:\apache\htdocs\helpdesk\templates\viewticket.tpl

=20

Result:

gettext("My test");

=20

So it should be arrive to the xgettext.exe

=20

But my cataloge doesn't updatet, and this is a brand new catalog.

In the keywords, there are the gettext, ngettext, _gettext.

=20

What am i doing wrong?

Vas=F3

=20


------=_NextPart_000_0078_01CBE4C7.385DD750
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2"><meta name=3DGenerator content=3D"Microsoft Word =
12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DHU link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hello =
Guys!<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>I am new on this list, and i am looking for a solution =
since 2 days ago.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I have a =
project, where i am using smarty templates.<o:p></o:p></p><p =
class=3DMsoNormal>My main problem is, i can not get out the texts should =
be translate from .tpl files.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>What i =
did:<br><br>I created a new parser as Smarty templates. I am running a =
win7 box.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>The Parser command is:<o:p></o:p></p><p =
class=3DMsoNormal>&quot;php =
D:\Apache\htdocs\helpdesk\smarty-gettext-0.9.1\tsmarty2c.php %F | =
D:\Program Files\Poedit\bin\xgettext -LC --add-comments --no-location =
-&quot;<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>without quotes.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>This is for =
all the tpl files.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Keyword =
list: -k%k<o:p></o:p></p><p class=3DMsoNormal>Input files list: =
%f<o:p></o:p></p><p class=3DMsoNormal>Source code: =
--from-code=3D%c<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>The source =
locations are ok (php parser does the job).<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Ok, i =
thought, maybe my smarty gettext script doesnt work.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>So i checked =
it out from CMD:<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>D:\Apache\htdocs\helpdesk\templates&gt;php =
D:\Apache\htdocs\helpdesk\smarty-gettext-0.9.1\tsmarty2c.php =
D:\apache\htdocs\helpdesk\templates\viewticket.tpl<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>Result:<o:p></o:p></p><p =
class=3DMsoNormal>gettext(&quot;My test&quot;);<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>So it should =
be arrive to the xgettext.exe<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>But my =
cataloge doesn't updatet, and this is a brand new =
catalog.<o:p></o:p></p><p class=3DMsoNormal>In the keywords, there are =
the gettext, ngettext, _gettext.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>What am i =
doing wrong?<o:p></o:p></p><p class=3DMsoNormal> <o:p></o:p></p><p =
class=3DMsoNormal>Vas=F3<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div></body></html>
------=_NextPart_000_0078_01CBE4C7.385DD750--



--===============7279854861778707400==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
--===============7279854861778707400==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users

--===============7279854861778707400==--