Skip to content

Commit 9d6f736

Browse files
Apply suggestions from code review
Co-authored-by: Simon André <smn.andre@gmail.com>
1 parent d66804a commit 9d6f736

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Translator/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ For a better developer experience, TypeScript types definitions are also generat
7171
Then, you will be able to import those JavaScript translations in your assets.
7272
Don't worry about your final bundle size, only the translations you use will be included in your final bundle, thanks to the `tree shaking <https://webpack.js.org/guides/tree-shaking/>`_.
7373

74-
Configuring the dumped translations
74+
Restrict the translation domains
7575
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7676

77-
By default, all your translations will be dumped as JavaScript. You can restrict the dumped translations by either
77+
By default, all your translations will be exported. You can restrict the dumped messages by either
7878
including or excluding translation domains in your ``config/packages/ux_translator.yaml`` file:
7979

8080
.. code-block:: yaml

src/Translator/src/DependencyInjection/UxTranslatorExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public function load(array $configs, ContainerBuilder $container)
3838
$dumperDefinition = $container->getDefinition('ux.translator.translations_dumper');
3939
$dumperDefinition->setArgument(0, $config['dump_directory']);
4040

41-
if (0 !== \count($config['excluded_domains'])) {
41+
if ($config['excluded_domains']) {
4242
$dumperDefinition->addMethodCall('setExcludedDomains', [$config['excluded_domains']]);
4343
}
44-
if (0 !== \count($config['included_domains'])) {
44+
if ($config['included_domains']) {
4545
$dumperDefinition->addMethodCall('setIncludedDomains', [$config['included_domains']]);
4646
}
4747
}

0 commit comments

Comments
 (0)