Skip to content
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

Merged
merged 5 commits into from
Jun 8, 2016
Merged

Conversation

Nyholm
Copy link
Collaborator

@Nyholm 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

peetersdiet and others added 4 commits May 7, 2016 19:44
- 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.
@Nyholm Nyholm mentioned this pull request May 7, 2016
1 task
}
} else {
$m->addNote((string) $trans->note, isset($trans->note['from']) ? ((string) $trans->note['from']) : null);
}
Copy link
Collaborator

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?

Copy link
Collaborator Author

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)

Copy link
Collaborator

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

Copy link
Collaborator Author

@Nyholm Nyholm Jun 1, 2016

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.

@gnat42 gnat42 merged commit 5a05647 into schmittjoh:master Jun 8, 2016
@gnat42
Copy link
Collaborator

gnat42 commented Jun 8, 2016

Thanks for all the hard work

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.

4 participants