Open webberig opened 9 years ago
Thank you for reporting this. This issue is very old, do you have the same problem with the latest release?
I just upgraded a project from Symfony 2.7 (via 2.8) to Symfony 3.0 and got the same error when upgrading and manually executing bin/console cache:clear. I have jms/translation-bundle 1.2.1 installed (on PHP 5.6.18) ...
IIRC I also had this issue before (in Symfony 2.7, prod environment), but then it was due to the fact that I had "jms/translation-bundle" as a dev requirement. Now it's in require, but still no luck. I can regenerate the XLIFFs using the JMS CLI commands without any error, but they can't be used by Symfony apparently. Reverted back to Symfony 2.8 hoping that that one still works. If I can find the time I'll try to look into it.
Try with dev-master instead of 1.2.1. Also be aware of #332
Also having errors with the dev-master.
[Symfony\Component\Translation\Exception\InvalidResourceException]
Invalid resource provided: "1.2"; Errors: [ERROR 1845] Element '{urn:jms:translation}reference-file': No matching global element
declaration available, but demanded by the strict wildcard. (in /var/www/ - line 18, column 0)
[ERROR 1845] Element '{urn:jms:translation}reference-file': No matching global element declaration available, but demanded by th
e strict wildcard. (in /var/www/ - line 23, column 0)
[ERROR 1845] Element '{urn:jms:translation}reference-file': No matching global element declaration available, but demanded by th
e strict wildcard. (in /var/www/ - line 24, column 0)
[ERROR 1845] Element '{urn:jms:translation}reference-file': No matching global element declaration available, but demanded by th
e strict wildcard. (in /var/www/ - line 25, column 0)
I'm also suffering from this exact same error when upgrading from Symfony 2.3 to 2.8.
To be honest, I do not really know where this comes from exactly. Anybody got some pointers?
Mmm, found it. I have three different kernels, sharing one same bundle. This bundle has JMSTranslationBundle generated XLIFF files. But only one of my kernels loaded the JMSTranslationBundle.
In these other two kernels, the default Symfony2 XLIFF loader complains (as @webberig mentioned) because there are XSD validation errors. That is because the urn:jms:translation
namespace is not default.
I fixed it by also loading the JMSTranslationBundle for these other two kernels, so that JMSTranslationBundle's XLIFF loader was also used in these kernels.
Hi,
I used this bundle to extract translations and write them to an xliff file. When I validate the file against the Xliff 1.2 XSD schema, I get a lot of errors:
This is the XSD I'm using for validation: http://docs.oasis-open.org/xliff/v1.2/cs02/xliff-core-1.2-strict.xsd
This problem also occurs when I'm using the Symfony XliffLoader, it throws the same errors because it seems to validate against the XSD as well...