-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
aitboudad
commented
Aug 14, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #15190 |
License | MIT |
Doc PR | ~ |
af5cfcf
to
9a15228
Compare
@@ -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']); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and thank you :)
a811026
to
de5fa4e
Compare
{ | ||
$defaultLocale = \Locale::getDefault(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
de5fa4e
to
70eac8c
Compare
70eac8c
to
135233e
Compare
ping @symfony/deciders |
135233e
to
f667a34
Compare
👍 |
2 similar comments
👍 |
👍 |
Thank you @aitboudad. |
…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