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 @@ - - side_menu.anonymous-user - Anonymous User - - - side-menu.quick-search.placeholder - Search - - - side-menu.quick-search.label - Search - - - side-menu.search.btn - Search - - - topbar.search_form.show - Show search form - - - topbar.search_form.submit - Search - - - topbar.search_form.close - Close - - - topbar.fullscreen.toggle - Toggle fullscreen - - - topbar.control_sidebar.toggle - Toggle sidebar - - - topbar.pushmenu.label - Push menu - elements.status.green Green, systems are working as expected - - elements.status.yellow - Yellow, systems are indexing documents. This status can't stay like this forever. - elements.status.red Red, systems are facing issues. Please contact your system administrator. + + elements.status.yellow + Yellow, systems are indexing documents. This status can't stay like this forever. + elements.user-image.anonymous Anonymous user + + hide + Hide + + + show + Show + + + side-menu.quick-search.label + Search + + + side-menu.quick-search.placeholder + Search + + + side-menu.search.btn + Search + + + side_menu.anonymous-user + Anonymous User + toats.level.error Error @@ -73,13 +57,29 @@ toats.level.warning Warning - - hide - Hide + + topbar.control_sidebar.toggle + Toggle sidebar - - show - Show + + topbar.fullscreen.toggle + Toggle fullscreen + + + topbar.pushmenu.label + Push menu + + + topbar.search_form.close + Close + + + topbar.search_form.show + Show search form + + + topbar.search_form.submit + 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 @@ - - notification.menu.link_title - Notifications - notification.dashboard.title Notifications + + notification.menu.link_title + 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 @@ - - revision.trash.title - Trash for content type %name% - revision.trash.sub_title %pluralName% in trash + + revision.trash.title + 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 @@ - - user.login.title - Welcome - user.login.alt_logo elasticMS's logo + + user.login.forgot + I forgot my password + user.login.message Sign in to start your session - - user.login.user_placeholder - Email or Username + + user.login.password1_aria_label + Password user.login.password_placeholder @@ -33,25 +33,49 @@ user.login.submit Sign In - - user.login.forgot - I forgot my password + + user.login.title + Welcome user.login.user_aria_label Email or Username - - user.login.password1_aria_label - Password + + user.login.user_placeholder + Email or Username - - user.profile.title - Your profile + + user.option.simplified_ui + Simplified UI - - user.profile.show.username - Username + + user.profile.change_password.cancel + Cancel + + + user.profile.change_password.submit + Change password + + + user.profile.change_password.title + Change password + + + user.profile.edit.breadcrumb_title + Edit + + + user.profile.edit.title + Edit your profile + + + user.profile.show.action.cancel + Cancel + + + user.profile.show.action.edit + Edit user.profile.show.display_name @@ -77,41 +101,17 @@ user.profile.show.roles Roles + + user.profile.show.username + Username + user.profile.show.wysiwyg WYSIWYG profile - - user.profile.show.action.edit - Edit - - - user.profile.show.action.cancel - Cancel - - - user.profile.change_password.title - Change password - - - user.profile.change_password.submit - Change password - - - user.profile.change_password.cancel - Cancel - - - user.profile.edit.title - Edit your profile - - - user.profile.edit.breadcrumb_title - Edit - - - user.option.simplified_ui - Simplified UI + + user.profile.title + 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()]; } }