8000 Validate XLIFF translation files by javiereguiluz · Pull Request #17903 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Validate XLIFF translation files #17903

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

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Another minor refactor
  • Loading branch information
javiereguiluz committed Feb 23, 2016
commit 93861ac211e9304355852645e12944be9aafa7d8
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ class TranslationFilesTest extends \PHPUnit_Framework_TestCase
{
public function testXlfFilesAreValid()
{
libxml_use_internal_errors(true);

$translationFiles = glob(__DIR__.'/../../Resources/translations/*.xlf');
foreach ($translationFiles as $filePath) {
Copy link
Member

Choose a reason for hiding this comment

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

in fact, would be much better with a data collector provider

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand this suggestion.

Copy link
Member

Choose a reason for hiding this comment

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

I think he meant a data provider, not a data collector. And this is indeed a good idea as a failure in a file would not prevent validating subsequent files (as they would be separate tests)

libxml_use_internal_errors(true);
libxml_clear_errors();
simplexml_load_file($filePath);
$errors = libxml_get_errors();
Expand Down
0