Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation][Xliff Loader] Support omitting the <target> node in an .xlf file. #15611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2015

Conversation

aitboudad
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

This is a cherry pick of #15604 on 2.3

@aitboudad
Copy link
Contributor Author

Thank you @leofeyer

@aitboudad aitboudad merged commit 3dcda1a into symfony:2.3 Aug 25, 2015
aitboudad added a commit that referenced this pull request Aug 25, 2015
…node in an .xlf file. (leofeyer)

This PR was merged into the 2.3 branch.

Discussion
----------

[Translation][Xliff Loader] Support omitting the <target> node in an .xlf file.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This is a cherry pick of #15604 on 2.3

Commits
-------

3dcda1a Support omitting the <target> node in an .xlf file.
@aitboudad aitboudad deleted the xliff-without-target branch August 25, 2015 12:47
aitboudad added a commit that referenced this pull request Aug 26, 2015
…r (stof)

This PR was merged into the 2.3 branch.

Discussion
----------

[Translation] Fix the string casting in the XliffFileLoader

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

#15611 broke the usage of Xliff translation files (and so all Symfony projects as they are used in core) because it stores SimpleXmlElement instances in the MessageCatalogue, which breaks when loading the cache:

```
PHP Fatal error:  Call to undefined method SimpleXMLElement::__set_state() in .../app/cache/test/translations/catalogue.en.1cd7e874b24ab41081c7781e4161053bf515fc91.php on line 9
```

this is how the cache looks like (truncated a lot of course):

```php

$catalogue = new MessageCatalogue('en', array (
  'validators' =>
  array (
    'This value should be false.' =>
    SimpleXMLElement::__set_state(array(
       0 => 'This value should be false.',
    )),
  ),
));
```

This is a critical bug in the 2.3 and 2.7 branches

Commits
-------

b856f62 [Translation] Fix the string casting in the XliffFileLoader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants