Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improved the lint:xliff command#26682

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromjaviereguiluz:fix_26537
Mar 30, 2018
Merged

Conversation

@javiereguiluz
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#26537
LicenseMIT
Doc PR-

This is how it looks:

lint-xliff-output

ro0NL reacted with heart emoji
return$default($fileOrDirectory);
}

privatefunctiongetTargetLanguageFromFile($xliffContents)
Copy link
Contributor

Choose a reason for hiding this comment

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

privatefunctiongetTargetLanguageFromFile(\DOMDocument$xliffContents): ?string    {foreach ($xliffContents->getElementsByTagName('file')[0]->attributes ??array()as$attribute) {if ('target-language' ===$attribute->nodeName) {return$attribute->nodeValue;            }        }returnnull;    }

javiereguiluz reacted with thumbs up emoji
}

if (false ===$document->schemaValidate(__DIR__.'/../Resources/schemas/xliff-core-1.2-strict.xsd')) {
$errors[] =array_map(function ($error) {
Copy link
Member

Choose a reason for hiding this comment

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

are you sure about it ? This will add an array of errors a a single entry in$errors. This looks weird to me

Copy link
Member

Choose a reason for hiding this comment

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

btw, your new test does not seem to cover this code path

libxml_use_internal_errors(false);

returnarray('file' =>$file,'valid' =>false,'messages' =>$errorMessages);
returnarray('file' =>$file,'valid' =>empty($errors),'messages' =>$errors);
Copy link
Member

Choose a reason for hiding this comment

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

Can you avoid usingempty() here?

javiereguiluz reacted with thumbs up emoji
javiereguiluz added a commit to symfony/demo that referenced this pull requestMar 28, 2018
This PR was merged into the master branch.Discussion----------Fixed minor issues in the XLIFF filesSpotted thanks to the latest improvement of `lint:xliff`:symfony/symfony#26682Commits-------2020233 Fixed minor issues in the XLIFF files
*
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
*/
class XliffLintCommandTestextends TestCase
Copy link
Member

Choose a reason for hiding this comment

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

This test should go in the component, as the command is in the component (well, we may need to have 2 different tests). This should fix the deps=low build too, by having the test for the new feature in the same package than the feature itself.

@fabpot
Copy link
Member

Thank you@javiereguiluz.

@fabpotfabpot closed thisMar 30, 2018
@fabpotfabpot merged commit6bbcc45 intosymfony:masterMar 30, 2018
fabpot added a commit that referenced this pull requestMar 30, 2018
This PR was squashed before being merged into the 4.1-dev branch (closes#26682).Discussion----------Improved the lint:xliff command| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#26537| License       | MIT| Doc PR        | -This is how it looks:![lint-xliff-output](https://user-images.githubusercontent.com/73419/37958502-fd8732e0-31b0-11e8-8688-8644ca930daf.png)Commits-------6bbcc45 Improved the lint:xliff command
@fabpotfabpot mentioned this pull requestMay 7, 2018
sayjun0505 added a commit to sayjun0505/sym_proj that referenced this pull requestApr 16, 2023
This PR was merged into the master branch.Discussion----------Fixed minor issues in the XLIFF filesSpotted thanks to the latest improvement of `lint:xliff`:symfony/symfony#26682Commits-------2020233 Fixed minor issues in the XLIFF files
spider-yamet added a commit to spider-yamet/sym_proj that referenced this pull requestApr 16, 2023
This PR was merged into the master branch.Discussion----------Fixed minor issues in the XLIFF filesSpotted thanks to the latest improvement of `lint:xliff`:symfony/symfony#26682Commits-------2020233 Fixed minor issues in the XLIFF files
frederickboyd pushed a commit to frederickboyd/frederickboyd that referenced this pull requestMay 25, 2025
This PR was merged into the master branch.Discussion----------Fixed minor issues in the XLIFF filesSpotted thanks to the latest improvement of `lint:xliff`:symfony/symfony#26682Commits-------2020233 Fixed minor issues in the XLIFF files
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

+1 more reviewer

@stloydstloydstloyd requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

5 participants

@javiereguiluz@fabpot@stloyd@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp