Skip to content

[Translator] [Xliff] Add support for target attributes. #15452

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 14, 2015

Conversation

marcosdsanchez
Copy link
Contributor

The previous implementation ignored attributes in target nodes in xliff files
so they were lost when you loaded and then dumped the same file. This change
should fix that problem.

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

@marcosdsanchez marcosdsanchez changed the title [Translation] [Xliff] Add support for target attributes. [Translator] [Xliff] Add support for target attributes. Aug 4, 2015
*/
private function hasMetadataArrayInfo($key, $metadata = null)
{
return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is hard to read and understand IMO

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be on one line.

@OskarStark
Copy link
Contributor

Thanks for your work! 👍

ping @aitboudad

*
* @return array
*/
private function setNotesMetadata($noteElement = null, $encoding = null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function name is weird. It is not setting anything. It is reading attributes.

And the $noteElement argument should be typehinted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What name do you suggest? What about parseNotesMetadata or getNotesMetadata ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseNotesMetadata looks good to me.

The previous implementation ignored attributes in target nodes in xliff files
so they were lost when you load and then dump the same file. This change
should fix that problem.
@marcosdsanchez
Copy link
Contributor Author

Comments addressed.

@aitboudad
Copy link
Contributor

👍

Status: Reviewed

@fabpot
Copy link
Member

fabpot commented Aug 11, 2015

👍

@aitboudad
Copy link
Contributor

Thank you @marcosdsanchez.

@aitboudad aitboudad merged commit b913695 into symfony:2.8 Aug 14, 2015
aitboudad added a commit that referenced this pull request Aug 14, 2015
…. (marcosdsanchez)

This PR was merged into the 2.8 branch.

Discussion
----------

[Translator] [Xliff] Add support for target attributes.

The previous implementation ignored attributes in target nodes in xliff files
so they were lost when you loaded and then dumped the same file. This change
should fix that problem.

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

Commits
-------

b913695 Add support for target attributes.
@fabpot fabpot mentioned this pull request Nov 16, 2015
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.

7 participants