Question

I am using gettext for a large PHP project. I have successfully setup everything, entered a few translations (in two languages) to test if translations work and started coding. From time to time I even updated the translations using poEdit.

Now, for no apparent reason, I am getting this error in poEdit when I try to update catalog from sources:

Updating the catalog failed. Click on 'More>>' for details.

When I click Details >>, I get detailed message:

08:52:19: Entries in the catalog are probably incorrect.
08:52:19: Updating the catalog failed. Click on 'More>>' for details.

Following advice on Internet I tried changing paths (base path and project paths), but to no avail (nothing changes). Note that it does not say anything about not finding sources - just that it failed. I have also validated both .po files:

msgfmt -o /dev/null -v -c messages.po

I am running poEdit 1.4.2-5 (on Debian).

Any ideas how I could get a detailed error info? (or get rid of the problem? ;)

Was it helpful?

Solution

I finally solved the issue by running:

find /path/to/project/ -name '*.php' -exec xgettext --from-code=UTF-8 -o messages.pot '{}' ';'

Then I fixed the error messages (permission denied to read a subdirectory) and everything works again. Hope it helps someone.

OTHER TIPS

I'm using PoEdit on Mac and had the same issue. Just fixed it by excluding all JS files. In my case, some minified js files cause the error. Just excluded and here we go.. it works. Maybe it will help.

After getting the same error I checked out the previous version of the .pot file from my git repo and used it when I updated the catalog.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top