Skip to content

Commit

Permalink
bug #28152 [Translation] fix perf of lint:xliff command (nicolas-grekas)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.1 branch.

Discussion
----------

[Translation] fix perf of lint:xliff command

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27564
| License       | MIT
| Doc PR        | -

#27653 has been merged on master as an improvement, but the perf issue is a killer.
Our CI spends 1 minutes on just a few translation test cases.
Only 4.1 has this behavior. That's a bug.

Commits
-------

02c69b1 [Translation] fix perf of lint:xliff command
  • Loading branch information
nicolas-grekas committed Aug 8, 2018
2 parents 6b413ab + 02c69b1 commit 9fae8f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ private function validate($content, $file = null)
$document->schemaValidate(__DIR__.'/../Resources/schemas/xliff-core-1.2-strict.xsd');
foreach (libxml_get_errors() as $xmlError) {
$errors[] = array(
'line' => $xmlError->line,
'column' => $xmlError->column,
'message' => trim($xmlError->message),
);
'line' => $xmlError->line,
'column' => $xmlError->column,
'message' => trim($xmlError->message),
);
}

libxml_clear_errors();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Jan-10-2006
-->
<xsd:schema xmlns:xlf="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:xliff:document:1.2" xml:lang="en">
<!-- Import for xml:lang and xml:space -->
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../../Loader/schema/dic/xliff-core/xml.xsd"/>
<!-- Attributes Lists -->
<xsd:simpleType name="XTend">
<xsd:restriction base="xsd:string">
Expand Down

0 comments on commit 9fae8f4

Please sign in to comment.