I have created this xgettext command line for my project, it can be used by you as an example:
xgettext --files-from=source_files_list.txt --from-code=UTF-8 -L PHP -o mvap.po -d mvap -p languages --keyword=__:1 --keyword=_e:1 --keyword=_x:1,2c --keyword=_n:1,2 --keyword=_nx:1,2,4c --keyword=_n_noop:1,2 --keyword=_nx_noop:1,2,3c --keyword=_ex:1,2c --keyword=esc_html_e:1 --keyword=esc_html__:1
In this example the source_files_list.txt should be a text file containing the name of the files to be analyzed by xgettext separated by new lines.
the "--keyword=..." options are for recognizing the good functions used for translating strings (in this functions there are all wordpress translation functions I found)
it outputs "mvap.po" in the "./languages" folder with domain "mvap"