Recursive xgettext?

前端 未结 5 2017
故里飘歌
故里飘歌 2021-02-02 02:35

How can I compile a .po file using xgettext with PHP files with a single command recursively?

My PHP files exist in a hierarchy, and the straight xget

5条回答
  •  别跟我提以往
    2021-02-02 03:32

    This is the solution I found for recursive search on Mac:

    xgettext -o translations/messages.pot --keyword=gettext `find . -name "*.php"`
    

    Generates entries for all uses of method gettext in files whose extension is php, including subfolders and inserts them in translations/messages.pot .

提交回复
热议问题