-
Notifications
You must be signed in to change notification settings - Fork 293
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
Xliff attributes rebased #356
Conversation
Nyholm
commented
May 7, 2016
Q | A |
---|---|
Bug fix? | yes |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | Same as #328 but with extra fixes |
License | MIT |
- Configured loader for xlf to be the same as for xliff. - Added XliffMessage to store: * note-elements (children of trans-unit) * attribute trans-unit('approved') * attribute target('state'). - Added I/O passthrough of existing input, e.g. XliffMessage, in Updater.php. - Modifications to XliffLoader and XliffDumper to use XliffMessage. - Added tests.
} | ||
} else { | ||
$m->addNote((string) $trans->note, isset($trans->note['from']) ? ((string) $trans->note['from']) : 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.
why the test for the count? who cares if its 1 or more? Why not just foreach on $trans->note regardless of 1 or more?
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.
I think, what we actually is testing is is_array($this->note)
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.
so if they are testing is_array... but then else the block of code both does a cast to string, and an isset on the from. Which makes this part a bit confusing. If this is legitimately the best way to do what it is doing some inline comments would surely help future devs understand it better
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.
I've tested it now. It is the best way of doing it. I have added a comment about it.
Thanks for all the hard work |