0

I configured Poedit (1.8.7 on OS X 10.11) according to this answer, but get the this message:

"warning: file 'xyz.xml' extension 'xml' is unknown, will try C"

But my configuration is as follows:

enter image description here

What am I doing wrong?

Community
  • 1
  • 1
Sherlock
  • 7,525
  • 6
  • 38
  • 79

1 Answers1

2

First of all, it’s a terribly misguided idea to use the Glade extractor to extract anything other than Glade files — your custom XML file isn’t.

I’m guessing that this particular error is a side-effect of changes in gettext-0.19.7 that introduced support for custom XML files via ITS rules and implemented Glade support in terms of it. I think (but again, am not sure) that it simply ignores the -L flag in this case.

The best way to do this is to

  1. Add a custom extractor with your extension, specifying standard gettext invocation, without the -L glade lie.
  2. Write ITS rules for your file format.
  3. Put them in the location of other .its and .loc files in Poedit’s installation.
Václav Slavík
  • 6,445
  • 2
  • 28
  • 25
  • The xml (xhtml) files we use in our application have a one-on-one link to a PHP file; each xml file is managed by a PHP file. I wrote a custom syntax handler for gettext translations like this:

    {\_translated text\_}

    . Our framework reads that and hands it over to the gettext php function. As I understand it now, I do not need ITS files in that case. I just need to add a custom extractor for these xml files. Is that correct?
    – Sherlock May 18 '16 at 13:20