Bate Raiko написа:
Единственото по-хубаво нещо от един клян са...два кляна!

Poedit + Smarty = Headache

От: 25 февруари, 2010 | Къде: DevNull | Тагове: , , , , | няма коментари »

    What you need to make Poedit parse your smarty template files?
    This is a short how-to for Mac OS X, tested on 10.6.2.

    Smarty-gettext is your friend, all you have to do is:

    1. Extract smarty-gettext archive to a folder
    2. Open Terminal.app from Utilities folder :)
    3. Execute this command

    chmod +x /path/to/smarty-gettext/tsmarty2c.php

    4. Open Poedit.app
    5. Go to preferences (Parsers tab) and add new parser
    6. Put the following code as a „Parser command“

    sh -c ‘php /path/to/smarty-gettext/tsmarty2c.php %F | /Applications/Poedit.app/Contents/MacOS/xgettext –force-po -o %o %K %C -LC –add-comments –no-location -’

    Your new parser could look like mine:



    Коментирай