Given: debian10 + apache2 + gettext package installed. Having a .php file with some php+html code. I try ot use xgettext to grab the strings for translation from this .php file and save them into .pot file. From the instruction (https://www.systutorials.com/docs/linux/man/1-xgettext/):
xgettext testfile.php -o locale/pot/testfile.pot
The "locale" folder and "testfile.php" file are in the same directory. Also "locale/pot" folder is 777 writable, also "testfile.php" is 777 too. When i run from shell (from root) the command, mentioned above, there is no testfile.pot generated. I also tried adding the --debug option, but no information/no errors in shell. What can be the reason?
UPD: i have just also tried:
xgettext testfile.php -o locale/pot/testfile.pot --debug --force-po
and with --force-po it creates a file "testfile.pot" but without strings for translation - only template with content:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-08-06 14:51+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
So still no luck...