Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation] added <tool> element metadata to XliffFileDumper #15551

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

Merged
merged 1 commit into from
Sep 1, 2015

Conversation

aitboudad
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #15190
License MIT
Doc PR ~

@@ -36,6 +48,10 @@ public function dump(MessageCatalogue $messages, $options = array())
$this->defaultLocale = \Locale::getDefault();
}

if (array_key_exists('tool_info', $options)) {
$this->toolInfo = array_merge($this->toolInfo, $options['tool_info']);
Copy link
Member

Choose a reason for hiding this comment

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

this is not a good idea. You should not change the state of the dumper as it will affect subsequent dumps too

Copy link
Member

Choose a reason for hiding this comment

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

btw, this is precisely the reason why we introduced the new formatCatalogue method to be able to access options while dumping (see the YamlFileDumper)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed and thank you :)

@aitboudad aitboudad force-pushed the ticket_15190 branch 4 times, most recently from a811026 to de5fa4e Compare August 14, 2015 15:40
{
$defaultLocale = \Locale::getDefault();
Copy link
Member

Choose a reason for hiding this comment

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

I would avoid doing that call when the default locale is specified. It will avoid the dependency on Intl (or the stub) when you specify the default locale explicitly). The old code was supporting this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@aitboudad
Copy link
Contributor Author

ping @symfony/deciders

@nicolas-grekas
Copy link
Member

👍

2 similar comments
@xabbuh
Copy link
Member

xabbuh commented Aug 31, 2015

👍

@dunglas
Copy link
Member

dunglas commented Sep 1, 2015

👍

@fabpot
Copy link
Member

fabpot commented Sep 1, 2015

Thank you @aitboudad.

@fabpot fabpot merged commit f667a34 into symfony:2.8 Sep 1, 2015
fabpot added a commit that referenced this pull request Sep 1, 2015
…leDumper (aitboudad)

This PR was merged into the 2.8 branch.

Discussion
----------

[Translation] added <tool> element metadata to XliffFileDumper

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

Commits
-------

f667a34 [Translation] added <tool> element metadata to XliffFileDumper
@aitboudad aitboudad deleted the ticket_15190 branch September 1, 2015 10:14
@fabpot fabpot mentioned this pull request Nov 16, 2015
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.

7 participants