
Envoyé par
N_BaH
c'est l'option
-f - qui ne permet pas de créer le fichier de sortie.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| $ ls
test.phtml
$ cat ./test.phtml
<? echo _g('Bonjour'); ?>
$ xgettext -f - --add-comments=/ -L PHP --keyword=_g --from-code=UTF-8 -o - > test.po
./test.phtml
^D
$ cat ./test.po
# 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: 2014-04-16 12:21+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: test.phtml:1
msgid "Bonjour"
msgstr ""
$ |
Merci pour la réponse, je viens d'essayer mais même chose peut-etre que je me trompe quelque part dans ma ligne ?
xgettext -f - --add-comments=/ -L PHP --keyword=_g --from-code=UTF-8 -o paht/locale/es_ES/LC_MESSAGES/trad.po
Voici l'arborescence de mes sources :
cd : project/locale/en_ES/LC_MESSAGE
J’exécute depuis project xgettext sachant que mes fichier qui contiennent la fonction _g se trouvent ici :
profil, message
dans le répertoire profil on y trouve profil.phtml et dans message message.phtml
Partager