-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
*/ | ||
private function hasMetadataArrayInfo($key, $metadata = null) | ||
{ | ||
return |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Thanks for your work! 👍 ping @aitboudad |
* | ||
* @return array | ||
*/ | ||
private function setNotesMetadata($noteElement = null, $encoding = null) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
7d97c1b
to
b913695
Compare
Comments addressed. |
👍 Status: Reviewed |
👍 |
Thank you @marcosdsanchez. |
…. (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.
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.