diff --git a/EMS/admin-ui-bundle/src/Resources/translations/elements+intl-icu.en.xlf b/EMS/admin-ui-bundle/src/Resources/translations/elements+intl-icu.en.xlf
index 78402ee53..2c0fc38a0 100644
--- a/EMS/admin-ui-bundle/src/Resources/translations/elements+intl-icu.en.xlf
+++ b/EMS/admin-ui-bundle/src/Resources/translations/elements+intl-icu.en.xlf
@@ -5,62 +5,46 @@
-
-
- Anonymous User
-
-
-
- Search
-
-
-
- Search
-
-
-
- Search
-
-
-
- Show search form
-
-
-
- Search
-
-
-
- Close
-
-
-
- Toggle fullscreen
-
-
-
- Toggle sidebar
-
-
-
- Push menu
-
Green, systems are working as expected
-
-
- Yellow, systems are indexing documents. This status can't stay like this forever.
-
Red, systems are facing issues. Please contact your system administrator.
+
+
+ Yellow, systems are indexing documents. This status can't stay like this forever.
+
Anonymous user
+
+
+ Hide
+
+
+
+ Show
+
+
+
+ Search
+
+
+
+ Search
+
+
+
+ Search
+
+
+
+ Anonymous User
+
Error
@@ -73,13 +57,29 @@
Warning
-
-
- Hide
+
+
+ Toggle sidebar
-
-
- Show
+
+
+ Toggle fullscreen
+
+
+
+ Push menu
+
+
+
+ Close
+
+
+
+ Show search form
+
+
+
+ Search
diff --git a/EMS/admin-ui-bundle/src/Resources/translations/notification+intl-icu.en.xlf b/EMS/admin-ui-bundle/src/Resources/translations/notification+intl-icu.en.xlf
index 1b353088f..9f760c04b 100644
--- a/EMS/admin-ui-bundle/src/Resources/translations/notification+intl-icu.en.xlf
+++ b/EMS/admin-ui-bundle/src/Resources/translations/notification+intl-icu.en.xlf
@@ -5,14 +5,14 @@
-
-
- Notifications
-
Notifications
+
+
+ Notifications
+
diff --git a/EMS/admin-ui-bundle/src/Resources/translations/revision+intl-icu.en.xlf b/EMS/admin-ui-bundle/src/Resources/translations/revision+intl-icu.en.xlf
index 93c445e27..55f39bbb6 100644
--- a/EMS/admin-ui-bundle/src/Resources/translations/revision+intl-icu.en.xlf
+++ b/EMS/admin-ui-bundle/src/Resources/translations/revision+intl-icu.en.xlf
@@ -5,14 +5,14 @@
-
-
- Trash for content type %name%
-
%pluralName% in trash
+
+
+ Trash for content type %name%
+
diff --git a/EMS/admin-ui-bundle/src/Resources/translations/user+intl-icu.en.xlf b/EMS/admin-ui-bundle/src/Resources/translations/user+intl-icu.en.xlf
index 1456fd870..ce05038f9 100644
--- a/EMS/admin-ui-bundle/src/Resources/translations/user+intl-icu.en.xlf
+++ b/EMS/admin-ui-bundle/src/Resources/translations/user+intl-icu.en.xlf
@@ -5,21 +5,21 @@
-
-
- Welcome
-
elasticMS's logo
+
+
+ I forgot my password
+
Sign in to start your session
-
-
- Email or Username
+
+
+ Password
@@ -33,25 +33,49 @@
Sign In
-
-
- I forgot my password
+
+
+ Welcome
Email or Username
-
-
- Password
+
+
+ Email or Username
-
-
- Your profile
+
+
+ Simplified UI
-
-
- Username
+
+
+ Cancel
+
+
+
+ Change password
+
+
+
+ Change password
+
+
+
+ Edit
+
+
+
+ Edit your profile
+
+
+
+ Cancel
+
+
+
+ Edit
@@ -77,41 +101,17 @@
Roles
+
+
+ Username
+
WYSIWYG profile
-
-
- Edit
-
-
-
- Cancel
-
-
-
- Change password
-
-
-
- Change password
-
-
-
- Cancel
-
-
-
- Edit your profile
-
-
-
- Edit
-
-
-
- Simplified UI
+
+
+ Your profile
diff --git a/build/translations b/build/translations
index 2b8043779..e8e806ad8 100644
--- a/build/translations
+++ b/build/translations
@@ -20,13 +20,19 @@ use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Translation\Catalogue\TargetOperation;
+use Symfony\Component\Translation\Dumper\XliffFileDumper;
+use Symfony\Component\Translation\Dumper\YamlFileDumper;
use Symfony\Component\Translation\Extractor\ExtractorInterface;
use Symfony\Component\Translation\Extractor\PhpAstExtractor;
use Symfony\Component\Translation\Extractor\Visitor;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\MessageCatalogueInterface;
use Symfony\Component\Translation\Reader\TranslationReaderInterface;
-use Symfony\Component\Translation\Writer\TranslationWriterInterface;
+use Symfony\Component\Translation\Util\ArrayConverter;
+use Symfony\Component\Translation\Writer\TranslationWriter;
+use Symfony\Component\Yaml\Yaml;
+
+use function Symfony\Component\String\u;
const IGNORE_PATHS = [
'Command',
@@ -146,8 +152,19 @@ $command = static function (InputInterface $input, OutputInterface $output): int
if (true === $input->getOption('write')) {
$io->writeln('Writing translations');
- /** @var TranslationWriterInterface $translationWriter */
- $translationWriter = $container->get('translation.writer');
+ $translationWriter = new TranslationWriter();
+ $translationWriter->addDumper('xlf', new XliffFileDumper());
+ $translationWriter->addDumper('yml', new class() extends YamlFileDumper {
+ public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string
+ {
+ return Yaml::dump(
+ input: ArrayConverter::expandToTree($messages->all($domain)),
+ inline: 5,
+ flags: Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK
+ );
+ }
+ });
+
$translationWriter->write($sortedMessages, $format, match ($format) {
'yml' => [
'path' => $bundleDir.'/Resources/translations',
@@ -179,7 +196,11 @@ $command = static function (InputInterface $input, OutputInterface $output): int
$allKeys = \array_diff(\array_keys($operation->getMessages($domain)), $domainNewKeys);
\sort($allKeys);
foreach ($allKeys as $key) {
- $rows[$domain][] = ['used>', $domain, $key, $operation->getResult()->get($key, $domain)];
+ $message = u($operation->getResult()->get($key, $domain))
+ ->collapseWhitespace()
+ ->truncate(50, ' ...');
+
+ $rows[$domain][] = ['used>', $domain, $key, $message->toString()];
}
}